Commit 22357bef by Qiang Xue

Added "@runtime" and "@vendor" aliases.

parent 36bbfd54
...@@ -26,12 +26,12 @@ class ViewRenderer extends BaseViewRenderer ...@@ -26,12 +26,12 @@ class ViewRenderer extends BaseViewRenderer
/** /**
* @var string the directory or path alias pointing to where Smarty cache will be stored. * @var string the directory or path alias pointing to where Smarty cache will be stored.
*/ */
public $cachePath = '@app/runtime/Smarty/cache'; public $cachePath = '@runtime/Smarty/cache';
/** /**
* @var string the directory or path alias pointing to where Smarty compiled templates will be stored. * @var string the directory or path alias pointing to where Smarty compiled templates will be stored.
*/ */
public $compilePath = '@app/runtime/Smarty/compile'; public $compilePath = '@runtime/Smarty/compile';
/** /**
* @var Smarty * @var Smarty
......
...@@ -25,7 +25,7 @@ class ViewRenderer extends BaseViewRenderer ...@@ -25,7 +25,7 @@ class ViewRenderer extends BaseViewRenderer
/** /**
* @var string the directory or path alias pointing to where Twig cache will be stored. * @var string the directory or path alias pointing to where Twig cache will be stored.
*/ */
public $cachePath = '@app/runtime/Twig/cache'; public $cachePath = '@runtime/Twig/cache';
/** /**
* @var array Twig options * @var array Twig options
......
...@@ -102,11 +102,17 @@ class Application extends Module ...@@ -102,11 +102,17 @@ class Application extends Module
Yii::setAlias('@app', $this->getBasePath()); Yii::setAlias('@app', $this->getBasePath());
unset($config['basePath']); unset($config['basePath']);
if (isset($config['vendor'])) {
$this->setVendorPath($config['vendor']);
unset($config['vendorPath']);
}
Yii::setAlias('@vendor', $this->getVendorPath());
if (isset($config['runtime'])) { if (isset($config['runtime'])) {
$this->setRuntimePath($config['runtime']); $this->setRuntimePath($config['runtime']);
unset($config['runtime']); unset($config['runtime']);
} }
Yii::setAlias('@app/runtime', $this->getRuntimePath()); Yii::setAlias('@runtime', $this->getRuntimePath());
if (isset($config['timeZone'])) { if (isset($config['timeZone'])) {
$this->setTimeZone($config['timeZone']); $this->setTimeZone($config['timeZone']);
......
...@@ -27,7 +27,7 @@ class FileCache extends Cache ...@@ -27,7 +27,7 @@ class FileCache extends Cache
* @var string the directory to store cache files. You may use path alias here. * @var string the directory to store cache files. You may use path alias here.
* If not set, it will use the "cache" subdirectory under the application runtime path. * If not set, it will use the "cache" subdirectory under the application runtime path.
*/ */
public $cachePath = '@app/runtime/cache'; public $cachePath = '@runtime/cache';
/** /**
* @var string cache file suffix. Defaults to '.bin'. * @var string cache file suffix. Defaults to '.bin'.
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment