Prado\Caching\TDirectoryCacheDependency::generateTimestamps PHP Метод

generateTimestamps() защищенный Метод

This method may go recursively into subdirectories if {@link setRecursiveCheck RecursiveCheck} is set true.
protected generateTimestamps ( $directory, $level ) : array
Результат array list of file modification time indexed by the file path
    protected function generateTimestamps($directory, $level = 0)
    {
        if (($dir = opendir($directory)) === false) {
            throw new TIOException('directorycachedependency_directory_invalid', $directory);
        }
        $timestamps = array();
        while (($file = readdir($dir)) !== false) {
            $path = $directory . DIRECTORY_SEPARATOR . $file;
            if ($file === '.' || $file === '..') {
                continue;
            } else {
                if (is_dir($path)) {
                    if (($this->_recursiveLevel < 0 || $level < $this->_recursiveLevel) && $this->validateDirectory($path)) {
                        $timestamps = array_merge($this->generateTimestamps($path, $level + 1));
                    }
                } else {
                    if ($this->validateFile($path)) {
                        $timestamps[$path] = filemtime($path);
                    }
                }
            }
        }
        closedir($dir);
        return $timestamps;
    }