return log as array
This commit is contained in:
parent
848d57765b
commit
43916041af
@ -1,34 +1,29 @@
|
|||||||
<?php
|
<?php
|
||||||
class phpdoc_md {
|
class phpdoc_md {
|
||||||
public static function run($inpath,$outpath){
|
public static function run($inpath,$outpath){
|
||||||
|
$result = array();
|
||||||
if (!file_exists($outpath->SERVERPATH())) {
|
if (!file_exists($outpath->SERVERPATH())) {
|
||||||
mkdir($outpath->SERVERPATH(), 0777, true);}
|
mkdir($outpath->SERVERPATH(), 0777, true);}
|
||||||
$named = array(
|
|
||||||
'lt' => '%c',
|
|
||||||
'index' => 'ApiIndex.md',
|
|
||||||
);
|
|
||||||
|
|
||||||
$parser = new \PHPDocMD\Parser($inpath->SERVERPATH());
|
$parser = new \PHPDocMD\Parser($inpath->SERVERPATH());
|
||||||
|
|
||||||
new INFO("Parsing structure.xml");
|
$result[] = 'Parsing structure.xml';
|
||||||
|
|
||||||
$classDefinitions = $parser->run();
|
$classDefinitions = $parser->run();
|
||||||
|
|
||||||
$templateDir = dirname(__FILE__) . '/phpdoc_md/templates/';
|
|
||||||
|
|
||||||
$generator = new \PHPDocMD\Generator(
|
$generator = new \PHPDocMD\Generator(
|
||||||
$classDefinitions,
|
$classDefinitions,
|
||||||
$outpath->SERVERPATH(),
|
$outpath->SERVERPATH(),
|
||||||
$templateDir,
|
dirname(__FILE__) . '/phpdoc_md/templates/',
|
||||||
$named['lt'],
|
'%c',
|
||||||
$named['index']
|
'ApiIndex.md'
|
||||||
);
|
);
|
||||||
|
|
||||||
new INFO("Generating pages");
|
$result[] = 'Generating pages';
|
||||||
|
|
||||||
$generator->run();
|
$generator->run();
|
||||||
|
|
||||||
new INFO("Complete");
|
$result[] = 'Complete';
|
||||||
return \SYSTEM\LOG\JsonResult::ok();
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user