This commit is contained in:
Qiang Xue
2012-04-30 11:20:53 -04:00
parent 6caad53ade
commit 165bb02a65
8 changed files with 829 additions and 279 deletions

View File

@@ -136,10 +136,11 @@ abstract class Module extends Component implements Initable
*/
public function setBasePath($path)
{
if (($p = realpath($path)) === false || !is_dir($p)) {
$p = \Yii::getAlias($path);
if ($p === false || !is_dir($p)) {
throw new Exception('Invalid base path: ' . $path);
} else {
$this->_basePath = $p;
$this->_basePath = realpath($p);
}
}