src/Output/AssetWriter.php
public function write(AssetTarget $build, $content)
    {
        $ext = $build->ext();
        $path = $build->outputDir();

        if (!is_writable($path)) {
            throw new RuntimeException('Cannot write cache file. Unable to write to ' . $path);
        }
        $filename = $this->buildFileName($build);
        $success = file_put_contents($path . DIRECTORY_SEPARATOR . $filename, $content) !== false;
        $this->finalize($build);
        return $success;
    }
public function write(AssetTarget $build, $content)
    {
        $ext = $build->ext();
        $path = $build->outputDir();

        if (!is_writable($path)) {
            throw new RuntimeException('Cannot write cache file. Unable to write to ' . $path);
        }
        $filename = $this->buildFileName($build);
        $success = file_put_contents($path . DIRECTORY_SEPARATOR . $filename, $content) !== false;
        $this->finalize($build);
        return $success;
    }
public function write ( AssetTarget $ build , $ content ) { $ ext = $ build -> ext ( ) ; $ path = $ build -> outputDir ( ) ; if ( ! is_writable ( $ path ) ) { throw new RuntimeException ( 'Cannot write cache file. Unable to write to ' . $ path ) ; } $ filename = $ this -> buildFileName ( $ build ) ; $ success = file_put_contents ( $ path . DIRECTORY_SEPARATOR . $ filename , $ content ) !== false ; $ this -> finalize ( $ build ) ; return $ success ; }
Writes content into a file

@param AssetTarget $build The filename to write.
@param string $content The contents to write.
@throws RuntimeException
Writes content into a file