/** * Create the configuration object used in other classes. * * @return void */ public function startup() { parent::startup(); $configFinder = new ConfigFinder(); $this->setConfig($configFinder->loadAll()); $this->out(); }
/** * Constructor - finds and parses the ini file the plugin uses. * * @param \Cake\View\View $view The view instance to use. * @param array $settings The settings for the helper. * @return void */ public function __construct(View $view, $settings = []) { parent::__construct($view, $settings); if (empty($settings['noconfig'])) { $configFinder = new ConfigFinder(); $this->assetConfig($configFinder->loadAll()); } }
/** * Constructor * * @param \MiniAsset\AssetConfig|null $config The config object to use. * If null, \AssetCompress\ConfigFinder::loadAll() will be used. */ public function __construct(AssetConfig $config = null) { if ($config === null) { $finder = new ConfigFinder(); $config = $finder->loadAll(); } $this->config = $config; }
/** * Config setter, used for testing the filter. * * @return \MiniAsset\Config The completed config instance. */ protected function _getConfig() { if (empty($this->config)) { $configFinder = new ConfigFinder(); $this->config = $configFinder->loadAll(); } return $this->config; }