45 if ($entryIdentifier ===
'') {
46 throw new \InvalidArgumentException(
'The specified entry identifier must not be empty.', 1364205170);
49 throw new \InvalidArgumentException(
'Only absolute paths are allowed for the class loader, given path was: ' . $filePath, 1381923089);
51 if (!@file_exists($filePath)) {
52 throw new \InvalidArgumentException(
'The specified file path (' . $filePath .
') must exist.', 1364205235);
54 if (strtolower(substr($filePath, -4)) !==
'.php') {
55 throw new \InvalidArgumentException(
'The specified file (' . $filePath .
') must be a php file.', 1364205377);
57 if ($entryIdentifier !== basename($entryIdentifier)) {
58 throw new \InvalidArgumentException(
'The specified entry identifier (' . $entryIdentifier .
') must not contain a path segment.', 1364205166);
61 $this->
set($entryIdentifier, sprintf($this->requireFileTemplate, $filePath));
85 public function get($entryIdentifier) {
86 if ($entryIdentifier !== basename($entryIdentifier)) {
87 throw new \InvalidArgumentException(
'The specified entry identifier must not contain a path segment.', 1334756880);
90 if (!@file_exists($pathAndFilename)) {
93 return file_get_contents($pathAndFilename);
107 $fileContent = $this->
get($entryIdentifier);
108 if ($fileContent !== FALSE) {
109 $pattern =
'!^' . sprintf(preg_quote($this->requireFileTemplate),
'(.+)') .
'!i';
111 if (preg_match($pattern, $fileContent, $matches) === 1) {
112 $requireString = $matches[1];
127 public function has($entryIdentifier) {
128 if ($entryIdentifier !== basename($entryIdentifier)) {
129 throw new \InvalidArgumentException(
'The specified entry identifier must not contain a path segment.', 1334756879);
132 return @file_exists($pathAndFilename);
144 return @file_exists($cacheEntryPathAndFilename) === FALSE;
156 return @file_exists($pathAndFilename) ? array($pathAndFilename) : FALSE;
169 return @file_exists($pathAndFilename) ? require_once $pathAndFilename : FALSE;
getPathOfRequiredFileInCacheEntry($entryIdentifier)
requireOnce($entryIdentifier)
setLinkToPhpFile($entryIdentifier, $filePath)
setLinkToOtherCacheEntry($entryIdentifier, $otherEntryIdentifier)
if($list_of_literals) if(!empty($literals)) if(!empty($literals)) $result
Analyse literals to prepend the N char to them if their contents aren't numeric.
isCacheFileExpired($cacheEntryPathAndFilename)
findCacheFilesByIdentifier($entryIdentifier)
static isAbsolutePath($path)