Removed concept of execution context and piped CloseDbConnectionMiddleware always

This commit is contained in:
Alejandro Celaya
2018-12-07 19:46:46 +01:00
parent 8a23c90e46
commit c0bdd8fc77
5 changed files with 5 additions and 37 deletions

View File

@@ -1,18 +0,0 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Common\Exec;
use const PHP_SAPI;
use function Shlinkio\Shlink\Common\env;
abstract class ExecutionContext
{
public const WEB = 'shlink_web';
public const CLI = 'shlink_cli';
public static function currentContextIsSwoole(): bool
{
return PHP_SAPI === 'cli' && env('CURRENT_SHLINK_CONTEXT', self::WEB) === self::WEB;
}
}