ResourceCheckerInterface::supports()

bool supports(ResourceInterface $metadata) Queries the ResourceChecker whether it can validate a given resource or not. Parameters ResourceInterface $metadata The resource to be checked for freshness Return Value bool True if the ResourceChecker can handle this resource type, false if not

ResourceCheckerInterface::isFresh()

bool isFresh(ResourceInterface $resource, int $timestamp) Validates the resource. Parameters ResourceInterface $resource The resource to be validated int $timestamp The timestamp at which the cache associated with this resource was created Return Value bool True if the resource has not changed since the given timestamp, false otherwise

ResourceCheckerInterface

interface ResourceCheckerInterface Interface for ResourceCheckers. When a ResourceCheckerConfigCache instance is checked for freshness, all its associated metadata resources are passed to ResourceCheckers. The ResourceCheckers can then inspect the resources and decide whether the cache can be considered fresh or not. Methods bool supports(ResourceInterface $metadata) Queries the ResourceChecker whether it can validate a given resource or not. bool isFresh(ResourceInterface $resource

ResourceCheckerConfigCacheFactory

class ResourceCheckerConfigCacheFactory implements ConfigCacheFactoryInterface A ConfigCacheFactory implementation that validates the cache with an arbitrary set of ResourceCheckers. Methods __construct(array $resourceCheckers = array()) ConfigCacheInterface cache(string $file, $callback) Creates a cache instance and (re-)initializes it if necessary. Details __construct(array $resourceCheckers = array()) Parameters array $resourceChecker

ResourceCheckerConfigCache::write()

write(string $content, array $metadata = null) Writes cache. Parameters string $content The content to write into the cache array $metadata An array of ResourceInterface instances Exceptions RuntimeException When cache file can't be written

ResourceCheckerConfigCache::isFresh()

bool isFresh() Checks if the cache is still fresh. This implementation will make a decision solely based on the ResourceCheckers passed in the constructor. The first ResourceChecker that supports a given resource is considered authoritative. Resources with no matching ResourceChecker will silently be ignored and considered fresh. Return Value bool Whether the cache is still fresh.

ResourceCheckerConfigCache::getPath()

string getPath() Gets the cache file path. Return Value string The cache file path

ResourceCheckerConfigCache

class ResourceCheckerConfigCache implements ConfigCacheInterface ResourceCheckerConfigCache uses instances of ResourceCheckerInterface to check whether cached data is still fresh. Methods __construct(string $file, array $resourceCheckers = array()) string getPath() Gets the cache file path. bool isFresh() Checks if the cache is still fresh. write(string $content, array $metadata = null) Writes cache. Details __construct(string $file, array

ResourceCaster::castStreamContext()

static castStreamContext($stream, array $a, Stub $stub, $isNested) Parameters $stream array $a Stub $stub $isNested

ResourceCaster::castStream()

static castStream($stream, array $a, Stub $stub, $isNested) Parameters $stream array $a Stub $stub $isNested