protected function readFile($filename, $uuid = null)
    {
        // Check for cache enabled ...
        if ($this->getCache() === true) {
            if ($uuid === null) {
                $uuid = md5($filename);
            }

            try {
                $content = $this->getCacheService()->read($uuid);

                if ($content !== null && $content != '') {
                    return $content;
                }
            } catch (Doozr_Cache_Service_Exception $e) {
                // Intentionally omitted
            }
        }

        // Fetch content from filesystem
        $content = $this->getFilesystem()->read($filename);

        // Check if caching enabled and store read result to cache
        if ($this->getCache() === true) {
            $this->getCacheService()->create($uuid, $content);
        }

        return $content;
    }
protected function readFile($filename, $uuid = null)
    {
        // Check for cache enabled ...
        if ($this->getCache() === true) {
            if ($uuid === null) {
                $uuid = md5($filename);
            }

            try {
                $content = $this->getCacheService()->read($uuid);

                if ($content !== null && $content != '') {
                    return $content;
                }
            } catch (Doozr_Cache_Service_Exception $e) {
                // Intentionally omitted
            }
        }

        // Fetch content from filesystem
        $content = $this->getFilesystem()->read($filename);

        // Check if caching enabled and store read result to cache
        if ($this->getCache() === true) {
            $this->getCacheService()->create($uuid, $content);
        }

        return $content;
    }
protected function readFile ( $ filename , $ uuid = null ) { // Check for cache enabled ... if ( $ this -> getCache ( ) === true ) { if ( $ uuid === null ) { $ uuid = md5 ( $ filename ) ; } try { $ content = $ this -> getCacheService ( ) -> read ( $ uuid ) ; if ( $ content !== null && $ content != '' ) { return $ content ; } } catch ( Doozr_Cache_Service_Exception $ e ) { // Intentionally omitted } } // Fetch content from filesystem $ content = $ this -> getFilesystem ( ) -> read ( $ filename ) ; // Check if caching enabled and store read result to cache if ( $ this -> getCache ( ) === true ) { $ this -> getCacheService ( ) -> create ( $ uuid , $ content ) ; } return $ content ; }
Reads a configuration file.
When caching is enabled it will try to read the configuration from cache. If this fails
it will try to read from filesystem and storages it to cache afterwards.

When caching is disabled it will always try to load from filesystem

@param string $filename The filename
@param string $uuid     The UUID to read

@author Benjamin Carl <opensource@clickalicious.de>

@return string The content read
Reads a configuration file . When caching is enabled it will try to read the configuration from cache . If this fails it will try to read from filesystem and storages it to cache afterwards .