diff --git a/autoload.inc b/autoload.inc index d2d2786..c4e80c4 100644 --- a/autoload.inc +++ b/autoload.inc @@ -1,3 +1,4 @@ 'phpdocumentor', + 'inpath' => new \SYSTEM\PLIB('phpdocumentor/'), + 'outpath' => new \SYSTEM\PLIB('phpdocumentor/docu/'), + 'inpath_md' => new \SYSTEM\PLIB('phpdocumentor/docu/structure.xml'), + 'outpath_md' => new \SYSTEM\PLIB('phpdocumentor/wiki/'), + 'cachepath' => new \SYSTEM\PLIB('phpdocumentor/docu/cache/'), + 'ignore' => array(), + 'sourcecode' => true, + 'parseprivate' => false, + 'title' => 'LIB - PHPDocumentor'); + } +} \ No newline at end of file diff --git a/lib/phpdocumentor.php b/lib/phpdocumentor.php index 70157d1..3d4bdb3 100644 --- a/lib/phpdocumentor.php +++ b/lib/phpdocumentor.php @@ -1,22 +1,27 @@ SERVERPATH())) { + mkdir($outpath->SERVERPATH(), 0777, true);} + if (!file_exists($cachepath->SERVERPATH())) { + mkdir($cachepath->SERVERPATH(), 0777, true);} + $result = shell_exec('php5 '.dirname(__FILE__).'/phpDocumentor.phar run'. ' -d '.$inpath->SERVERPATH(). ' -t '.$outpath->SERVERPATH(). + ' --template="responsive-twig" --template="xml"'. ' --cache-folder '.$cachepath->SERVERPATH(). ' '.$ignore_. ' '.$sourcecode_. ' '.$parseprivate_. ' --force'. - ' --title "'.$title.'" 2>&1')); - return \SYSTEM\LOG\JsonResult::ok(); + ' --title "'.$title.'" 2>&1'); + return \explode("\n", $result); } } \ No newline at end of file