abstract class AbstractRequestProcessor in Monolog 8
Same name and namespace in other branches
- 2.x src/Logger/Processor/AbstractRequestProcessor.php \Drupal\monolog\Logger\Processor\AbstractRequestProcessor
Base class for all processors that needs access to request data.
Hierarchy
- class \Drupal\monolog\Logger\Processor\AbstractRequestProcessor
Expanded class hierarchy of AbstractRequestProcessor
File
- src/
Logger/ Processor/ AbstractRequestProcessor.php, line 10
Namespace
Drupal\monolog\Logger\ProcessorView source
abstract class AbstractRequestProcessor {
/**
* @var \Symfony\Component\HttpFoundation\RequestStack
*/
private $requestStack;
/**
* RequestProcessor constructor.
*
* @param \Symfony\Component\HttpFoundation\RequestStack
*/
public function __construct(RequestStack $requestStack) {
$this->requestStack = $requestStack;
}
/**
* @return null|\Symfony\Component\HttpFoundation\Request
*/
public function getRequest() {
if ($this->requestStack && ($request = $this->requestStack
->getCurrentRequest())) {
return $request;
}
return NULL;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AbstractRequestProcessor:: |
private | property | ||
AbstractRequestProcessor:: |
public | function | ||
AbstractRequestProcessor:: |
public | function | RequestProcessor constructor. |