public function saveToFile($content, $additionalPath = '')
    {
        $path = $this->realPath($additionalPath);
        
        // If the path does not exists create the directory
        $this->createTargetDirectory($path);
        
        // If the file exists but isn't writeable we need to throw an exception
        if (file_exists($path) && !is_writable($path)) {
            throw new Exception('The file "' . $path . '" isn\'t writable!');
        }
        
        return file_put_contents($path, $content);
    }
public function saveToFile($content, $additionalPath = '')
    {
        $path = $this->realPath($additionalPath);
        
        // If the path does not exists create the directory
        $this->createTargetDirectory($path);
        
        // If the file exists but isn't writeable we need to throw an exception
        if (file_exists($path) && !is_writable($path)) {
            throw new Exception('The file "' . $path . '" isn\'t writable!');
        }
        
        return file_put_contents($path, $content);
    }
public function saveToFile ( $ content , $ additionalPath = '' ) { $ path = $ this -> realPath ( $ additionalPath ) ; // If the path does not exists create the directory $ this -> createTargetDirectory ( $ path ) ; // If the file exists but isn't writeable we need to throw an exception if ( file_exists ( $ path ) && ! is_writable ( $ path ) ) { throw new Exception ( 'The file "' . $ path . '" isn\'t writable!' ) ; } return file_put_contents ( $ path , $ content ) ; }
Saves the content to the file

@access public
@param string $content
@param string $additionalPath
@return integer

@throws Zepi\Turbo\Exception The file "$path" isn't writable!
Saves the content to the file