/** * Unload the finder * * @param array $configuration * @return void */ public static function unload(array $configuration = array()) { if (is_null(static::$finder)) { throw new Exception('Cannot unload autoloader, there is no autoloader registered.'); } // register the autoloader spl_autoload_unregister(array(static::$finder, 'autoload')); // kill the object static::$finder = null; }
/** * @return Finder */ protected static function getFinder() { if (static::$finder === null) { static::$finder = Yii::$container->get(Finder::className()); } return static::$finder; }
/** * @param string|array $dirs * * @return static */ public static function createIn($dirs) { $config = new static(); $config->finder(DefaultFinder::createIn($dirs)); return $config; }