getIdentifier()
getIdentifier() : string
Get this particular path's identifier
Returns
string —The universally unique vertex identifier
Path Interface - Defines A Path Structure
A path consists of a directory, a file, and a file extension. This class keeps track of the directory path, and the assigned or acceptable extensions allowed by the path. It offers a function to test if a file is found in the path given the allowed extensions
CHANGELOG
1.0: Created PathInterface - August 3rd, 2016
setPath( $path) : \Phabstractic\Data\Components\Resource\Phabstractic\Data\Components\Path
Assign the path
NOTE: This should be a directory, NOT a file
If option Check has been specified we see if the directory actually exists.
$path |
Path does not exist (only thrown if Check option is set)
$this for chaining
addExtension( $extensions) : \Phabstractic\Data\Components\Resource\Phabstractic\Data\Components\Path
Add an allowed extension
This puts a extension or array of extensions into the list of allowed and looked for extensions when a filename is supplied to the path.
NOTE: Extensions preceding periods (the first only) are removed. '.some.extension' becomes 'some.extension'
$extensions |
$this for chaining
isFilename( $filename, $basePath = '', $reqExtension = '') : string|null
Find a particular filename in the path
This method returns a filename (or '' on failure) when a given filename is found in the path with an acceptable extension.
NOTE: Do not pass the required extension in $filename Use $reqExtension instead.
$filename | ||
$basePath | ||
$reqExtension |
The full path with extension, or null on failure