Created
January 3, 2014 11:10
-
-
Save radzserg/8236307 to your computer and use it in GitHub Desktop.
init function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function init() | |
{ | |
parent::init(); | |
$this->basePath = Yii::getAlias($this->basePath); | |
if (!is_dir($this->basePath)) { | |
throw new InvalidConfigException("The directory does not exist: {$this->basePath}"); | |
} elseif (!is_writable($this->basePath)) { | |
throw new InvalidConfigException("The directory is not writable by the Web process: {$this->basePath}"); | |
} else { | |
$this->basePath = realpath($this->basePath); | |
} | |
$this->baseUrl = rtrim(Yii::getAlias($this->baseUrl), '/'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment