src/Assets.php
public function setAssetDir($assetDir)
    {
        $emptyAssetDir = empty($assetDir);
        $folderNotExists = ! file_exists($this->docRoot . DS . $assetDir);
        $folderNotDir = ! is_dir($this->docRoot . DS . $assetDir);

        if ($emptyAssetDir || $folderNotExists || $folderNotDir) {
            throw new \InvalidArgumentException(
                'The asset directory set is not a valid directory.'
            );
        }

        if (! is_writable($this->docRoot . DS . $assetDir)) {
            throw new \LogicException(
                'The folder "' . $this->docRoot . DS . $assetDir . '" must be writable.'
            );
        }
        $this->assetDir = $assetDir;
    }
public function setAssetDir($assetDir)
    {
        $emptyAssetDir = empty($assetDir);
        $folderNotExists = ! file_exists($this->docRoot . DS . $assetDir);
        $folderNotDir = ! is_dir($this->docRoot . DS . $assetDir);

        if ($emptyAssetDir || $folderNotExists || $folderNotDir) {
            throw new \InvalidArgumentException(
                'The asset directory set is not a valid directory.'
            );
        }

        if (! is_writable($this->docRoot . DS . $assetDir)) {
            throw new \LogicException(
                'The folder "' . $this->docRoot . DS . $assetDir . '" must be writable.'
            );
        }
        $this->assetDir = $assetDir;
    }
public function setAssetDir ( $ assetDir ) { $ emptyAssetDir = empty ( $ assetDir ) ; $ folderNotExists = ! file_exists ( $ this -> docRoot . DS . $ assetDir ) ; $ folderNotDir = ! is_dir ( $ this -> docRoot . DS . $ assetDir ) ; if ( $ emptyAssetDir || $ folderNotExists || $ folderNotDir ) { throw new \ InvalidArgumentException ( 'The asset directory set is not a valid directory.' ) ; } if ( ! is_writable ( $ this -> docRoot . DS . $ assetDir ) ) { throw new \ LogicException ( 'The folder "' . $ this -> docRoot . DS . $ assetDir . '" must be writable.' ) ; } $ this -> assetDir = $ assetDir ; }
set the asset container folder

@param   string    set the asset directory
@throws  \InvalidArgumentException
@throws  \LogicException
set the asset container folder