CodeExplorer getTraitLastModificationTime example
$filename =
$class->
getFileName();
if (isset($this->loadedFilemtimes
[$filename])) { return $this->loadedFilemtimes
[$filename];
} $parent =
$class->
getParentClass();
$lastModification =
max(array_merge( [$filename ?
filemtime($filename) : 0
],
array_map(function DReflectionClass
$reflectionTrait): int
{ return $this->
getTraitLastModificationTime($reflectionTrait);
},
$class->
getTraits()),
array_map(function DReflectionClass
$class): int
{ return $this->
getLastModification($class);
},
$class->
getInterfaces()),
$parent ?
[$this->
getLastModification($parent)] :
[] ));
assert($lastModification !== false
);
return $this->loadedFilemtimes
[$filename] =
$lastModification;
} $filename =
$class->
getFileName();
if (isset($this->loadedFilemtimes
[$filename])) { return $this->loadedFilemtimes
[$filename];
} $parent =
$class->
getParentClass();
$lastModification =
max(array_merge( [$filename ?
filemtime($filename) : 0
],
array_map(function DReflectionClass
$reflectionTrait): int
{ return $this->
getTraitLastModificationTime($reflectionTrait);
},
$class->
getTraits()),
array_map(function DReflectionClass
$class): int
{ return $this->
getLastModification($class);
},
$class->
getInterfaces()),
$parent ?
[$this->
getLastModification($parent)] :
[] ));
assert($lastModification !== false
);
return $this->loadedFilemtimes
[$filename] =
$lastModification;
}