src/Phassets/Deployers/FilesystemDeployer.php
public function deploy(Asset $asset)
    {
        $outputBasename = $this->computeOutputBasename($asset);
        $fullPath = $this->destinationPath . DIRECTORY_SEPARATOR . $outputBasename;

        $saving = file_put_contents($fullPath, $asset->getContents());

        if($saving === false) {
            throw new PhassetsInternalException(
                'file_put_contents() could not write to ' . $fullPath .
                '. It is writable?'
            );
        }

        $objectUrl = $this->baseUrl . '/' . $outputBasename;

        $asset->setOutputUrl($objectUrl);
    }
public function deploy(Asset $asset)
    {
        $outputBasename = $this->computeOutputBasename($asset);
        $fullPath = $this->destinationPath . DIRECTORY_SEPARATOR . $outputBasename;

        $saving = file_put_contents($fullPath, $asset->getContents());

        if($saving === false) {
            throw new PhassetsInternalException(
                'file_put_contents() could not write to ' . $fullPath .
                '. It is writable?'
            );
        }

        $objectUrl = $this->baseUrl . '/' . $outputBasename;

        $asset->setOutputUrl($objectUrl);
    }
public function deploy ( Asset $ asset ) { $ outputBasename = $ this -> computeOutputBasename ( $ asset ) ; $ fullPath = $ this -> destinationPath . DIRECTORY_SEPARATOR . $ outputBasename ; $ saving = file_put_contents ( $ fullPath , $ asset -> getContents ( ) ) ; if ( $ saving === false ) { throw new PhassetsInternalException ( 'file_put_contents() could not write to ' . $ fullPath . '. It is writable?' ) ; } $ objectUrl = $ this -> baseUrl . '/' . $ outputBasename ; $ asset -> setOutputUrl ( $ objectUrl ) ; }
Given an Asset instance, try to deploy is using internal
rules of this deployer and update Asset's property outputUrl.

@param Asset $asset Asset instance whose outputUrl property will be modified
@throws PhassetsInternalException If the deployment process fails
Given an Asset instance try to deploy is using internal rules of this deployer and update Asset s property outputUrl .