Aliases are used to represent file paths or URLs so that you don't have to hard-code absolute paths or URLs in your
project. An alias must start with the @ character to be differentiated from normal file paths and URLs. Alias defined
without leading @ will be prefixed with @ character.

Yii has many pre-defined aliases already available. For example, the alias @yii represents the installation path of
the Yii framework; @web represents the base URL for the currently running Web application.

// an alias of a file path
Yii::setAlias('@foo', '/path/to/foo');
// an alias of a URL
Yii::setAlias('@bar', 'http://www.example.com');
// an alias of a concrete file that contains a \foo\Bar class
Yii::setAlias('@foo/Bar.php', '/definitely/not/foo/Bar.php');

Note: The file path or URL being aliased may not necessarily refer to an existing file or resource.

Given a defined alias, you may derive a new alias (without the need of calling Yii::setAlias()) by appending
a slash / followed with one or more path segments. The aliases defined via Yii::setAlias() becomes the
root alias, while aliases derived from it are derived aliases. For example, @foo is a root alias,
while @foo/bar/file.php is a derived alias.

The path/URL represented by a derived alias is determined by replacing the root alias part with its corresponding
path/URL in the derived alias.

Note: The Yii::getAlias() method does not check whether the resulting path/URL refers to an existing file or resource.

A root alias may also contain slash / characters. The Yii::getAlias() method
is intelligent enough to tell which part of an alias is a root alias and thus correctly determines
the corresponding file path or URL:

Aliases are recognized in many places in Yii without needing to call Yii::getAlias() to convert
them into paths or URLs. For example, yii\caching\FileCache::$cachePath can accept both a file path
and an alias representing a file path, thanks to the @ prefix which allows it to differentiate a file path
from an alias.

An alias is automatically defined for each extension that is installed via Composer.
Each alias is named after the root namespace of the extension as declared in its composer.json file, and each alias
represents the root directory of the package. For example, if you install the yiisoft/yii2-jui extension,
you will automatically have the alias @yii/jui defined during the bootstrapping stage, equivalent to: