/var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/View
NameSizeModeActions
Exception/-0755rm
Form/-0755rm
Helper/-0755rm
Widget/-0755rm
AjaxView.php10980644editdlrm
Cell.php89360644editdlrm
CellTrait.php45240644editdlrm
Helper.php71820644editdlrm
HelperRegistry.php48530644editdlrm
JsonView.php58580644editdlrm
SerializedView.php35580644editdlrm
StringTemplate.php112470644editdlrm
StringTemplateTrait.php28390644editdlrm
View.php504330644editdlrm
ViewBlock.php64450644editdlrm
ViewBuilder.php161570644editdlrm
ViewVarsTrait.php30010644editdlrm
XmlView.php49410644editdlrm
Edit: /var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/View/HelperRegistry.php (4853B)
*/ class HelperRegistry extends ObjectRegistry implements EventDispatcherInterface { use EventDispatcherTrait; /** * View object to use when making helpers. * * @var \Cake\View\View */ protected $_View; /** * Constructor * * @param \Cake\View\View $view View object. */ public function __construct(View $view) { $this->_View = $view; $this->setEventManager($view->getEventManager()); } /** * Tries to lazy load a helper based on its name, if it cannot be found * in the application folder, then it tries looking under the current plugin * if any * * @param string $helper The helper name to be loaded * @return bool whether the helper could be loaded or not * @throws \Cake\View\Exception\MissingHelperException When a helper could not be found. * App helpers are searched, and then plugin helpers. */ public function __isset(string $helper): bool { if (isset($this->_loaded[$helper])) { return true; } try { $this->load($helper); } catch (MissingHelperException $exception) { $plugin = $this->_View->getPlugin(); if (!empty($plugin)) { $this->load($plugin . '.' . $helper); return true; } } if (!empty($exception)) { throw $exception; } return true; } /** * Provide public read access to the loaded objects * * @param string $name Name of property to read * @return \Cake\View\Helper|null */ public function __get(string $name) { if (isset($this->_loaded[$name])) { return $this->_loaded[$name]; } if (isset($this->{$name})) { return $this->_loaded[$name]; } return null; } /** * Resolve a helper classname. * * Part of the template method for Cake\Core\ObjectRegistry::load() * * @param string $class Partial classname to resolve. * @return string|null Either the correct class name or null. * @psalm-return class-string|null */ protected function _resolveClassName(string $class): ?string { return App::className($class, 'View/Helper', 'Helper'); } /** * Throws an exception when a helper is missing. * * Part of the template method for Cake\Core\ObjectRegistry::load() * and Cake\Core\ObjectRegistry::unload() * * @param string $class The classname that is missing. * @param string|null $plugin The plugin the helper is missing in. * @return void * @throws \Cake\View\Exception\MissingHelperException */ protected function _throwMissingClassError(string $class, ?string $plugin): void { throw new MissingHelperException([ 'class' => $class . 'Helper', 'plugin' => $plugin, ]); } /** * Create the helper instance. * * Part of the template method for Cake\Core\ObjectRegistry::load() * Enabled helpers will be registered with the event manager. * * @param string $class The class to create. * @param string $alias The alias of the loaded helper. * @param array $settings An array of settings to use for the helper. * @return \Cake\View\Helper The constructed helper class. * @psalm-suppress MoreSpecificImplementedParamType */ protected function _create($class, string $alias, array $settings): Helper { /** @var \Cake\View\Helper $instance */ $instance = new $class($this->_View, $settings); $enable = $settings['enabled'] ?? true; if ($enable) { $this->getEventManager()->on($instance); } return $instance; } }