public function actionGenerateDocs()
{
if ($this->confirm('Regenerate documentation files into ./docs-html', true)) {
// array with commands
$commands = [];
$commands[] = 'vendor/bin/apidoc guide --interactive=0 docs web/apidocs';
$commands[] = 'vendor/bin/apidoc api --interactive=0 --exclude=runtime/,tests/ src,vendor/schmunk42 web/apidocs';
$commands[] = 'vendor/bin/apidoc guide --interactive=0 docs web/apidocs';
foreach ($commands as $command) {
$cmd = new Command($command);
if ($cmd->execute()) {
echo $cmd->getOutput();
} else {
echo $cmd->getOutput();
echo $cmd->getStdErr();
echo $cmd->getError();
}
}
}
}