/**
  * Finds and initializes the phpDocumentor installation
  */
 private function initializePhpDocumentor()
 {
     $phpDocumentorPath = null;
     foreach (Phing::explodeIncludePath() as $path) {
         $testPhpDocumentorPath = $path . DIRECTORY_SEPARATOR . 'phpDocumentor' . DIRECTORY_SEPARATOR . 'src';
         if (file_exists($testPhpDocumentorPath)) {
             $phpDocumentorPath = $testPhpDocumentorPath;
         }
     }
     if (empty($phpDocumentorPath)) {
         throw new BuildException("Please make sure PhpDocumentor 2 is installed and on the include_path.", $this->getLocation());
     }
     set_include_path($phpDocumentorPath . PATH_SEPARATOR . get_include_path());
     require_once $phpDocumentorPath . '/phpDocumentor/Bootstrap.php';
     \phpDocumentor\Bootstrap::createInstance()->initialize();
     $this->phpDocumentorPath = $phpDocumentorPath;
 }
 /**
  * Finds and initializes the phpDocumentor installation
  */
 private function initializePhpDocumentor()
 {
     $phpDocumentorPath = $this->findPhpDocumentorPath();
     if (empty($phpDocumentorPath)) {
         throw new BuildException("Please make sure PhpDocumentor 2 is installed and on the include_path.");
     }
     set_include_path($phpDocumentorPath . PATH_SEPARATOR . get_include_path());
     require_once $phpDocumentorPath . '/phpDocumentor/Bootstrap.php';
     $this->app = \phpDocumentor\Bootstrap::createInstance()->initialize();
     $this->phpDocumentorPath = $phpDocumentorPath;
 }
Example #3
0
<?php

/**
 * phpDocumentor
 *
 * PHP Version 5
 *
 * @author    Mike van Riel <*****@*****.**>
 * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
 * @license   http://www.opensource.org/licenses/mit-license.php MIT
 * @link      http://phpdoc.org
 */
// @codingStandardsIgnoreFile
require_once __DIR__ . '/../../src/phpDocumentor/Bootstrap.php';
if (!defined('phpDocumentor\\PHPUnit\\TEMP_DIR')) {
    define('phpDocumentor\\PHPUnit\\TEMP_DIR', realpath(sys_get_temp_dir()));
}
\phpDocumentor\Bootstrap::createInstance()->initialize();
 /**
  * Finds and initializes the phpDocumentor installation
  */
 private function initializePhpDocumentor()
 {
     if (class_exists('Composer\\Autoload\\ClassLoader', false)) {
         if (!class_exists('phpDocumentor\\Bootstrap')) {
             throw new BuildException('You need to install PhpDocumentor 2 or add your include path to your composer installation.');
         }
         $phpDocumentorPath = '';
     } else {
         $phpDocumentorPath = $this->findPhpDocumentorPath();
         if (empty($phpDocumentorPath)) {
             throw new BuildException("Please make sure PhpDocumentor 2 is installed and on the include_path.");
         }
         set_include_path($phpDocumentorPath . PATH_SEPARATOR . get_include_path());
         require_once $phpDocumentorPath . '/phpDocumentor/Bootstrap.php';
     }
     $this->app = \phpDocumentor\Bootstrap::createInstance()->initialize();
     $this->phpDocumentorPath = $phpDocumentorPath;
 }