in /home/a/adorofz1/yiistudio.ru/vendor/yiisoft/yii2/di/Container.php at line 507
{ if (isset($this->_reflections[$class])) { return [$this->_reflections[$class], $this->_dependencies[$class]]; } $dependencies = []; try { $reflection = new ReflectionClass($class); } catch (\ReflectionException $e) { throw new NotInstantiableException( $class, 'Failed to instantiate component or class "' . $class . '".', 0, $e ); } $constructor = $reflection->getConstructor(); if ($constructor !== null) {
* @return object the newly created instance of the specified class * @throws NotInstantiableException If resolved to an abstract class or an interface (since 2.0.9) */ protected function build($class, $params, $config) { /* @var $reflection ReflectionClass */ list($reflection, $dependencies) = $this->getDependencies($class); $addDependencies = []; if (isset($config['__construct()'])) { $addDependencies = $config['__construct()']; unset($config['__construct()']); }
$class = $class->id; } if (isset($this->_singletons[$class])) { // singleton return $this->_singletons[$class]; } elseif (!isset($this->_definitions[$class])) { return $this->build($class, $params, $config); } $definition = $this->_definitions[$class]; if (is_callable($definition, true)) { $params = $this->resolveDependencies($this->mergeParams($class, $params));
return static::$container->get($class, $params, $type); } if (isset($type['class'])) { $class = $type['class']; unset($type['class']); return static::$container->get($class, $params, $type); } throw new InvalidConfigException('Object configuration must be an array containing a "class" or "__class" element.'); } private static $_logger;
if ($id === '') { $id = $this->defaultAction; } $actionMap = $this->actions(); if (isset($actionMap[$id])) { return Yii::createObject($actionMap[$id], [$id, $this]); } if (preg_match('/^(?:[a-z0-9_]+-)*[a-z0-9_]+$/', $id)) { $methodName = 'action' . str_replace(' ', '', ucwords(str_replace('-', ' ', $id))); if (method_exists($this, $methodName)) { $method = new \ReflectionMethod($this, $methodName);
* @return mixed the result of the action. * @throws InvalidRouteException if the requested action ID cannot be resolved into an action successfully. * @see createAction() */ public function runAction($id, $params = []) { $action = $this->createAction($id); if ($action === null) { throw new InvalidRouteException('Unable to resolve the request: ' . $this->getUniqueId() . '/' . $id); } Yii::debug('Route to run: ' . $action->getUniqueId(), __METHOD__);
$parts = $this->createController($route); if (is_array($parts)) { /* @var $controller Controller */ list($controller, $actionID) = $parts; $oldController = Yii::$app->controller; Yii::$app->controller = $controller; $result = $controller->runAction($actionID, $params); if ($oldController !== null) { Yii::$app->controller = $oldController; } return $result; }
$params = $this->catchAll; unset($params[0]); } try { Yii::debug("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } $response = $this->getResponse(); if ($result !== null) {
{ try { $this->state = self::STATE_BEFORE_REQUEST; $this->trigger(self::EVENT_BEFORE_REQUEST); $this->state = self::STATE_HANDLING_REQUEST; $response = $this->handleRequest($this->getRequest()); $this->state = self::STATE_AFTER_REQUEST; $this->trigger(self::EVENT_AFTER_REQUEST); $this->state = self::STATE_SENDING_RESPONSE; $response->send();
//Доп. параметры require(__DIR__ . '/../' . APP_NAME . '/params.php'); //Доп. события require(__DIR__ . '/../' . APP_NAME . '/events.php'); //Запуск приложения $application->run();
$_GET = [ 'authclient' => 'facebook', ];