* or the dependency associated with the cached data has changed. */ public function get($key) { $key = $this->buildKey($key); $value = $this->getValue($key); if ($value === false || $this->serializer === false) { return $value; } elseif ($this->serializer === null) { $value = unserialize((string)$value); } else { $value = call_user_func($this->serializer[1], $value); } if (is_array($value) && !($value[1] instanceof Dependency && $value[1]->isChanged($this))) { return $value[0]; } return false; }
{ $key = $this->buildKey($key); $value = $this->getValue($key); if ($value === false || $this->serializer === false) { return $value; } elseif ($this->serializer === null) { $value = unserialize((string)$value); } else { $value = call_user_func($this->serializer[1], $value); } if (is_array($value) && !($value[1] instanceof Dependency && $value[1]->isChanged($this))) { return $value[0]; }
* Find available modules * @return array * @throws ErrorException */ public static function locateModules() { $modules = Yii::$app->cache->get(self::CACHE_ID); if ($modules === false || YII_DEBUG) { $modules = static::findModules(Yii::$app->params['moduleAutoloadPaths']); Yii::$app->cache->set(self::CACHE_ID, $modules); }
* Bootstrap method to be called during application bootstrap stage. * @param Application $app the application currently running * @throws \yii\base\InvalidConfigException */ public function bootstrap($app) { $modules = self::locateModules(); Yii::$app->moduleManager->registerBulk($modules); } /** * Find available modules * @return array
if (!isset($component)) { $component = Yii::createObject($mixed); } if ($component instanceof BootstrapInterface) { Yii::debug('Bootstrap with ' . get_class($component) . '::bootstrap()', __METHOD__); $component->bootstrap($this); } else { Yii::debug('Bootstrap with ' . get_class($component), __METHOD__); } } }
protected function bootstrap() { $request = $this->getRequest(); Yii::setAlias('@webroot', dirname($request->getScriptFile())); Yii::setAlias('@web', $request->getBaseUrl()); parent::bootstrap(); } /** * Handles the specified request. * @param Request $request the request to be handled * @return Response the resulting response
} if (Yii::getAlias('@webroot-static', false) === false) { Yii::setAlias('@webroot-static', '@webroot/static'); } parent::bootstrap(); } /** * @return string the homepage URL */ public function getHomeUrl()
/** * {@inheritdoc} */ public function init() { $this->state = self::STATE_INIT; $this->bootstrap(); } /** * Initializes extensions and executes bootstrap components. * This method is called by [[init()]] after the application has been fully configured. * If you override this method, make sure you also call the parent implementation.
'Installed PHP Version is too old! Required minimum version is PHP %s (Installed: %s)', $this->minSupportedPhpVersion, phpversion() )); } parent::init(); } /** * @inheritdoc */ public function bootstrap()
*/ public function __construct($config = []) { if (!empty($config)) { Yii::configure($this, $config); } $this->init(); } /** * Initializes the object. * This method is invoked at the end of the constructor after the object is initialized with the * given configuration.
$this->state = self::STATE_BEGIN; $this->preInit($config); $this->registerErrorHandler($config); Component::__construct($config); } /** * Pre-initializes the application. * This method is called at the beginning of the application constructor. * It initializes several important application properties.
*/ public function __construct($config = []) { // Remove obsolete config params: unset($config['components']['formatterApp']); parent::__construct($config); } /** * @inheritdoc */ public function init()
require(__DIR__ . '/protected/humhub/config/web.php'), (is_readable(__DIR__ . '/protected/config/dynamic.php')) ? require(__DIR__ . '/protected/config/dynamic.php') : [], require(__DIR__ . '/protected/config/common.php'), require(__DIR__ . '/protected/config/web.php') ); (new humhub\components\Application($config))->run();
$_GET = [ 'r' => 'wiki/page/edit', 'cguid' => '72844ba4-0a90-4d30-a109-a1df832d2119', ];