aoolication runners

This commit is contained in:
Yuri Kuznetsov
2020-07-12 19:11:53 +03:00
parent 269f2b4850
commit 1b61205281
19 changed files with 574 additions and 118 deletions
+2 -8
View File
@@ -27,19 +27,13 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
if (substr(php_sapi_name(), 0, 3) != 'cli') exit;
include "bootstrap.php";
ob_start();
$command = isset($_SERVER['argv'][1]) ? trim($_SERVER['argv'][1]) : null;
if (empty($command)) exit;
include "bootstrap.php";
$app = new \Espo\Core\Application();
$result = $app->runCommand($command);
$result = (new \Espo\Core\Application())->run('command');
if (is_string($result)) {
ob_end_clean();
echo $result;
}
exit;