|
@@ -3,6 +3,8 @@
|
|
|
|
|
|
|
|
namespace yiins\web;
|
|
namespace yiins\web;
|
|
|
|
|
|
|
|
|
|
+use yiins\Yii;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Description of Application
|
|
* Description of Application
|
|
|
*
|
|
*
|
|
@@ -21,7 +23,10 @@ class Application extends \CWebApplication
|
|
|
*/
|
|
*/
|
|
|
public function getUploadSaver()
|
|
public function getUploadSaver()
|
|
|
{
|
|
{
|
|
|
- return $this->getComponent('uploadSaver');
|
|
|
|
|
|
|
+ /** @var UploadSaver $saver */
|
|
|
|
|
+ $saver = $this->getComponent('uploadSaver');
|
|
|
|
|
+
|
|
|
|
|
+ return $saver;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -40,13 +45,16 @@ class Application extends \CWebApplication
|
|
|
*/
|
|
*/
|
|
|
public function getResponse()
|
|
public function getResponse()
|
|
|
{
|
|
{
|
|
|
- return $this->getComponent('response');
|
|
|
|
|
|
|
+ /** @var Response $response */
|
|
|
|
|
+ $response = $this->getComponent('response');
|
|
|
|
|
+
|
|
|
|
|
+ return $response;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function init()
|
|
public function init()
|
|
|
{
|
|
{
|
|
|
parent::init();
|
|
parent::init();
|
|
|
- \Yii::setPathOfAlias('@base', dirname(dirname(__FILE__)));
|
|
|
|
|
|
|
+ Yii::setPathOfAlias('@base', dirname(__DIR__));
|
|
|
// preload 'response'.
|
|
// preload 'response'.
|
|
|
$this->getResponse();
|
|
$this->getResponse();
|
|
|
$this->getClientScript()->scriptMap = [
|
|
$this->getClientScript()->scriptMap = [
|
|
@@ -73,7 +81,7 @@ class Application extends \CWebApplication
|
|
|
$controller->run($actionID);
|
|
$controller->run($actionID);
|
|
|
$this->setController($oldController);
|
|
$this->setController($oldController);
|
|
|
} else {
|
|
} else {
|
|
|
- throw new \CHttpException(404, \Yii::t('yii', 'Unable to resolve the request "{route}".',
|
|
|
|
|
|
|
+ throw new \CHttpException(404, Yii::t('yii', 'Unable to resolve the request "{route}".',
|
|
|
array('{route}' => $route === '' ? $this->defaultController : $route)));
|
|
array('{route}' => $route === '' ? $this->defaultController : $route)));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -91,8 +99,10 @@ class Application extends \CWebApplication
|
|
|
if ($this->_module !== null) {
|
|
if ($this->_module !== null) {
|
|
|
return $this->_module;
|
|
return $this->_module;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
return $this;
|
|
return $this;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
return parent::getModule($id);
|
|
return parent::getModule($id);
|
|
|
}
|
|
}
|
|
|
|
|
|