src/base/Application.php
public function setBasePath($path)
    {
        parent::setBasePath($path);
        $this->setAlias('@app', $this->getBasePath());
        if (empty($this->getAlias('@root', false))) {
            $this->setAlias('@root', dirname(__DIR__, 5));
        }
    }
public function setBasePath($path)
    {
        parent::setBasePath($path);
        $this->setAlias('@app', $this->getBasePath());
        if (empty($this->getAlias('@root', false))) {
            $this->setAlias('@root', dirname(__DIR__, 5));
        }
    }
public function setBasePath ( $ path ) { parent :: setBasePath ( $ path ) ; $ this -> setAlias ( '@app' , $ this -> getBasePath ( ) ) ; if ( empty ( $ this -> getAlias ( '@root' , false ) ) ) { $ this -> setAlias ( '@root' , dirname ( __DIR__ , 5 ) ) ; } }
Sets the root directory of the application and the @app alias.
This method can only be invoked at the beginning of the constructor.
@param string $path the root directory of the application.
@property string the root directory of the application.
@throws InvalidArgumentException if the directory does not exist.
Sets the root directory of the application and the