src/CRUDlex/YamlReader.php
protected function writeToCache($fileName, $content)
    {
        if ($this->cachePath === null || !is_dir($this->cachePath) || !is_writable($this->cachePath)) {
            return;
        }
        $encoder    = new \Riimu\Kit\PHPEncoder\PHPEncoder();
        $contentPHP = $encoder->encode($content, [
            'whitespace' => false,
            'recursion.detect' => false
        ]);
        $cache      = '<?php $crudlexCacheContent = '.$contentPHP.';';
        file_put_contents($this->getCacheFile($fileName), $cache);
    }
protected function writeToCache($fileName, $content)
    {
        if ($this->cachePath === null || !is_dir($this->cachePath) || !is_writable($this->cachePath)) {
            return;
        }
        $encoder    = new \Riimu\Kit\PHPEncoder\PHPEncoder();
        $contentPHP = $encoder->encode($content, [
            'whitespace' => false,
            'recursion.detect' => false
        ]);
        $cache      = '<?php $crudlexCacheContent = '.$contentPHP.';';
        file_put_contents($this->getCacheFile($fileName), $cache);
    }
protected function writeToCache ( $ fileName , $ content ) { if ( $ this -> cachePath === null || ! is_dir ( $ this -> cachePath ) || ! is_writable ( $ this -> cachePath ) ) { return ; } $ encoder = new \ Riimu \ Kit \ PHPEncoder \ PHPEncoder ( ) ; $ contentPHP = $ encoder -> encode ( $ content , [ 'whitespace' => false , 'recursion.detect' => false ] ) ; $ cache = '<?php $crudlexCacheContent = ' . $ contentPHP . ';' ; file_put_contents ( $ this -> getCacheFile ( $ fileName ) , $ cache ) ; }
Writes the given content to a cached PHP file.

@param string $fileName
the original filename
@param array $content
the content to cache
Writes the given content to a cached PHP file .