protected function write($messages, $file)
    {
        $f = @fopen($file, 'a');
        if ($f === false)
        {
            throw new \Exception("Logfile $file is not writeable!");
        }

        foreach($messages as $msg)
        {
            fwrite($f, $msg);
        }

        fclose($f);
    }
protected function write($messages, $file)
    {
        $f = @fopen($file, 'a');
        if ($f === false)
        {
            throw new \Exception("Logfile $file is not writeable!");
        }

        foreach($messages as $msg)
        {
            fwrite($f, $msg);
        }

        fclose($f);
    }
protected function write ( $ messages , $ file ) { $ f = @ fopen ( $ file , 'a' ) ; if ( $ f === false ) { throw new \ Exception ( "Logfile $file is not writeable!" ) ; } foreach ( $ messages as $ msg ) { fwrite ( $ f , $ msg ) ; } fclose ( $ f ) ; }
Write text to file

@param array $messages
@param string $file

@throws Exception
Write text to file