|
MediaWiki master
|
A path to a bundled file (such as JavaScript or CSS), along with a remote and local base path. More...
Public Member Functions | |
| __construct (string $path, ?string $localBasePath=null, ?string $remoteBasePath=null) | |
| getLocalBasePath () | |
| getLocalPath () | |
| getPath () | |
| getRemoteBasePath () | |
| getRemotePath () | |
| initBasePaths (string $localBasePath, string $remoteBasePath) | |
| Set the base path if it has not already been set. | |
Protected Attributes | |
| string string null | $localBasePath |
| Local base path. | |
| string string | $path |
| Path to the file. | |
| string string null | $remoteBasePath |
| Remote base path. | |
A path to a bundled file (such as JavaScript or CSS), along with a remote and local base path.
This is for use with FileModule. Base path may be null, which indicates that the path is expanded relative to the corresponding base path of the FileModule object instead.
Definition at line 20 of file FilePath.php.
| MediaWiki\ResourceLoader\FilePath::__construct | ( | string | $path, |
| ?string | $localBasePath = null, | ||
| ?string | $remoteBasePath = null ) |
| string | $path | Relative path to the file, no leading slash. |
| string | null | $localBasePath | Base path to prepend when generating a local path. |
| string | null | $remoteBasePath | Base path to prepend when generating a remote path. Should not have a trailing slash unless at web document root. |
Definition at line 36 of file FilePath.php.
References MediaWiki\ResourceLoader\FilePath\$localBasePath, MediaWiki\ResourceLoader\FilePath\$path, and MediaWiki\ResourceLoader\FilePath\$remoteBasePath.
| MediaWiki\ResourceLoader\FilePath::getLocalBasePath | ( | ) |
Definition at line 71 of file FilePath.php.
| MediaWiki\ResourceLoader\FilePath::getLocalPath | ( | ) |
| RuntimeException | If the base path was not provided. You must either provide the base path in the constructor, or use getPath() instead and add the base path from a FileModule. |
Definition at line 47 of file FilePath.php.
Referenced by MediaWiki\ResourceLoader\CodexModule\processStyle().
| MediaWiki\ResourceLoader\FilePath::getPath | ( | ) |
Definition at line 79 of file FilePath.php.
| MediaWiki\ResourceLoader\FilePath::getRemoteBasePath | ( | ) |
Definition at line 75 of file FilePath.php.
| MediaWiki\ResourceLoader\FilePath::getRemotePath | ( | ) |
| RuntimeException | If the base path was not provided. You must either provide the base path in the constructor, or use getPath() instead and add the base path from a FileModule. |
Definition at line 59 of file FilePath.php.
| MediaWiki\ResourceLoader\FilePath::initBasePaths | ( | string | $localBasePath, |
| string | $remoteBasePath ) |
Set the base path if it has not already been set.
| string | $localBasePath | |
| string | $remoteBasePath |
Definition at line 89 of file FilePath.php.
|
protected |
Local base path.
Definition at line 22 of file FilePath.php.
Referenced by MediaWiki\ResourceLoader\FilePath\__construct().
|
protected |
Path to the file.
Definition at line 28 of file FilePath.php.
Referenced by MediaWiki\ResourceLoader\FilePath\__construct().
|
protected |
Remote base path.
Definition at line 25 of file FilePath.php.
Referenced by MediaWiki\ResourceLoader\FilePath\__construct().