Zepi/Web/General/src/Manager/AssetCacheManager.php
protected function validateTypeCache($type, $files)
    {
        // If the files isn't cached we have to cache the file
        $hash = $this->getTypeHash($type);
        if (!isset($this->cachedFiles[$hash])) {
            return false;
        } 
        
        $data = $this->cachedFiles[$hash];
        $checksums = $data['checksums'];

        // Are all files existing?
        foreach ($files as $file) {
            if (!file_exists($file->getFileName())) {
                return false;
            }
            
            $fileHash = $this->getHash($file->getFileName());
            $contentHash = md5_file($file->getFileName());
            if (!isset($checksums[$fileHash]) || $contentHash !== $checksums[$fileHash]) {
                return false;
            }
        }
        
        return true;
    }
protected function validateTypeCache($type, $files)
    {
        // If the files isn't cached we have to cache the file
        $hash = $this->getTypeHash($type);
        if (!isset($this->cachedFiles[$hash])) {
            return false;
        } 
        
        $data = $this->cachedFiles[$hash];
        $checksums = $data['checksums'];

        // Are all files existing?
        foreach ($files as $file) {
            if (!file_exists($file->getFileName())) {
                return false;
            }
            
            $fileHash = $this->getHash($file->getFileName());
            $contentHash = md5_file($file->getFileName());
            if (!isset($checksums[$fileHash]) || $contentHash !== $checksums[$fileHash]) {
                return false;
            }
        }
        
        return true;
    }
protected function validateTypeCache ( $ type , $ files ) { // If the files isn't cached we have to cache the file $ hash = $ this -> getTypeHash ( $ type ) ; if ( ! isset ( $ this -> cachedFiles [ $ hash ] ) ) { return false ; } $ data = $ this -> cachedFiles [ $ hash ] ; $ checksums = $ data [ 'checksums' ] ; // Are all files existing? foreach ( $ files as $ file ) { if ( ! file_exists ( $ file -> getFileName ( ) ) ) { return false ; } $ fileHash = $ this -> getHash ( $ file -> getFileName ( ) ) ; $ contentHash = md5_file ( $ file -> getFileName ( ) ) ; if ( ! isset ( $ checksums [ $ fileHash ] ) || $ contentHash !== $ checksums [ $ fileHash ] ) { return false ; } } return true ; }
Validates the cache for an asset type. Return false, if the
cache isn't valid.

@access protected
@param string $type
@param array $files
@return boolean
Validates the cache for an asset type . Return false if the cache isn t valid .