4 * command-runner.php Handles the loading and running of OpenEMR commands that leverage the php namespaces.
5 * Preference would be to use something like Symfony/Console but we are attempting to avoid too many dependencies so
6 * we have written this simplified command runner for dev & openemr administration needs
8 * @link http://www.open-emr.org
9 * @author Stephen Nielson <stephen@nielson.org>
10 * @copyright Copyright (c) 2021 Stephen Nielson <stephen@nielson.org>
11 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
13 $rootPath = dirname(__DIR__
) . DIRECTORY_SEPARATOR
;
14 require_once $rootPath . 'vendor' . DIRECTORY_SEPARATOR
. 'autoload.php';
17 use OpenEMR\Common\Command\Runner\CommandRunner
;
19 if (php_sapi_name() !== 'cli') {
20 echo "Only php cli can execute a command\n";
24 $commandRunner = new CommandRunner($rootPath, pathinfo(__FILE__
, PATHINFO_FILENAME
));
25 $commandRunner->run();