protected function _writeFile($destination, $data)
    {
        $destination = trim($destination);
        if(false === file_put_contents($destination, $data)) {
            throw new Mage_Exception("Can't write to file: " . $destination);
        }
        return true;
    }
protected function _writeFile($destination, $data)
    {
        $destination = trim($destination);
        if(false === file_put_contents($destination, $data)) {
            throw new Mage_Exception("Can't write to file: " . $destination);
        }
        return true;
    }
protected function _writeFile ( $ destination , $ data ) { $ destination = trim ( $ destination ) ; if ( false === file_put_contents ( $ destination , $ data ) ) { throw new Mage_Exception ( "Can't write to file: " . $ destination ) ; } return true ; }
Write data to file. If file can't be opened - throw exception

@param string $destination
@param string $data
@return boolean
@throws Mage_Exception
Write data to file . If file can t be opened - throw exception