X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=bin%2Fconsole.php;h=0684f240e2113b8fe782f69f4ff536faeaf049e7;hb=8357a70c4bc7a104373be2ddde6e8d918ea5721b;hp=4c396854dc09c06564f5c4e86b01c645f49dfc5c;hpb=4c4ed63dca13cc0382af9020e69980c63f988b47;p=friendica.git diff --git a/bin/console.php b/bin/console.php index 4c396854dc..0684f240e2 100755 --- a/bin/console.php +++ b/bin/console.php @@ -1,10 +1,36 @@ #!/usr/bin/env php . + * + */ + +if (php_sapi_name() !== 'cli') { + header($_SERVER["SERVER_PROTOCOL"] . ' 403 Forbidden'); + exit(); +} use Dice\Dice; +use Psr\Log\LoggerInterface; require dirname(__DIR__) . '/vendor/autoload.php'; $dice = (new Dice())->addRules(include __DIR__ . '/../static/dependencies.config.php'); +$dice = $dice->addRule(LoggerInterface::class,['constructParams' => ['console']]); (new Friendica\Core\Console($dice, $argv))->execute();