php-cooper-symfony

CascGlobResource
in package
implements SelfCheckingResourceInterface

FinalYes

One CASC glob import (`import "packages/*.casc"`) as a container resource: fresh while the pattern matches the files it matched when the container was built.

Symfony's own GlobResource is not used because CASC's patterns are Cooper's (CASC.md ยง5.1) -- the expansion that decides freshness must be the one the load used, which ImportGlob::changed() is. A file changed in place is the FileResource beside this one's concern.

Table of Contents

Interfaces

SelfCheckingResourceInterface

Properties

$glob  : ImportGlob

Methods

__construct()  : mixed
__toString()  : string
isFresh()  : bool

Properties

Methods

__construct()

public __construct(ImportGlob $glob) : mixed
Parameters
$glob : ImportGlob

the import's expansion when the container was built

__toString()

public __toString() : string
Return values
string —

the import, unique per root and pattern

isFresh()

public isFresh(int $timestamp) : bool
Parameters
$timestamp : int

unused: a glob's answer does not depend on time

Return values
bool —

whether the pattern still matches exactly the same files

On this page

Search results