__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* Joomla! Content Management System
*
* @copyright (C) 2021 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\CMS\Helper;
use Joomla\Database\DatabaseAwareInterface;
use Joomla\Database\DatabaseAwareTrait;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects
/**
* Namespace based implementation of the HelperFactoryInterface
*
* @since 4.0.0
*/
class HelperFactory implements HelperFactoryInterface
{
use DatabaseAwareTrait;
/**
* The extension namespace
*
* @var string
*
* @since 4.0.0
*/
private $namespace;
/**
* HelperFactory constructor.
*
* @param string $namespace The namespace
*
* @since 4.0.0
*/
public function __construct(string $namespace)
{
$this->namespace = $namespace;
}
/**
* Returns a helper instance for the given name.
*
* @param string $name The name
* @param array $config The config
*
* @return \stdClass
*
* @since 4.0.0
*/
public function getHelper(string $name, array $config = [])
{
$className = '\\' . trim($this->namespace, '\\') . '\\' . $name;
if (!class_exists($className)) {
return null;
}
$helper = new $className($config);
if ($helper instanceof DatabaseAwareInterface) {
$helper->setDatabase($this->getDatabase());
}
return $helper;
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| AuthenticationHelper.php | File | 5.65 KB | 0664 |
|
| CMSHelper.php | File | 3.72 KB | 0664 |
|
| ContentHelper.php | File | 8.46 KB | 0664 |
|
| HelperFactory.php | File | 1.58 KB | 0664 |
|
| HelperFactoryAwareInterface.php | File | 736 B | 0664 |
|
| HelperFactoryAwareTrait.php | File | 1.31 KB | 0664 |
|
| HelperFactoryInterface.php | File | 735 B | 0664 |
|
| LibraryHelper.php | File | 5.54 KB | 0664 |
|
| MediaHelper.php | File | 17.52 KB | 0664 |
|
| ModuleHelper.php | File | 24.05 KB | 0664 |
|
| PublicFolderGeneratorHelper.php | File | 7.14 KB | 0664 |
|
| RouteHelper.php | File | 8.49 KB | 0664 |
|
| TagsHelper.php | File | 42.17 KB | 0664 |
|
| UserGroupsHelper.php | File | 6.96 KB | 0664 |
|