コード例 #1
0
ファイル: main.php プロジェクト: bmdevel/ezc
 /**
  * Tries to locate a file
  *
  * Tries to locate a file, referenced in a docbook document. If available
  * the document path is used a base for relative paths.
  *
  * @param string $file
  * @return string
  */
 public function locateFile($file)
 {
     if (!ezcBaseFile::isAbsolutePath($file)) {
         $file = $this->document->getPath() . $file;
     }
     if (!is_file($file)) {
         throw new ezcBaseFileNotFoundException($file);
     }
     return $file;
 }
コード例 #2
0
ファイル: docbook.php プロジェクト: axelmdev/ecommerce
 /**
  * Create document from docbook document
  *
  * A document of the docbook format is provided and the internal document
  * structure should be created out of this.
  *
  * This method is required for all formats to have one central format, so
  * that each format can be compiled into each other format using docbook as
  * an intermediate format.
  *
  * You may of course just call an existing converter for this conversion.
  *
  * @param ezcDocumentDocbook $document
  * @return void
  */
 public function createFromDocbook(ezcDocumentDocbook $document)
 {
     $this->path = $document->getPath();
     $this->document = $document->getDomDocument();
 }