code: protected function write( $stream, $text )
      {
          $fp = fopen( $stream, 'a' );
          fwrite( $fp, $text );
          fclose( $fp );
      }
docs: Write text to stream
  
  Write given text to given stream. Simple wrapper function to make class
  testable.
  
  @param string $stream
  @param string $text
  @return void