/var/www/vhosts/nabawater/vendor/yiisoft/yii2/base
NameSizeModeActions
Action.php38090644editdlrm
ActionEvent.php12800644editdlrm
ActionFilter.php52060644editdlrm
Application.php239340644editdlrm
Arrayable.php39570644editdlrm
ArrayableTrait.php96200644editdlrm
ArrayAccessTrait.php23860644editdlrm
BaseObject.php105700644editdlrm
Behavior.php32080644editdlrm
BootstrapInterface.php19920644editdlrm
Component.php278760644editdlrm
Configurable.php10500644editdlrm
Controller.php199290644editdlrm
DynamicContentAwareInterface.php12900644editdlrm
DynamicContentAwareTrait.php24270644editdlrm
DynamicModel.php72260644editdlrm
ErrorException.php41430644editdlrm
ErrorHandler.php123060644editdlrm
Event.php116510644editdlrm
Exception.php6250644editdlrm
ExitException.php9980644editdlrm
InlineAction.php19450644editdlrm
InvalidArgumentException.php5650644editdlrm
InvalidCallException.php5470644editdlrm
InvalidConfigException.php5450644editdlrm
InvalidParamException.php6310644editdlrm
InvalidRouteException.php5250644editdlrm
InvalidValueException.php5750644editdlrm
Model.php398360644editdlrm
ModelEvent.php5380644editdlrm
Module.php280050644editdlrm
NotSupportedException.php5460644editdlrm
Object.php10420644editdlrm
Request.php31500644editdlrm
Response.php11170644editdlrm
Security.php318930644editdlrm
StaticInstanceInterface.php10080644editdlrm
StaticInstanceTrait.php10780644editdlrm
Theme.php67120644editdlrm
UnknownClassException.php5270644editdlrm
UnknownMethodException.php5560644editdlrm
UnknownPropertyException.php5490644editdlrm
UserException.php4360644editdlrm
View.php217920644editdlrm
ViewContextInterface.php6570644editdlrm
ViewEvent.php10960644editdlrm
ViewNotFoundException.php5290644editdlrm
ViewRenderer.php8560644editdlrm
Widget.php106090644editdlrm
WidgetEvent.php8380644editdlrm
Edit: /var/www/vhosts/nabawater/vendor/yiisoft/yii2/base/Theme.php (6712B)
'@app/themes/basic']`, * then the themed version for a view file `@app/views/site/index.php` will be * `@app/themes/basic/site/index.php`. * * It is possible to map a single path to multiple paths. For example, * * ```php * 'pathMap' => [ * '@app/views' => [ * '@app/themes/christmas', * '@app/themes/basic', * ], * ] * ``` * * In this case, the themed version could be either `@app/themes/christmas/site/index.php` or * `@app/themes/basic/site/index.php`. The former has precedence over the latter if both files exist. * * To use a theme, you should configure the [[View::theme|theme]] property of the "view" application * component like the following: * * ```php * 'view' => [ * 'theme' => [ * 'basePath' => '@app/themes/basic', * 'baseUrl' => '@web/themes/basic', * ], * ], * ``` * * The above configuration specifies a theme located under the "themes/basic" directory of the Web folder * that contains the entry script of the application. If your theme is designed to handle modules, * you may configure the [[pathMap]] property like described above. * * For more details and usage information on Theme, see the [guide article on theming](guide:output-theming). * * @property string $basePath The root path of this theme. All resources of this theme are located under this * directory. * @property string $baseUrl The base URL (without ending slash) for this theme. All resources of this theme * are considered to be under this base URL. * * @author Qiang Xue * @since 2.0 */ class Theme extends Component { /** * @var array the mapping between view directories and their corresponding themed versions. * This property is used by [[applyTo()]] when a view is trying to apply the theme. * [Path aliases](guide:concept-aliases) can be used when specifying directories. * If this property is empty or not set, a mapping [[Application::basePath]] to [[basePath]] will be used. */ public $pathMap; private $_baseUrl; /** * @return string the base URL (without ending slash) for this theme. All resources of this theme are considered * to be under this base URL. */ public function getBaseUrl() { return $this->_baseUrl; } /** * @param string $url the base URL or [path alias](guide:concept-aliases) for this theme. All resources of this theme are considered * to be under this base URL. */ public function setBaseUrl($url) { $this->_baseUrl = $url === null ? null : rtrim(Yii::getAlias($url), '/'); } private $_basePath; /** * @return string the root path of this theme. All resources of this theme are located under this directory. * @see pathMap */ public function getBasePath() { return $this->_basePath; } /** * @param string $path the root path or [path alias](guide:concept-aliases) of this theme. All resources of this theme are located * under this directory. * @see pathMap */ public function setBasePath($path) { $this->_basePath = Yii::getAlias($path); } /** * Converts a file to a themed file if possible. * If there is no corresponding themed file, the original file will be returned. * @param string $path the file to be themed * @return string the themed file, or the original file if the themed version is not available. * @throws InvalidConfigException if [[basePath]] is not set */ public function applyTo($path) { $pathMap = $this->pathMap; if (empty($pathMap)) { if (($basePath = $this->getBasePath()) === null) { throw new InvalidConfigException('The "basePath" property must be set.'); } $pathMap = [Yii::$app->getBasePath() => [$basePath]]; } $path = FileHelper::normalizePath($path); foreach ($pathMap as $from => $tos) { $from = FileHelper::normalizePath(Yii::getAlias($from)) . DIRECTORY_SEPARATOR; if (strpos($path, $from) === 0) { $n = strlen($from); foreach ((array) $tos as $to) { $to = FileHelper::normalizePath(Yii::getAlias($to)) . DIRECTORY_SEPARATOR; $file = $to . substr($path, $n); if (is_file($file)) { return $file; } } } } return $path; } /** * Converts a relative URL into an absolute URL using [[baseUrl]]. * @param string $url the relative URL to be converted. * @return string the absolute URL * @throws InvalidConfigException if [[baseUrl]] is not set */ public function getUrl($url) { if (($baseUrl = $this->getBaseUrl()) !== null) { return $baseUrl . '/' . ltrim($url, '/'); } throw new InvalidConfigException('The "baseUrl" property must be set.'); } /** * Converts a relative file path into an absolute one using [[basePath]]. * @param string $path the relative file path to be converted. * @return string the absolute file path * @throws InvalidConfigException if [[basePath]] is not set */ public function getPath($path) { if (($basePath = $this->getBasePath()) !== null) { return $basePath . DIRECTORY_SEPARATOR . ltrim($path, '/\\'); } throw new InvalidConfigException('The "basePath" property must be set.'); } }