public function open($filename, $mode = self::modeRead) {
    if (!in_array($mode, array(self::modeRead, self::modeWrite, self::modeReadWrite))) {
      throw new \Exception("Unkown file open mode");
    }

    $this->f = fopen($filename, $mode);

    return $this->f != false;
  }
public function open($filename, $mode = self::modeRead) {
    if (!in_array($mode, array(self::modeRead, self::modeWrite, self::modeReadWrite))) {
      throw new \Exception("Unkown file open mode");
    }

    $this->f = fopen($filename, $mode);

    return $this->f != false;
  }
public function open ( $ filename , $ mode = self :: modeRead ) { if ( ! in_array ( $ mode , array ( self :: modeRead , self :: modeWrite , self :: modeReadWrite ) ) ) { throw new \ Exception ( "Unkown file open mode" ) ; } $ this -> f = fopen ( $ filename , $ mode ) ; return $ this -> f != false ; }
Open a font file in a chosen mode

@param string $filename The file name of the font to open
@param string $mode     The opening mode

@throws \Exception
@return bool
Open a font file in a chosen mode