/home/qenherkh/sites/jsesh/www/user/plugins/glyphs/glyphs.php
}
if ($pageTemplate != null) {
// create the glyphs page
$page = new Page;
$page->init(new \SplFileInfo(__DIR__ . '/pages/glyphs.md'));
$page->template($pageTemplate);
$page->isGlyphPlugin = true; // could be replaced by path examination.
unset($this->grav['page']);
$this->grav['page'] = $page;
}
}
/**
* process request and prepare page content.
*/
public function onPageInitialized() {
/** @var Page $page */
$page = $this->grav['page'];
if (isset($page->isGlyphPlugin)) {
$language = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
$this->dispatchSearchRequest();
}
}
// /glyphs list of catalogues
// /glyphs/catalog/1 : a given catalog
// /glyphs/collection/1 : a collection (list)
// /glyphs/collection/1/zip : a collection (send zip file).
// /glyphs/zip/ZIPNAME : sends back the zip file for a collection.
// /glyphs/zip/ZIPNAME/CODE/(svg|png) : sends back a svg or png file for a sign in zip file.
public function dispatchSearchRequest() {
$path = $this->grav["uri"]->paths();
$this->prepareSearchForm();
if (count($path) === 1) {
$this->displayCatalogList();
} else {
switch ($path[1]) {
case "catalog":
$this->dispatchCatalog($path);
Arguments
"Undefined array key "HTTP_ACCEPT_LANGUAGE""
/home/qenherkh/sites/jsesh/www/user/plugins/glyphs/glyphs.php
}
if ($pageTemplate != null) {
// create the glyphs page
$page = new Page;
$page->init(new \SplFileInfo(__DIR__ . '/pages/glyphs.md'));
$page->template($pageTemplate);
$page->isGlyphPlugin = true; // could be replaced by path examination.
unset($this->grav['page']);
$this->grav['page'] = $page;
}
}
/**
* process request and prepare page content.
*/
public function onPageInitialized() {
/** @var Page $page */
$page = $this->grav['page'];
if (isset($page->isGlyphPlugin)) {
$language = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
$this->dispatchSearchRequest();
}
}
// /glyphs list of catalogues
// /glyphs/catalog/1 : a given catalog
// /glyphs/collection/1 : a collection (list)
// /glyphs/collection/1/zip : a collection (send zip file).
// /glyphs/zip/ZIPNAME : sends back the zip file for a collection.
// /glyphs/zip/ZIPNAME/CODE/(svg|png) : sends back a svg or png file for a sign in zip file.
public function dispatchSearchRequest() {
$path = $this->grav["uri"]->paths();
$this->prepareSearchForm();
if (count($path) === 1) {
$this->displayCatalogList();
} else {
switch ($path[1]) {
case "catalog":
$this->dispatchCatalog($path);
Arguments
2
"Undefined array key "HTTP_ACCEPT_LANGUAGE""
"/home/qenherkh/sites/jsesh/www/user/plugins/glyphs/glyphs.php"
123
/home/qenherkh/sites/jsesh/www/vendor/symfony/event-dispatcher/EventDispatcher.php
foreach ($listeners as $listener) {
if ($stoppable && $event->isPropagationStopped()) {
break;
}
// @deprecated: the ternary operator is part of a BC layer and should be removed in 5.0
$listener($listener instanceof WrappedListener ? new LegacyEventProxy($event) : $event, $eventName, $this);
}
}
/**
* @deprecated since Symfony 4.3, use callListeners() instead
*/
protected function doDispatch($listeners, $eventName, Event $event)
{
foreach ($listeners as $listener) {
if ($event->isPropagationStopped()) {
break;
}
$listener($event, $eventName, $this);
}
}
/**
* Sorts the internal list of listeners for the given event by priority.
*/
private function sortListeners(string $eventName)
{
krsort($this->listeners[$eventName]);
$this->sorted[$eventName] = [];
foreach ($this->listeners[$eventName] as &$listeners) {
foreach ($listeners as $k => &$listener) {
if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) {
$listener[0] = $listener[0]();
$listener[1] = $listener[1] ?? '__invoke';
}
$this->sorted[$eventName][] = $listener;
}
}
Arguments
RocketTheme\Toolbox\Event\Event {#236}
"onPageInitialized"
Symfony\Component\EventDispatcher\EventDispatcher {#112
-listeners: array:21 [
"onPluginsInitialized" => array:3 [
100002 => array:1 [
0 => array:2 [
0 => Grav\Plugin\ProblemsPlugin {#100}
1 => "autoload"
]
]
100001 => array:2 [
0 => array:2 [
0 => Grav\Plugin\MarkdownNoticesPlugin {#99}
1 => "autoload"
]
1 => array:2 [
0 => Grav\Plugin\ProblemsPlugin {#100}
1 => "onPluginsInitialized"
]
]
0 => array:4 [
0 => array:2 [
0 => Grav\Plugin\EmailPlugin {#93}
1 => "onPluginsInitialized"
]
1 => array:2 [
0 => Grav\Plugin\FormPlugin {#97}
1 => "onPluginsInitialized"
]
2 => array:2 [
0 => Grav\Plugin\GlyphsPlugin {#98}
1 => "onPluginsInitialized"
]
3 => array:2 [
0 => Grav\Plugin\SimplesearchPlugin {#101}
1 => "onPluginsInitialized"
]
]
]
"onFormProcessed" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\EmailPlugin {#93}
1 => "onFormProcessed"
]
]
]
"onTwigTemplatePaths" => array:2 [
0 => array:5 [
0 => array:2 [
0 => Grav\Plugin\EmailPlugin {#93}
1 => "onTwigTemplatePaths"
]
1 => array:2 [
0 => Grav\Plugin\FormPlugin {#97}
1 => "onTwigTemplatePaths"
]
2 => array:2 [
0 => Grav\Plugin\GlyphsPlugin {#98}
1 => "onTwigTemplatePaths"
]
3 => array:2 [
0 => Grav\Plugin\SimplesearchPlugin {#101}
1 => "onTwigTemplatePaths"
]
4 => array:2 [
0 => Grav\Plugin\GlyphsPlugin {#98}
1 => "onTwigTemplatePaths"
]
]
-10 => array:1 [
0 => array:2 [
0 => Grav\Plugin\ErrorPlugin {#96}
1 => "onTwigTemplatePaths"
]
]
]
"onSchedulerInitialized" => array:1 [
0 => array:3 [
0 => array:2 [
0 => Grav\Plugin\EmailPlugin {#93}
1 => "onSchedulerInitialized"
]
1 => array:2 [
0 => Grav\Common\Cache {#135}
1 => "onSchedulerInitialized"
]
2 => array:2 [
0 => Grav\Common\Backup\Backups {#163}
1 => "onSchedulerInitialized"
]
]
]
"onAdminSave" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\EmailPlugin {#93}
1 => "onAdminSave"
]
]
]
"onCliInitialize" => array:1 [
100000 => array:1 [
0 => array:2 [
0 => Grav\Plugin\ErrorPlugin {#96}
1 => "autoload"
]
]
]
"onPageNotFound" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\ErrorPlugin {#96}
1 => "onPageNotFound"
]
]
]
"onGetPageTemplates" => array:1 [
0 => array:2 [
0 => array:2 [
0 => Grav\Plugin\ErrorPlugin {#96}
1 => "onGetPageTemplates"
]
1 => array:2 [
0 => Grav\Plugin\SimplesearchPlugin {#101}
1 => "onGetPageTemplates"
]
]
]
"onDisplayErrorPage.404" => array:1 [
-1 => array:1 [
0 => array:2 [
0 => Grav\Plugin\ErrorPlugin {#96}
1 => "onDisplayErrorPage404"
]
]
]
"onTwigExtensions" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\FormPlugin {#97}
1 => "onTwigExtensions"
]
]
]
"onPagesInitialized" => array:1 [
0 => array:4 [
0 => array:2 [
0 => Grav\Plugin\GlyphsPlugin {#98}
1 => "onPagesInitialized"
]
1 => array:2 [
0 => Grav\Plugin\FormPlugin {#97}
1 => "onPagesInitialized"
]
2 => array:2 [
0 => Grav\Plugin\GlyphsPlugin {#98}
1 => "onPagesInitialized"
]
3 => array:2 [
0 => Grav\Plugin\SimplesearchPlugin {#101}
1 => "onPagesInitialized"
]
]
]
"onPageInitialized" => array:1 [
0 => array:3 [
0 => array:2 [
0 => Grav\Plugin\GlyphsPlugin {#98}
1 => "onPageInitialized"
]
1 => array:2 [
0 => Grav\Plugin\FormPlugin {#97}
1 => "onPageInitialized"
]
2 => array:2 [
0 => Grav\Plugin\GlyphsPlugin {#98}
1 => "onPageInitialized"
]
]
]
"onMarkdownInitialized" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\MarkdownNoticesPlugin {#99}
1 => "onMarkdownInitialized"
]
]
]
"onTwigSiteVariables" => array:1 [
0 => array:3 [
0 => array:2 [
0 => Grav\Plugin\MarkdownNoticesPlugin {#99}
1 => "onTwigSiteVariables"
]
1 => array:2 [
0 => Grav\Plugin\FormPlugin {#97}
1 => "onTwigVariables"
]
2 => array:2 [
0 => Grav\Plugin\SimplesearchPlugin {#101}
1 => "onTwigSiteVariables"
]
]
]
"onAdminGenerateReports" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\ProblemsPlugin {#100}
1 => "onAdminGenerateReports"
]
]
]
"onAdminCompilePresetSCSS" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\ProblemsPlugin {#100}
1 => "onAdminCompilePresetSCSS"
]
]
]
"onFatalException" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\ProblemsPlugin {#100}
1 => "onFatalException"
]
]
]
"onPageProcessed" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\FormPlugin {#97}
1 => "onPageProcessed"
]
]
]
"onTwigInitialized" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\FormPlugin {#97}
1 => "onTwigInitialized"
]
]
]
"onTwigPageVariables" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\FormPlugin {#97}
1 => "onTwigVariables"
]
]
]
"onFormValidationProcessed" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\FormPlugin {#97}
1 => "onFormValidationProcessed"
]
]
]
]
-sorted: []
-optimized: array:9 [
"onPluginsInitialized" => array:7 [
0 => Grav\Plugin\ProblemsPlugin::autoload(): ClassLoader {#127 …4}
1 => Grav\Plugin\MarkdownNoticesPlugin::autoload() {#128 …3}
2 => Grav\Plugin\ProblemsPlugin::onPluginsInitialized(): void {#129 …4}
3 => Grav\Plugin\EmailPlugin::onPluginsInitialized() {#130 …3}
4 => Grav\Plugin\FormPlugin::onPluginsInitialized(): void {#131 …4}
5 => Grav\Plugin\GlyphsPlugin::onPluginsInitialized() {#132 …3}
6 => Grav\Plugin\SimplesearchPlugin::onPluginsInitialized() {#133 …3}
]
"onSchedulerInitialized" => array:3 [
0 => Grav\Plugin\EmailPlugin::onSchedulerInitialized(Event $e) {#168 …3}
1 => Grav\Common\Cache::onSchedulerInitialized(Event $event) {#169 …3}
2 => Grav\Common\Backup\Backups::onSchedulerInitialized(Event $event) {#170 …3}
]
"onTwigTemplatePaths" => array:6 [
0 => Grav\Plugin\EmailPlugin::onTwigTemplatePaths() {#204 …3}
1 => Grav\Plugin\FormPlugin::onTwigTemplatePaths(): void {#205 …4}
2 => Grav\Plugin\GlyphsPlugin::onTwigTemplatePaths() {#206 …3}
3 => Grav\Plugin\SimplesearchPlugin::onTwigTemplatePaths() {#207 …3}
4 => Grav\Plugin\GlyphsPlugin::onTwigTemplatePaths() {#208 …3}
5 => Grav\Plugin\ErrorPlugin::onTwigTemplatePaths(): void {#209 …4}
]
"onTwigInitialized" => array:1 [
0 => Grav\Plugin\FormPlugin::onTwigInitialized(): void {#221 …4}
]
"onTwigExtensions" => array:1 [
0 => Grav\Plugin\FormPlugin::onTwigExtensions(): void {#229 …4}
]
"onPageProcessed" => array:1 [
0 => Grav\Plugin\FormPlugin::onPageProcessed(Event $event): void {#258 …4}
]
"onPagesInitialized" => array:4 [
0 => Grav\Plugin\GlyphsPlugin::onPagesInitialized() {#248 …3}
1 => Grav\Plugin\FormPlugin::onPagesInitialized(): void {#247 …4}
2 => Grav\Plugin\GlyphsPlugin::onPagesInitialized() {#246 …3}
3 => Grav\Plugin\SimplesearchPlugin::onPagesInitialized() {#245 …3}
]
"onPageInitialized" => array:3 [
0 => Grav\Plugin\GlyphsPlugin::onPageInitialized() {#238 …3}
1 => Grav\Plugin\FormPlugin::onPageInitialized(): void {#244 …4}
2 => Grav\Plugin\GlyphsPlugin::onPageInitialized() {#240 …3}
]
"onFatalException" => array:1 [
0 => Grav\Plugin\ProblemsPlugin::onFatalException(): void {#158 …4}
]
]
}
/home/qenherkh/sites/jsesh/www/vendor/symfony/event-dispatcher/EventDispatcher.php
} else {
$this->removeListener($eventName, [$subscriber, \is_string($params) ? $params : $params[0]]);
}
}
}
/**
* Triggers the listeners of an event.
*
* This method can be overridden to add functionality that is executed
* for each listener.
*
* @param callable[] $listeners The event listeners
* @param string $eventName The name of the event to dispatch
* @param object $event The event object to pass to the event handlers/listeners
*/
protected function callListeners(iterable $listeners, string $eventName, $event)
{
if ($event instanceof Event) {
$this->doDispatch($listeners, $eventName, $event);
return;
}
$stoppable = $event instanceof ContractsEvent || $event instanceof StoppableEventInterface;
foreach ($listeners as $listener) {
if ($stoppable && $event->isPropagationStopped()) {
break;
}
// @deprecated: the ternary operator is part of a BC layer and should be removed in 5.0
$listener($listener instanceof WrappedListener ? new LegacyEventProxy($event) : $event, $eventName, $this);
}
}
/**
* @deprecated since Symfony 4.3, use callListeners() instead
*/
protected function doDispatch($listeners, $eventName, Event $event)
{
Arguments
array:3 [
0 => Grav\Plugin\GlyphsPlugin::onPageInitialized() {#238 …3}
1 => Grav\Plugin\FormPlugin::onPageInitialized(): void {#244 …4}
2 => Grav\Plugin\GlyphsPlugin::onPageInitialized() {#240 …3}
]
"onPageInitialized"
RocketTheme\Toolbox\Event\Event {#236}
/home/qenherkh/sites/jsesh/www/vendor/symfony/event-dispatcher/EventDispatcher.php
if (\is_object($event)) {
$eventName = $eventName ?? \get_class($event);
} elseif (\is_string($event) && (null === $eventName || $eventName instanceof ContractsEvent || $eventName instanceof Event)) {
@trigger_error(sprintf('Calling the "%s::dispatch()" method with the event name as the first argument is deprecated since Symfony 4.3, pass it as the second argument and provide the event object as the first argument instead.', EventDispatcherInterface::class), \E_USER_DEPRECATED);
$swap = $event;
$event = $eventName ?? new Event();
$eventName = $swap;
} else {
throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an object, "%s" given.', EventDispatcherInterface::class, \is_object($event) ? \get_class($event) : \gettype($event)));
}
if (null !== $this->optimized && null !== $eventName) {
$listeners = $this->optimized[$eventName] ?? (empty($this->listeners[$eventName]) ? [] : $this->optimizeListeners($eventName));
} else {
$listeners = $this->getListeners($eventName);
}
if ($listeners) {
$this->callListeners($listeners, $eventName, $event);
}
return $event;
}
/**
* {@inheritdoc}
*/
public function getListeners($eventName = null)
{
if (null !== $eventName) {
if (empty($this->listeners[$eventName])) {
return [];
}
if (!isset($this->sorted[$eventName])) {
$this->sortListeners($eventName);
}
return $this->sorted[$eventName];
Arguments
array:3 [
0 => Grav\Plugin\GlyphsPlugin::onPageInitialized() {#238 …3}
1 => Grav\Plugin\FormPlugin::onPageInitialized(): void {#244 …4}
2 => Grav\Plugin\GlyphsPlugin::onPageInitialized() {#240 …3}
]
"onPageInitialized"
RocketTheme\Toolbox\Event\Event {#236}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Common/Grav.php
return $event;
}
/**
* Fires an event with optional parameters.
*
* @param string $eventName
* @param Event|null $event
* @return Event
*/
public function fireEvent($eventName, Event $event = null)
{
/** @var EventDispatcherInterface $events */
$events = $this['events'];
if (null === $event) {
$event = new Event();
}
$timestamp = microtime(true);
$events->dispatch($event, $eventName);
/** @var Debugger $debugger */
$debugger = $this['debugger'];
$debugger->addEvent($eventName, $event, $events, $timestamp);
return $event;
}
/**
* Set the final content length for the page and flush the buffer
*
* @return void
*/
public function shutdown(): void
{
// Prevent user abort allowing onShutdown event to run without interruptions.
if (function_exists('ignore_user_abort')) {
@ignore_user_abort(true);
}
Arguments
RocketTheme\Toolbox\Event\Event {#236}
"onPageInitialized"
/home/qenherkh/sites/jsesh/www/system/src/Grav/Common/Processors/PagesProcessor.php
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$this->startTimer();
// Dump Cache state
$this->container['debugger']->addMessage($this->container['cache']->getCacheStatus());
$this->container['pages']->init();
$route = $this->container['route'];
$this->container->fireEvent('onPagesInitialized', new Event(
[
'pages' => $this->container['pages'],
'route' => $route,
'request' => $request
]
));
$this->container->fireEvent('onPageInitialized', new Event(
[
'page' => $this->container['page'],
'route' => $route,
'request' => $request
]
));
/** @var PageInterface $page */
$page = $this->container['page'];
if (!$page->routable()) {
$exception = new RequestException($request, 'Page Not Found', 404);
// If no page found, fire event
$event = new PageEvent([
'page' => $page,
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
'exception' => $exception,
'route' => $route,
'request' => $request
Arguments
"onPageInitialized"
RocketTheme\Toolbox\Event\Event {#236}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#156}
Grav\Framework\RequestHandler\RequestHandler {#234}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#156}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Common/Processors/TwigProcessor.php
*/
class TwigProcessor extends ProcessorBase
{
/** @var string */
public $id = 'twig';
/** @var string */
public $title = 'Twig';
/**
* @param ServerRequestInterface $request
* @param RequestHandlerInterface $handler
* @return ResponseInterface
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$this->startTimer();
$this->container['twig']->init();
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#156}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#156}
Grav\Framework\RequestHandler\RequestHandler {#201}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#156}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Common/Processors/AssetsProcessor.php
class AssetsProcessor extends ProcessorBase
{
/** @var string */
public $id = '_assets';
/** @var string */
public $title = 'Assets';
/**
* @param ServerRequestInterface $request
* @param RequestHandlerInterface $handler
* @return ResponseInterface
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$this->startTimer();
$this->container['assets']->init();
$this->container->fireEvent('onAssetsInitialized');
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#156}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#156}
Grav\Framework\RequestHandler\RequestHandler {#198}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#156}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Common/Processors/SchedulerProcessor.php
class SchedulerProcessor extends ProcessorBase
{
/** @var string */
public $id = '_scheduler';
/** @var string */
public $title = 'Scheduler';
/**
* @param ServerRequestInterface $request
* @param RequestHandlerInterface $handler
* @return ResponseInterface
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$this->startTimer();
$scheduler = $this->container['scheduler'];
$this->container->fireEvent('onSchedulerInitialized', new Event(['scheduler' => $scheduler]));
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#156}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#156}
Grav\Framework\RequestHandler\RequestHandler {#165}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#156}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Common/Processors/BackupsProcessor.php
class BackupsProcessor extends ProcessorBase
{
/** @var string */
public $id = '_backups';
/** @var string */
public $title = 'Backups';
/**
* @param ServerRequestInterface $request
* @param RequestHandlerInterface $handler
* @return ResponseInterface
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$this->startTimer();
$backups = $this->container['backups'];
$backups->init();
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#156}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#156}
Grav\Framework\RequestHandler\RequestHandler {#162}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#156}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Common/Processors/TasksProcessor.php
$response = $handler->handle($request);
}
$this->stopTimer();
return $response;
} catch (NotFoundException $e) {
// Task not found: Let it pass through.
}
}
if ($task) {
$this->container->fireEvent('onTask.' . $task);
} elseif ($action) {
$this->container->fireEvent('onAction.' . $action);
}
}
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#156}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#156}
Grav\Framework\RequestHandler\RequestHandler {#160}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#156}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Common/Processors/RequestProcessor.php
$uri = $request->getUri();
$ext = mb_strtolower(Utils::pathinfo($uri->getPath(), PATHINFO_EXTENSION));
$request = $request
->withAttribute('grav', $this->container)
->withAttribute('time', $_SERVER['REQUEST_TIME_FLOAT'] ?? GRAV_REQUEST_TIME)
->withAttribute('route', Uri::getCurrentRoute()->withExtension($ext))
->withAttribute('referrer', $this->container['uri']->referrer());
$event = new RequestHandlerEvent(['request' => $request, 'handler' => $handler]);
/** @var RequestHandlerEvent $event */
$event = $this->container->fireEvent('onRequestHandlerInit', $event);
$response = $event->getResponse();
$this->stopTimer();
if ($response) {
return $response;
}
return $handler->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#156}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#156}
Grav\Framework\RequestHandler\RequestHandler {#154}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#65}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Common/Processors/ThemesProcessor.php
*/
class ThemesProcessor extends ProcessorBase
{
/** @var string */
public $id = 'themes';
/** @var string */
public $title = 'Themes';
/**
* @param ServerRequestInterface $request
* @param RequestHandlerInterface $handler
* @return ResponseInterface
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$this->startTimer();
$this->container['themes']->init();
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#65}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#65}
Grav\Framework\RequestHandler\RequestHandler {#141}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#65}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Common/Processors/PluginsProcessor.php
class PluginsProcessor extends ProcessorBase
{
/** @var string */
public $id = 'plugins';
/** @var string */
public $title = 'Initialize Plugins';
/**
* @param ServerRequestInterface $request
* @param RequestHandlerInterface $handler
* @return ResponseInterface
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$this->startTimer();
$grav = $this->container;
$grav->fireEvent('onPluginsInitialized');
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#65}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#65}
Grav\Framework\RequestHandler\RequestHandler {#125}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#65}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Common/Processors/InitializeProcessor.php
// Initialize URI (uses session, see issue #3269).
$this->initializeUri($config);
// Grav may return redirect response right away.
$redirectCode = (int)$config->get('system.pages.redirect_trailing_slash', 1);
if ($redirectCode) {
$response = $this->handleRedirectRequest($request, $redirectCode > 300 ? $redirectCode : null);
if ($response) {
$this->stopTimer('_init');
return $response;
}
}
$this->stopTimer('_init');
// Wrap call to next handler so that debugger can profile it.
/** @var Response $response */
$response = $debugger->profile(static function () use ($handler, $request) {
return $handler->handle($request);
});
// Log both request and response and return the response.
return $debugger->logRequest($request, $response);
}
public function processCli(): void
{
// Load configuration.
$config = $this->initializeConfig();
// Initialize logger.
$this->initializeLogger($config);
// Disable debugger.
$this->container['debugger']->enabled(false);
// Set timezone, locale.
$this->initializeLocale($config);
Arguments
Nyholm\Psr7\ServerRequest {#65}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Common/Debugger.php
}
$this->addMeasures();
$this->addDeprecations();
$this->timers = [];
return $this->debugbar->getData();
}
/**
* Hierarchical Profiler support.
*
* @param callable $callable
* @param string|null $message
* @return mixed
*/
public function profile(callable $callable, string $message = null)
{
$this->startProfiling();
$response = $callable();
$this->stopProfiling($message);
return $response;
}
public function addTwigProfiler(Environment $twig): void
{
$clockwork = $this->getClockwork();
if ($clockwork) {
$source = new TwigClockworkDataSource($twig);
$source->listenToEvents();
$clockwork->addDataSource($source);
}
}
/**
* Start profiling code.
*
* @return void
*/
/home/qenherkh/sites/jsesh/www/system/src/Grav/Common/Processors/InitializeProcessor.php
// Initialize URI (uses session, see issue #3269).
$this->initializeUri($config);
// Grav may return redirect response right away.
$redirectCode = (int)$config->get('system.pages.redirect_trailing_slash', 1);
if ($redirectCode) {
$response = $this->handleRedirectRequest($request, $redirectCode > 300 ? $redirectCode : null);
if ($response) {
$this->stopTimer('_init');
return $response;
}
}
$this->stopTimer('_init');
// Wrap call to next handler so that debugger can profile it.
/** @var Response $response */
$response = $debugger->profile(static function () use ($handler, $request) {
return $handler->handle($request);
});
// Log both request and response and return the response.
return $debugger->logRequest($request, $response);
}
public function processCli(): void
{
// Load configuration.
$config = $this->initializeConfig();
// Initialize logger.
$this->initializeLogger($config);
// Disable debugger.
$this->container['debugger']->enabled(false);
// Set timezone, locale.
$this->initializeLocale($config);
Arguments
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#65}
Grav\Framework\RequestHandler\RequestHandler {#88}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#65}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Middlewares/MultipartRequestSupport.php
use function in_array;
use function is_array;
use function strlen;
/**
* Multipart request support for PUT and PATCH.
*/
class MultipartRequestSupport implements MiddlewareInterface
{
/**
* @param ServerRequestInterface $request
* @param RequestHandlerInterface $handler
* @return ResponseInterface
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$contentType = $request->getHeaderLine('content-type');
$method = $request->getMethod();
if (!str_starts_with($contentType, 'multipart/form-data') || !in_array($method, ['PUT', 'PATH'], true)) {
return $handler->handle($request);
}
$boundary = explode('; boundary=', $contentType, 2)[1] ?? '';
$parts = explode("--{$boundary}", $request->getBody()->getContents());
$parts = array_slice($parts, 1, count($parts) - 2);
$params = [];
$files = [];
foreach ($parts as $part) {
$this->processPart($params, $files, $part);
}
return $handler->handle($request->withParsedBody($params)->withUploadedFiles($files));
}
/**
* @param array $params
* @param array $files
* @param string $part
* @return void
Arguments
Nyholm\Psr7\ServerRequest {#65}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
protected $handler;
/** @var ContainerInterface|null */
protected $container;
/**
* {@inheritdoc}
* @throws InvalidArgumentException
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$middleware = array_shift($this->middleware);
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#65}
Grav\Framework\RequestHandler\RequestHandler {#86}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
// Use default callable if there is no middleware.
if ($middleware === null) {
return call_user_func($this->handler, $request);
}
if ($middleware instanceof MiddlewareInterface) {
return $middleware->process($request, clone $this);
}
if (null === $this->container || !$this->container->has($middleware)) {
throw new InvalidArgumentException(
sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
$middleware
);
}
array_unshift($this->middleware, $this->container->get($middleware));
return $this->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#65}
/home/qenherkh/sites/jsesh/www/system/src/Grav/Common/Grav.php
},
'pagesProcessor' => function () {
return new PagesProcessor($this);
},
'debuggerAssetsProcessor' => function () {
return new DebuggerAssetsProcessor($this);
},
'renderProcessor' => function () {
return new RenderProcessor($this);
},
]
);
$default = static function () {
return new Response(404, ['Expires' => 0, 'Cache-Control' => 'no-store, max-age=0'], 'Not Found');
};
$collection = new RequestHandler($this->middleware, $default, $container);
$response = $collection->handle($this['request']);
$body = $response->getBody();
/** @var Messages $messages */
$messages = $this['messages'];
// Prevent caching if session messages were displayed in the page.
$noCache = $messages->isCleared();
if ($noCache) {
$response = $response->withHeader('Cache-Control', 'no-store, max-age=0');
}
// Handle ETag and If-None-Match headers.
if ($response->getHeaderLine('ETag') === '1') {
$etag = md5($body);
$response = $response->withHeader('ETag', '"' . $etag . '"');
$search = trim($this['request']->getHeaderLine('If-None-Match'), '"');
if ($noCache === false && $search === $etag) {
$response = $response->withStatus(304);
$body = '';
Arguments
Nyholm\Psr7\ServerRequest {#65}
/home/qenherkh/sites/jsesh/www/index.php
// Register the auto-loader.
$loader = require $autoload;
// Set timezone to default, falls back to system if php.ini not set
date_default_timezone_set(@date_default_timezone_get());
// Set internal encoding.
@ini_set('default_charset', 'UTF-8');
mb_internal_encoding('UTF-8');
use Grav\Common\Grav;
use RocketTheme\Toolbox\Event\Event;
// Get the Grav instance
$grav = Grav::instance(array('loader' => $loader));
// Process the page
try {
$grav->process();
} catch (\Error|\Exception $e) {
$grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
throw $e;
}