mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-21 00:26:10 +02:00
17 lines
296 B
PHP
17 lines
296 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace Monolog\Handler;
|
|
|
|
trait WebRequestRecognizerTrait
|
|
{
|
|
|
|
/**
|
|
* Checks if PHP's serving a web request
|
|
* @return bool
|
|
*/
|
|
protected function isWebRequest(): bool
|
|
{
|
|
return 'cli' !== \PHP_SAPI && 'phpdbg' !== \PHP_SAPI;
|
|
}
|
|
}
|