Craft 3 Class Reference

Class craft\services\Path

Inheritance
craft\services\Path » yii\base\Component » yii\base\BaseObject
Implements
yii\base\Configurable
Available since version
3.0
Source Code
https://github.com/craftcms/cms/blob/master/src/services/Path.php

The Path service provides APIs for getting server paths that are used by Craft.

An instance of the Path service is globally accessible in Craft via Craft::$app->path.

Public Methods
Method Description Defined By
__call() Calls the named method which is not a class method. yii\base\BaseObject
__clone() This method is called after the object is created by cloning an existing one. yii\base\Component
__construct() Constructor. yii\base\BaseObject
__get() Returns the value of an object property. yii\base\BaseObject
__isset() Checks if a property is set, i.e. defined and not null. yii\base\BaseObject
__set() Sets value of an object property. yii\base\BaseObject
__unset() Sets an object property to null. yii\base\BaseObject
attachBehavior() Attaches a behavior to this component. yii\base\Component
attachBehaviors() Attaches a list of behaviors to the component. yii\base\Component
behaviors() Returns a list of behaviors that this component should behave as. yii\base\Component
canGetProperty() Returns a value indicating whether a property can be read. yii\base\BaseObject
canSetProperty() Returns a value indicating whether a property can be set. yii\base\BaseObject
className() Returns the fully qualified name of this class. yii\base\BaseObject
detachBehavior() Detaches a behavior from the component. yii\base\Component
detachBehaviors() Detaches all behaviors from the component. yii\base\Component
ensureBehaviors() Makes sure that the behaviors declared in behaviors() are attached to this component. yii\base\Component
getAssetSourcesPath() Returns the path to the storage/runtime/assets/sources/ directory. craft\services\Path
getAssetThumbsPath() Returns the path to the storage/runtime/assets/thumbs/ directory. craft\services\Path
getAssetsIconsPath() Returns the path to the storage/runtime/assets/icons/ directory. craft\services\Path
getAssetsPath() Returns the path to the storage/runtime/assets/ directory. craft\services\Path
getBehavior() Returns the named behavior object. yii\base\Component
getBehaviors() Returns all behaviors attached to this component. yii\base\Component
getCachePath() Returns the path to the file cache directory. craft\services\Path
getCompiledClassesPath() Returns the path to the storage/runtime/compiled_classes/ directory. craft\services\Path
getCompiledTemplatesPath() Returns the path to the storage/runtime/compiled_templates/ directory. craft\services\Path
getConfigPath() Returns the path to the config/ directory. craft\services\Path
getCpTemplatesPath() Returns the path to the app/templates/ directory. craft\services\Path
getCpTranslationsPath() Returns the path to the app/translations/ directory. craft\services\Path
getDbBackupPath() Returns the path to the storage/backups/ directory. craft\services\Path
getImageEditorSourcesPath() Returns the path to the storage/runtime/assets/imageeditor/ folder. craft\services\Path
getLicenseKeyPath() Returns the path to the license key file. craft\services\Path
getLogPath() Returns the path to the storage/logs/ directory. craft\services\Path
getPluginIconsPath() Returns the path to the storage/runtime/pluginicons/ directory. craft\services\Path
getRebrandPath() Returns the path to the storage/rebrand/ directory. craft\services\Path
getRuntimePath() Returns the path to the storage/runtime/ directory. craft\services\Path
getSessionPath() Returns the path to the storage/runtime/sessions/ directory. craft\services\Path
getSiteTemplatesPath() Returns the path to the templates/ directory. craft\services\Path
getSiteTranslationsPath() Returns the path to the translations/ directory. craft\services\Path
getStoragePath() Returns the path to the storage/ directory. craft\services\Path
getTempAssetUploadsPath() Returns the path to the storage/runtime/assets/tempuploads/ directory. craft\services\Path
getTempPath() Returns the path to the storage/runtime/temp/ directory. craft\services\Path
getVendorPath() Returns the path to the vendor/ directory. craft\services\Path
hasEventHandlers() Returns a value indicating whether there is any handler attached to the named event. yii\base\Component
hasMethod() Returns a value indicating whether a method is defined. yii\base\BaseObject
hasProperty() Returns a value indicating whether a property is defined. yii\base\BaseObject
init() Initializes the object. yii\base\BaseObject
off() Detaches an existing event handler from this component. yii\base\Component
on() Attaches an event handler to an event. yii\base\Component
trigger() Triggers an event. yii\base\Component

Method Details

getAssetSourcesPath() public method #

Returns the path to the storage/runtime/assets/sources/ directory.

public string getAssetSourcesPath ( )

getAssetThumbsPath() public method #

Returns the path to the storage/runtime/assets/thumbs/ directory.

public string getAssetThumbsPath ( )

getAssetsIconsPath() public method #

Returns the path to the storage/runtime/assets/icons/ directory.

public string getAssetsIconsPath ( )

getAssetsPath() public method #

Returns the path to the storage/runtime/assets/ directory.

public string getAssetsPath ( )

getCachePath() public method #

Returns the path to the file cache directory.

This will be located at storage/runtime/cache/ by default, but that can be overridden with the 'cachePath' config setting in config/filecache.php.

public string getCachePath ( )

getCompiledClassesPath() public method #

Returns the path to the storage/runtime/compiled_classes/ directory.

public string getCompiledClassesPath ( )

getCompiledTemplatesPath() public method #

Returns the path to the storage/runtime/compiled_templates/ directory.

public string getCompiledTemplatesPath ( )

getConfigPath() public method #

Returns the path to the config/ directory.

public string getConfigPath ( )
throws yii\base\Exception

getCpTemplatesPath() public method #

Returns the path to the app/templates/ directory.

public string getCpTemplatesPath ( )

getCpTranslationsPath() public method #

Returns the path to the app/translations/ directory.

public string getCpTranslationsPath ( )

getDbBackupPath() public method #

Returns the path to the storage/backups/ directory.

public string getDbBackupPath ( )

getImageEditorSourcesPath() public method #

Returns the path to the storage/runtime/assets/imageeditor/ folder.

public string getImageEditorSourcesPath ( )

getLicenseKeyPath() public method #

Returns the path to the license key file.

public string getLicenseKeyPath ( )

getLogPath() public method #

Returns the path to the storage/logs/ directory.

public string getLogPath ( )

getPluginIconsPath() public method #

Returns the path to the storage/runtime/pluginicons/ directory.

public string getPluginIconsPath ( )

getRebrandPath() public method #

Returns the path to the storage/rebrand/ directory.

public string getRebrandPath ( )

getRuntimePath() public method #

Returns the path to the storage/runtime/ directory.

public string getRuntimePath ( )

getSessionPath() public method #

Returns the path to the storage/runtime/sessions/ directory.

public string getSessionPath ( )

getSiteTemplatesPath() public method #

Returns the path to the templates/ directory.

public string getSiteTemplatesPath ( )
throws yii\base\Exception

getSiteTranslationsPath() public method #

Returns the path to the translations/ directory.

public string getSiteTranslationsPath ( )
throws yii\base\Exception

getStoragePath() public method #

Returns the path to the storage/ directory.

public string getStoragePath ( )
throws yii\base\Exception

getTempAssetUploadsPath() public method #

Returns the path to the storage/runtime/assets/tempuploads/ directory.

public string getTempAssetUploadsPath ( )

getTempPath() public method #

Returns the path to the storage/runtime/temp/ directory.

public string getTempPath ( )

getVendorPath() public method #

Returns the path to the vendor/ directory.

public string getVendorPath ( )
throws yii\base\Exception