phproberto / joomla-common
与 Joomla! 交互的通用库!
dev-master
2017-07-14 11:53 UTC
Requires
- php: >=5.5.0
Requires (Dev)
- joomla/registry: ^1.4.5
- phpunit/phpunit: ^4.8.35
This package is auto-updated.
Last update: 2024-09-10 14:05:50 UTC
README
100% 单元测试库,用于开发 Joomla! 扩展。
仍未准备好用于生产
快速入门
示例用法
use Phproberto\Joomla\Client\Client; // Get the active client $client = Client::getActive(); // Check if we are in backend if ($client->isAdmin()) { // Do something } // Check if we are in frontend if ($client->isSite()) { // Do something } // Retrieve client base folder echo 'Base application folder is ' . $client->getFolder(); // Retrieve frontend client $site = Client::site(); // Retrieve backend client $admin = Client::admin();
要求
- PHP 5.5+
- Joomla! CMS v3.7+
许可证
本库受 GNU LESSER GENERAL PUBLIC LICENSE 许可。
版权(C)2017 Roberto Segura López - 版权所有。