示例#1
0
 /**
  * OpeС‚s and creates XML DOM tree.
  *
  * Sets error for YMLParser if cannot open file or xml is invalid
  *
  * @param string $filename Path to file
  *
  * @throws \Exception Throws exception if file doesn't exist or its size = 0
  *
  * @return bool
  */
 public function open($filename)
 {
     if (file_exists($filename) === false || filesize($filename) === 0) {
         throw new \Exception("File: {$filename} does not exist or empty.");
     }
     return $this->driver->open($filename);
 }