private function getFile($directory, $content)
    {
        $hash = \md5($content);

        if (!\array_key_exists($hash, $this->files)) {
            $file = \tempnam($directory, '');
            $this->fs->dumpFile($file, $content);
            $this->files[$hash] = \basename($file);
        }

        return $this->files[$hash];
    }
private function getFile($directory, $content)
    {
        $hash = \md5($content);

        if (!\array_key_exists($hash, $this->files)) {
            $file = \tempnam($directory, '');
            $this->fs->dumpFile($file, $content);
            $this->files[$hash] = \basename($file);
        }

        return $this->files[$hash];
    }
private function getFile ( $ directory , $ content ) { $ hash = \ md5 ( $ content ) ; if ( ! \ array_key_exists ( $ hash , $ this -> files ) ) { $ file = \ tempnam ( $ directory , '' ) ; $ this -> fs -> dumpFile ( $ file , $ content ) ; $ this -> files [ $ hash ] = \ basename ( $ file ) ; } return $ this -> files [ $ hash ] ; }
Generate a file in a directory.

@param string $directory Targeted directory
@param string $content   Content of file

@return string Name of file generated
Generate a file in a directory .