MediaWiki  master
ResourceLoaderFilePath.php
Go to the documentation of this file.
1 <?php
30  protected $localBasePath;
31 
33  protected $remoteBasePath;
34 
36  protected $path;
37 
43  public function __construct( $path, $localBasePath = '', $remoteBasePath = '' ) {
44  $this->path = $path;
45  $this->localBasePath = $localBasePath;
46  $this->remoteBasePath = $remoteBasePath;
47  }
48 
50  public function getLocalPath() {
51  return $this->localBasePath === '' ?
52  $this->path :
53  "{$this->localBasePath}/{$this->path}";
54  }
55 
57  public function getRemotePath() {
58  return $this->remoteBasePath === '' ?
59  $this->path :
60  "{$this->remoteBasePath}/{$this->path}";
61  }
62 
64  public function getLocalBasePath() {
65  return $this->localBasePath;
66  }
67 
69  public function getRemoteBasePath() {
70  return $this->remoteBasePath;
71  }
72 
74  public function getPath() {
75  return $this->path;
76  }
77 }
ResourceLoaderFilePath\__construct
__construct( $path, $localBasePath='', $remoteBasePath='')
Definition: ResourceLoaderFilePath.php:43
ResourceLoaderFilePath\$remoteBasePath
string $remoteBasePath
Remote base path.
Definition: ResourceLoaderFilePath.php:33
ResourceLoaderFilePath
An object to represent a path to a JavaScript/CSS file, along with a remote and local base path,...
Definition: ResourceLoaderFilePath.php:28
ResourceLoaderFilePath\$path
string $path
Path to the file.
Definition: ResourceLoaderFilePath.php:36
ResourceLoaderFilePath\getLocalBasePath
getLocalBasePath()
Definition: ResourceLoaderFilePath.php:64
ResourceLoaderFilePath\getLocalPath
getLocalPath()
Definition: ResourceLoaderFilePath.php:50
ResourceLoaderFilePath\getRemotePath
getRemotePath()
Definition: ResourceLoaderFilePath.php:57
ResourceLoaderFilePath\getRemoteBasePath
getRemoteBasePath()
Definition: ResourceLoaderFilePath.php:69
ResourceLoaderFilePath\$localBasePath
string $localBasePath
Local base path.
Definition: ResourceLoaderFilePath.php:30
ResourceLoaderFilePath\getPath
getPath()
Definition: ResourceLoaderFilePath.php:74