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