public loadHelper ( string $helperClass = null ) : void | ||
$helperClass | string | The last part of the name of the helper class. |
Résultat | void |
public function loadHelper($helperClass = null)
{
// Get the helper class name
$className = '\\' . $this->container->getNamespacePrefix() . 'Helper\\' . ucfirst($helperClass);
// This trick autoloads the helper class. We can't instantiate it as
// helpers are (supposed to be) abstract classes with static method
// interfaces.
class_exists($className);
}