PHP Class Bolt\Filesystem\Matcher

Author: Carson Full ([email protected])
Mostra file Open project: bolt/bolt Class Usage Examples

Protected Properties

Property Type Description
$filesystem Bolt\Filesystem\FilesystemInterface
$filesystemsToCheck string[]

Public Methods

Method Description
__construct ( Bolt\Filesystem\FilesystemInterface $filesystem, array $filesystemsToCheck ) Constructor.
getFile ( Bolt\Filesystem\Handler\FileInterface | string $path ) : Bolt\Filesystem\Handler\FileInterface Gets the file object for the path given. Paths with the mount point included are preferred, but are not required for BC. If the mount point is not included a list of filesystems are checked and chosen if the file exists in that filesystem.
getImage ( Bolt\Filesystem\Handler\ImageInterface | string $path ) : Bolt\Filesystem\Handler\ImageInterface Same as {@see getFile} for images.

Private Methods

Method Description
containsMountPoint ( string $path ) : boolean Change if a path contains a mount point.

Method Details

__construct() public method

Constructor.
public __construct ( Bolt\Filesystem\FilesystemInterface $filesystem, array $filesystemsToCheck )
$filesystem Bolt\Filesystem\FilesystemInterface
$filesystemsToCheck array

getFile() public method

Gets the file object for the path given. Paths with the mount point included are preferred, but are not required for BC. If the mount point is not included a list of filesystems are checked and chosen if the file exists in that filesystem.
public getFile ( Bolt\Filesystem\Handler\FileInterface | string $path ) : Bolt\Filesystem\Handler\FileInterface
$path Bolt\Filesystem\Handler\FileInterface | string
return Bolt\Filesystem\Handler\FileInterface

getImage() public method

Same as {@see getFile} for images.
public getImage ( Bolt\Filesystem\Handler\ImageInterface | string $path ) : Bolt\Filesystem\Handler\ImageInterface
$path Bolt\Filesystem\Handler\ImageInterface | string
return Bolt\Filesystem\Handler\ImageInterface

Property Details

$filesystem protected_oe property

protected FilesystemInterface,Bolt\Filesystem $filesystem
return Bolt\Filesystem\FilesystemInterface

$filesystemsToCheck protected_oe property

protected string[] $filesystemsToCheck
return string[]