thrownewCException(Yii::t('yii','Unable to import "{alias}". Please check your server configuration to make sure you are allowed to change PHP include_path.',array('{alias}'=>$alias)));
self::$useIncludePath=false;
returnself::$_imports[$alias]=$path;
returnself::$_imports[$alias]=$path;
}
}
}
}
else
else
thrownewCException(Yii::t('yii','Alias "{alias}" is invalid. Make sure it points to an existing directory or file.',
thrownewCException(Yii::t('yii','Alias "{alias}" is invalid. Make sure it points to an existing directory or file.',
array('{alias}'=>$alias)));
array('{alias}'=>$alias)));
}
}
/**
/**
* Translates an alias into a file path.
* Translates a path alias into an actual path.
* Note, this method does not ensure the existence of the resulting file path.
* The path alias can be either a root alias registered via [[setPathOfAlias]] or an
* It only checks if the root alias is valid or not.
* alias starting with a root alias (e.g. `@yii/base/Component.php`).
* @param string $alias alias (e.g. system.web.CController)
* In the latter case, the root alias will be replaced by the corresponding registered path
* @return mixed file path corresponding to the alias, false if the alias is invalid.
* and the remaining part will be appended to it.
* Note, this method does not ensure the existence of the resulting path.
* @param string $alias alias
* @return mixed path corresponding to the alias, false if the root alias is not previously registered.