CoalescingDirectoryResource
in package
implements
IteratorResourceInterface
Coalesces multiple directories together into one merged resource.
Tags
Interfaces, Classes and Traits
- IteratorResourceInterface
- A resource is something formulae can be loaded from.
Table of Contents
- $directories : mixed
- __construct() : mixed
- __toString() : string
- Returns a string to uniquely identify the current resource.
- addDirectory() : mixed
- getContent() : mixed
- getIterator() : mixed
- isFresh() : mixed
- getRelativeName() : string
- Returns the relative version of a filename.
- getFileResources() : array<string|int, mixed>
- Performs the coalesce.
Properties
$directories
private
mixed
$directories
Methods
__construct()
public
__construct(mixed $directories) : mixed
Parameters
- $directories : mixed
Return values
mixed —__toString()
Returns a string to uniquely identify the current resource.
public
__toString() : string
Return values
string —An identifying string
addDirectory()
public
addDirectory(IteratorResourceInterface $directory) : mixed
Parameters
- $directory : IteratorResourceInterface
Return values
mixed —getContent()
public
getContent() : mixed
Return values
mixed —getIterator()
public
getIterator() : mixed
Return values
mixed —isFresh()
public
isFresh(mixed $timestamp) : mixed
Parameters
- $timestamp : mixed
Return values
mixed —getRelativeName()
Returns the relative version of a filename.
protected
getRelativeName(ResourceInterface $file, ResourceInterface $directory) : string
Parameters
- $file : ResourceInterface
-
The file
- $directory : ResourceInterface
-
The directory
Return values
string —The name to compare with files from other directories
getFileResources()
Performs the coalesce.
private
getFileResources() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array of file resources