/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/Core
NameSizeModeActions
Configure/-0755rm
Exception/-0755rm
Retry/-0755rm
TestSuite/-0755rm
App.php81780644editdlrm
BasePlugin.php65980644editdlrm
ClassLoader.php40020644editdlrm
composer.json12190644editdlrm
Configure.php165820644editdlrm
ConsoleApplicationInterface.php13020644editdlrm
Container.php8610644editdlrm
ContainerApplicationInterface.php15460644editdlrm
ContainerInterface.php11200644editdlrm
ConventionsTrait.php43530644editdlrm
functions.php116010644editdlrm
HttpApplicationInterface.php13550644editdlrm
InstanceConfigTrait.php81300644editdlrm
LICENSE.txt12040644editdlrm
ObjectRegistry.php127290644editdlrm
Plugin.php41240644editdlrm
PluginApplicationInterface.php25340644editdlrm
PluginCollection.php97400644editdlrm
PluginInterface.php37950644editdlrm
README.md11570644editdlrm
ServiceConfig.php15270644editdlrm
ServiceProvider.php41390644editdlrm
StaticConfigTrait.php98710644editdlrm
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/Core/BasePlugin.php (6598B)
$options Options */ public function __construct(array $options = []) { foreach (static::VALID_HOOKS as $key) { if (isset($options[$key])) { $this->{"{$key}Enabled"} = (bool)$options[$key]; } } foreach (['name', 'path', 'classPath', 'configPath', 'templatePath'] as $path) { if (isset($options[$path])) { $this->{$path} = $options[$path]; } } $this->initialize(); } /** * Initialization hook called from constructor. * * @return void */ public function initialize(): void { } /** * @inheritDoc */ public function getName(): string { if ($this->name) { return $this->name; } $parts = explode('\\', static::class); array_pop($parts); $this->name = implode('/', $parts); return $this->name; } /** * @inheritDoc */ public function getPath(): string { if ($this->path) { return $this->path; } $reflection = new ReflectionClass($this); $path = dirname($reflection->getFileName()); // Trim off src if (substr($path, -3) === 'src') { $path = substr($path, 0, -3); } $this->path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; return $this->path; } /** * @inheritDoc */ public function getConfigPath(): string { if ($this->configPath) { return $this->configPath; } $path = $this->getPath(); return $path . 'config' . DIRECTORY_SEPARATOR; } /** * @inheritDoc */ public function getClassPath(): string { if ($this->classPath) { return $this->classPath; } $path = $this->getPath(); return $path . 'src' . DIRECTORY_SEPARATOR; } /** * @inheritDoc */ public function getTemplatePath(): string { if ($this->templatePath) { return $this->templatePath; } $path = $this->getPath(); return $this->templatePath = $path . 'templates' . DIRECTORY_SEPARATOR; } /** * @inheritDoc */ public function enable(string $hook) { $this->checkHook($hook); $this->{"{$hook}Enabled"} = true; return $this; } /** * @inheritDoc */ public function disable(string $hook) { $this->checkHook($hook); $this->{"{$hook}Enabled"} = false; return $this; } /** * @inheritDoc */ public function isEnabled(string $hook): bool { $this->checkHook($hook); return $this->{"{$hook}Enabled"} === true; } /** * Check if a hook name is valid * * @param string $hook The hook name to check * @throws \InvalidArgumentException on invalid hooks * @return void */ protected function checkHook(string $hook): void { if (!in_array($hook, static::VALID_HOOKS, true)) { throw new InvalidArgumentException( "`$hook` is not a valid hook name. Must be one of " . implode(', ', static::VALID_HOOKS) ); } } /** * @inheritDoc */ public function routes(RouteBuilder $routes): void { $path = $this->getConfigPath() . 'routes.php'; if (is_file($path)) { $return = require $path; if ($return instanceof Closure) { $return($routes); } } } /** * @inheritDoc */ public function bootstrap(PluginApplicationInterface $app): void { $bootstrap = $this->getConfigPath() . 'bootstrap.php'; if (is_file($bootstrap)) { require $bootstrap; } } /** * @inheritDoc */ public function console(CommandCollection $commands): CommandCollection { return $commands->addMany($commands->discoverPlugin($this->getName())); } /** * @inheritDoc */ public function middleware(MiddlewareQueue $middlewareQueue): MiddlewareQueue { return $middlewareQueue; } /** * Register container services for this plugin. * * @param \Cake\Core\ContainerInterface $container The container to add services to. * @return void */ public function services(ContainerInterface $container): void { } }