function PsrCachedReader::getTraitLastModificationTime
1 call to PsrCachedReader::getTraitLastModificationTime()
- PsrCachedReader::getLastModification in vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ PsrCachedReader.php - Returns the time the class was last modified, testing traits and parents
File
-
vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ PsrCachedReader.php, line 214
Class
- PsrCachedReader
- A cache aware annotation reader.
Namespace
Doctrine\Common\AnnotationsCode
private function getTraitLastModificationTime(ReflectionClass $reflectionTrait) : int {
$fileName = $reflectionTrait->getFileName();
if (isset($this->loadedFilemtimes[$fileName])) {
return $this->loadedFilemtimes[$fileName];
}
$lastModificationTime = max(array_merge([
$fileName !== false && is_file($fileName) ? filemtime($fileName) : 0,
], array_map(function (ReflectionClass $reflectionTrait) : int {
return $this->getTraitLastModificationTime($reflectionTrait);
}, $reflectionTrait->getTraits())));
assert($lastModificationTime !== false);
return $this->loadedFilemtimes[$fileName] = $lastModificationTime;
}