phproberto/joomla-common

与 Joomla! 交互的通用库!

dev-master 2017-07-14 11:53 UTC

This package is auto-updated.

Last update: 2024-09-10 14:05:50 UTC


README

100% 单元测试库,用于开发 Joomla! 扩展。

Build Status Code Coverage Scrutinizer Code Quality

仍未准备好用于生产

快速入门

示例用法

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 - 版权所有。