/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/vendor
/pimple
/pimple
/src
/Pimple
/Container.php
throw new FrozenServiceException($id);
}
$this->values[$id] = $value;
$this->keys[$id] = true;
}
/**
* Gets a parameter or an object.
*
* @param string $id The unique identifier for the parameter or object
*
* @return mixed The value of the parameter or an object
*
* @throws UnknownIdentifierException If the identifier is not defined
*/
public function offsetGet($id)
{
if (!isset($this->keys[$id])) {
throw new UnknownIdentifierException($id);
}
if (
isset($this->raw[$id])
|| !\is_object($this->values[$id])
|| isset($this->protected[$this->values[$id]])
|| !\method_exists($this->values[$id], '__invoke')
) {
return $this->values[$id];
}
if (isset($this->factories[$this->values[$id]])) {
return $this->values[$id]($this);
}
$raw = $this->values[$id];
$val = $this->values[$id] = $raw($this);
$this->raw[$id] = $raw;
$this->frozen[$id] = true;
Arguments
"Identifier "user" is not defined."
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Framework
/Form
/Traits
/FormTrait.php
* @param string $serialized
*/
public function unserialize($serialized): void
{
$data = unserialize($serialized, ['allowed_classes' => false]);
$this->doUnserialize($data);
}
/**
* Get form flash object.
*
* @return FormFlash
*/
public function getFlash(): FormFlash
{
if (null === $this->flash) {
$grav = Grav::instance();
$user = $grav['user'];
$id = null;
$rememberState = $this->getBlueprint()->get('form/remember_state');
if ($rememberState === 'user') {
$id = $user->username;
}
// By default store flash by the session id.
if (null === $id) {
/** @var Session $session */
$session = $grav['session'];
$id = $session->getId();
}
$this->flash = new FormFlash($id, $this->getUniqueId(), $this->getName());
$this->flash->setUrl($grav['uri']->url)->setUser($user);
}
return $this->flash;
}
Arguments
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/user
/plugins
/form
/classes
/Form.php
$this->items['nonce']['action'] = 'form';
}
// Initialize form properties.
$this->name = $this->items['name'];
$this->setId($this->items['id']);
$this->setUniqueId($this->items['uniqueid']);
$this->initialize();
}
public function initialize()
{
// Reset and initialize the form
$this->errors = [];
$this->submitted = false;
$this->unsetFlash();
// Remember form state.
$flash = $this->getFlash();
$data = ($flash->exists() ? $flash->getData() : null) ?? $this->header_data;
// Remember data and files.
$this->setAllData($data);
$this->setAllFiles($flash);
$this->values = new Data();
// Fire event
$grav = Grav::instance();
$grav->fireEvent('onFormInitialized', new Event(['form' => $this]));
}
protected function setAllFiles(FormFlash $flash)
{
if (!$flash->exists()) {
return;
}
/** @var Uri $url */
$url = Grav::instance()['uri'];
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/user
/plugins
/form
/classes
/Form.php
$this->items['id'] = Inflector::hyphenize($this->items['name']);
}
if (empty($this->items['uniqueid'])) {
$this->items['uniqueid'] = Utils::generateRandomString(20);
}
if (empty($this->items['nonce']['name'])) {
$this->items['nonce']['name'] = 'form-nonce';
}
if (empty($this->items['nonce']['action'])) {
$this->items['nonce']['action'] = 'form';
}
// Initialize form properties.
$this->name = $this->items['name'];
$this->setId($this->items['id']);
$this->setUniqueId($this->items['uniqueid']);
$this->initialize();
}
public function initialize()
{
// Reset and initialize the form
$this->errors = [];
$this->submitted = false;
$this->unsetFlash();
// Remember form state.
$flash = $this->getFlash();
$data = ($flash->exists() ? $flash->getData() : null) ?? $this->header_data;
// Remember data and files.
$this->setAllData($data);
$this->setAllFiles($flash);
$this->values = new Data();
// Fire event
$grav = Grav::instance();
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/user
/plugins
/form
/classes
/FormFactory.php
* @param array $form
* @return Form|null
* @deprecated 1.6 Use FormFactory::createFormByPage() instead.
*/
public function createPageForm(Page $page, string $name, array $form): ?FormInterface
{
return new Form($page, $name, $form);
}
/**
* Create form using the header of the page.
*
* @param PageInterface $page
* @param string $name
* @param array $form
* @return Form|null
*/
public function createFormForPage(PageInterface $page, string $name, array $form): ?FormInterface
{
return new Form($page, $name, $form);
}
}
Arguments
Page {#247}
"contact"
array:5 [
"name" => "contact"
"rules" => []
"fields" => array:5 [
0 => array:6 [
"id" => "contact_name"
"name" => "name"
"label" => "Name"
"placeholder" => "John Doe"
"type" => "text"
"validate" => array:1 [
"required" => true
]
]
1 => array:3 [
"id" => "contact_email"
"name" => "email"
"type" => "honeypot"
]
2 => array:6 [
"id" => "contact_person"
"name" => "person"
"label" => "E-Mail"
"placeholder" => "me@example.com"
"type" => "email"
"validate" => array:1 [
"required" => true
]
]
3 => array:6 [
"id" => "contact_sobject"
"name" => "subject"
"label" => "Subject"
"placeholder" => "My message title"
"type" => "text"
"validate" => array:1 [
"required" => true
]
]
4 => array:6 [
"id" => "contact_message"
"name" => "message"
"label" => "Message"
"placeholder" => "Here goes my feedback / question / request / ..."
"type" => "textarea"
"validate" => array:1 [
"required" => true
]
]
]
"buttons" => array:1 [
0 => array:2 [
"type" => "submit"
"value" => "Send"
]
]
"process" => array:3 [
0 => array:1 [
"email" => array:4 [
"subject" => "[Brick.Camp] {{ form.value.subject|e }}"
"body" => "{% include 'partials/mail/contact.html.twig' %}"
"cc" => "{{ form.value.person|e }}"
"reply_to" => "{{ form.value.person|e }}"
]
]
1 => array:1 [
"message" => "Thank you for getting in touch!"
]
2 => array:1 [
"reset" => true
]
]
]
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/user
/plugins
/form
/classes
/Forms.php
{
return array_keys($this->types);
}
public function createPageForm(PageInterface $page, string $name = null, array $form = null): ?FormInterface
{
if (null === $form) {
[$name, $form] = $this->getPageParameters($page, $name);
}
if (null === $form) {
return null;
}
$type = $form['type'] ?? 'form';
$factory = $this->types[$type] ?? null;
if ($factory) {
if (method_exists($factory, 'createFormForPage')) {
return $factory->createFormForPage($page, $name, $form);
}
if ($page instanceof Page) {
return $factory->createPageForm($page, $name, $form);
}
}
return null;
}
public function getActiveForm(): ?FormInterface
{
return $this->form;
}
public function setActiveForm(FormInterface $form): void
{
$this->form = $form;
}
Arguments
Page {#247}
"contact"
array:5 [
"name" => "contact"
"rules" => []
"fields" => array:5 [
0 => array:6 [
"id" => "contact_name"
"name" => "name"
"label" => "Name"
"placeholder" => "John Doe"
"type" => "text"
"validate" => array:1 [
"required" => true
]
]
1 => array:3 [
"id" => "contact_email"
"name" => "email"
"type" => "honeypot"
]
2 => array:6 [
"id" => "contact_person"
"name" => "person"
"label" => "E-Mail"
"placeholder" => "me@example.com"
"type" => "email"
"validate" => array:1 [
"required" => true
]
]
3 => array:6 [
"id" => "contact_sobject"
"name" => "subject"
"label" => "Subject"
"placeholder" => "My message title"
"type" => "text"
"validate" => array:1 [
"required" => true
]
]
4 => array:6 [
"id" => "contact_message"
"name" => "message"
"label" => "Message"
"placeholder" => "Here goes my feedback / question / request / ..."
"type" => "textarea"
"validate" => array:1 [
"required" => true
]
]
]
"buttons" => array:1 [
0 => array:2 [
"type" => "submit"
"value" => "Send"
]
]
"process" => array:3 [
0 => array:1 [
"email" => array:4 [
"subject" => "[Brick.Camp] {{ form.value.subject|e }}"
"body" => "{% include 'partials/mail/contact.html.twig' %}"
"cc" => "{{ form.value.person|e }}"
"reply_to" => "{{ form.value.person|e }}"
]
]
1 => array:1 [
"message" => "Thank you for getting in touch!"
]
2 => array:1 [
"reset" => true
]
]
]
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/user
/plugins
/form
/form.php
}
$parent = $current && $current !== $page ? $current : null;
$page_route = $page->home() ? '/' : $page->route();
// If the form was in the modular page, we need to add the form into the parent page as well.
if ($parent) {
$parent->addForms($pageForms);
$parent_route = $parent->home() ? '/' : $parent->route();
}
/** @var Forms $forms */
$forms = $this->grav['forms'];
// Store the page forms in the forms instance
foreach ($pageForms as $name => $form) {
if (isset($parent, $parent_route)) {
$this->addForm($parent_route, $forms->createPageForm($parent, $name, $form));
}
$this->addForm($page_route, $forms->createPageForm($page, $name, $form));
}
}
/**
* Initialize all the forms
*/
public function onPagesInitialized()
{
$this->loadCachedForms();
}
/**
* Catches form processing if user posts the form.
*/
public function onPageInitialized()
{
$submitted = false;
$this->json_response = [];
// Save cached forms.
Arguments
Page {#247}
"contact"
array:5 [
"name" => "contact"
"rules" => []
"fields" => array:5 [
0 => array:6 [
"id" => "contact_name"
"name" => "name"
"label" => "Name"
"placeholder" => "John Doe"
"type" => "text"
"validate" => array:1 [
"required" => true
]
]
1 => array:3 [
"id" => "contact_email"
"name" => "email"
"type" => "honeypot"
]
2 => array:6 [
"id" => "contact_person"
"name" => "person"
"label" => "E-Mail"
"placeholder" => "me@example.com"
"type" => "email"
"validate" => array:1 [
"required" => true
]
]
3 => array:6 [
"id" => "contact_sobject"
"name" => "subject"
"label" => "Subject"
"placeholder" => "My message title"
"type" => "text"
"validate" => array:1 [
"required" => true
]
]
4 => array:6 [
"id" => "contact_message"
"name" => "message"
"label" => "Message"
"placeholder" => "Here goes my feedback / question / request / ..."
"type" => "textarea"
"validate" => array:1 [
"required" => true
]
]
]
"buttons" => array:1 [
0 => array:2 [
"type" => "submit"
"value" => "Send"
]
]
"process" => array:3 [
0 => array:1 [
"email" => array:4 [
"subject" => "[Brick.Camp] {{ form.value.subject|e }}"
"body" => "{% include 'partials/mail/contact.html.twig' %}"
"cc" => "{{ form.value.person|e }}"
"reply_to" => "{{ form.value.person|e }}"
]
]
1 => array:1 [
"message" => "Thank you for getting in touch!"
]
2 => array:1 [
"reset" => true
]
]
]
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/vendor
/symfony
/event-dispatcher
/EventDispatcher.php
}
}
/**
* 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 Event $event The event object to pass to the event handlers/listeners
*/
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.
*
* @param string $eventName The name of the event
*/
private function sortListeners($eventName)
{
krsort($this->listeners[$eventName]);
$this->sorted[$eventName] = [];
foreach ($this->listeners[$eventName] as $priority => $listeners) {
foreach ($listeners as $k => $listener) {
if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure) {
$listener[0] = $listener[0]();
$this->listeners[$eventName][$priority][$k] = $listener;
}
$this->sorted[$eventName][] = $listener;
Arguments
Event {#258}
"onPageProcessed"
EventDispatcher {#138}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/vendor
/symfony
/event-dispatcher
/EventDispatcher.php
* @author Jordi Boggiano <j.boggiano@seld.be>
* @author Jordan Alliot <jordan.alliot@gmail.com>
* @author Nicolas Grekas <p@tchwork.com>
*/
class EventDispatcher implements EventDispatcherInterface
{
private $listeners = [];
private $sorted = [];
/**
* {@inheritdoc}
*/
public function dispatch($eventName, Event $event = null)
{
if (null === $event) {
$event = new Event();
}
if ($listeners = $this->getListeners($eventName)) {
$this->doDispatch($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:2 [
0 => array:2 [
0 => BrickCampPlugin {#101}
1 => "onPageProcessed"
]
1 => array:2 [
0 => FormPlugin {#107}
1 => "onPageProcessed"
]
]
"onPageProcessed"
Event {#258}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/vendor
/rockettheme
/toolbox
/Event
/src
/EventDispatcher.php
use Symfony\Component\EventDispatcher\Event as BaseEvent;
use Symfony\Component\EventDispatcher\EventDispatcher as BaseEventDispatcher;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Implements Symfony EventDispatcher interface.
*
* @package RocketTheme\Toolbox\Event
* @author RocketTheme
* @license MIT
*/
class EventDispatcher extends BaseEventDispatcher implements EventDispatcherInterface
{
public function dispatch($eventName, BaseEvent $event = null)
{
if (null === $event) {
$event = new Event();
}
return parent::dispatch($eventName, $event);
}
}
Arguments
"onPageProcessed"
Event {#258}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Common
/Grav.php
foreach ($values as $i => $value) {
header($key . ': ' . $value, $i === 0);
}
}
}
/**
* Fires an event with optional parameters.
*
* @param string $eventName
* @param Event $event
*
* @return Event
*/
public function fireEvent($eventName, Event $event = null)
{
/** @var EventDispatcher $events */
$events = $this['events'];
return $events->dispatch($eventName, $event);
}
/**
* Set the final content length for the page and flush the buffer
*
*/
public function shutdown()
{
// Prevent user abort allowing onShutdown event to run without interruptions.
if (\function_exists('ignore_user_abort')) {
@ignore_user_abort(true);
}
// Close the session allowing new requests to be handled.
if (isset($this['session'])) {
$this['session']->close();
}
if ($this['config']->get('system.debugger.shutdown.close_connection', true)) {
// Flush the response and close the connection to allow time consuming tasks to be performed without leaving
Arguments
"onPageProcessed"
Event {#258}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Common
/Page
/Pages.php
// Page is the one that matches to $page_extensions list with the lowest index number.
if (preg_match($regex, $filename, $matches, PREG_OFFSET_CAPTURE)) {
$ext = $matches[1][0];
if ($page_found === null || array_search($ext, $page_extensions, true) < array_search($page_extension, $page_extensions, true)) {
$page_found = $file;
$page_extension = $ext;
}
}
}
$content_exists = false;
if ($parent && $page_found) {
$page->init($page_found, $page_extension);
$content_exists = true;
if ($config->get('system.pages.events.page')) {
$this->grav->fireEvent('onPageProcessed', new Event(['page' => $page]));
}
}
// Now handle all the folders under the page.
/** @var \FilesystemIterator $file */
foreach ($folders as $file) {
$filename = $file->getFilename();
// if folder contains separator, continue
if (Utils::contains($file->getFilename(), $config->get('system.param_sep', ':'))) {
continue;
}
if (!$page->path()) {
$page->path($file->getPath());
}
$path = $directory . DS . $filename;
$child = $this->recurse($path, $page);
Arguments
"onPageProcessed"
Event {#258}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Common
/Page
/Pages.php
$this->grav->fireEvent('onPageProcessed', new Event(['page' => $page]));
}
}
// Now handle all the folders under the page.
/** @var \FilesystemIterator $file */
foreach ($folders as $file) {
$filename = $file->getFilename();
// if folder contains separator, continue
if (Utils::contains($file->getFilename(), $config->get('system.param_sep', ':'))) {
continue;
}
if (!$page->path()) {
$page->path($file->getPath());
}
$path = $directory . DS . $filename;
$child = $this->recurse($path, $page);
if (Utils::startsWith($filename, '_')) {
$child->routable(false);
}
$this->children[$page->path()][$child->path()] = ['slug' => $child->slug()];
if ($config->get('system.pages.events.page')) {
$this->grav->fireEvent('onFolderProcessed', new Event(['page' => $page]));
}
}
if (!$content_exists) {
// Set routability to false if no page found
$page->routable(false);
// Hide empty folders if option set
if ($config->get('system.pages.hide_empty_folders')) {
$page->visible(false);
Arguments
"/home/bucki/Dokumente/Coding/Brick.Camp/user/pages/91.contact"
Page {#228}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Common
/Page
/Pages.php
default:
$hash = Folder::lastModifiedFile($pages_dir);
}
$this->pages_cache_id = md5($pages_dir . $hash . $language->getActive() . $config->checksum());
list($this->instances, $this->routes, $this->children, $taxonomy_map, $this->sort) = $cache->fetch($this->pages_cache_id);
if (!$this->instances) {
$this->grav['debugger']->addMessage('Page cache missed, rebuilding pages..');
// recurse pages and cache result
$this->resetPages($pages_dir);
} else {
// If pages was found in cache, set the taxonomy
$this->grav['debugger']->addMessage('Page cache hit.');
$taxonomy->taxonomy($taxonomy_map);
}
} else {
$this->recurse($pages_dir);
$this->buildRoutes();
}
}
/**
* Accessible method to manually reset the pages cache
*
* @param string $pages_dir
*/
public function resetPages($pages_dir)
{
$this->recurse($pages_dir);
$this->buildRoutes();
// cache if needed
if ($this->grav['config']->get('system.cache.enabled')) {
/** @var Cache $cache */
$cache = $this->grav['cache'];
/** @var Taxonomy $taxonomy */
$taxonomy = $this->grav['taxonomy'];
Arguments
"/home/bucki/Dokumente/Coding/Brick.Camp/user/pages"
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Common
/Page
/Pages.php
}
return $this->baseUrl($lang, $absolute) . Uri::filterPath($route);
}
/**
* Class initialization. Must be called before using this class.
*/
public function init()
{
$config = $this->grav['config'];
$this->ignore_files = $config->get('system.pages.ignore_files');
$this->ignore_folders = $config->get('system.pages.ignore_folders');
$this->ignore_hidden = $config->get('system.pages.ignore_hidden');
$this->instances = [];
$this->children = [];
$this->routes = [];
$this->buildPages();
}
/**
* Get or set last modification time.
*
* @param int $modified
*
* @return int|null
*/
public function lastModified($modified = null)
{
if ($modified && $modified > $this->last_modified) {
$this->last_modified = $modified;
}
return $this->last_modified;
}
/**
* Returns a list of all pages.
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Common
/Processors
/PagesProcessor.php
use Grav\Common\Page\Interfaces\PageInterface;
use RocketTheme\Toolbox\Event\Event;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
class PagesProcessor extends ProcessorBase
{
public $id = 'pages';
public $title = 'Pages';
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();
$this->container->fireEvent('onPagesInitialized', new Event(['pages' => $this->container['pages']]));
$this->container->fireEvent('onPageInitialized', new Event(['page' => $this->container['page']]));
/** @var PageInterface $page */
$page = $this->container['page'];
if (!$page->routable()) {
// If no page found, fire event
$event = new Event(['page' => $page]);
$event->page = null;
$event = $this->container->fireEvent('onPageNotFound', $event);
if (isset($event->page)) {
unset ($this->container['page']);
$this->container['page'] = $page = $event->page;
} else {
throw new \RuntimeException('Page Not Found', 404);
}
$this->addMessage("Routed to page {$page->rawRoute()} (type: {$page->template()}) [Not Found fallback]");
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Framework
/RequestHandler
/Traits
/RequestHandlerTrait.php
private $handler;
/** @var ContainerInterface|null */
private $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
ServerRequest {#162}
RequestHandler {#227}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/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
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Common
/Processors
/TwigProcessor.php
*/
namespace Grav\Common\Processors;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
class TwigProcessor extends ProcessorBase
{
public $id = 'twig';
public $title = 'Twig';
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
{
$this->startTimer();
$this->container['twig']->init();
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Framework
/RequestHandler
/Traits
/RequestHandlerTrait.php
private $handler;
/** @var ContainerInterface|null */
private $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
ServerRequest {#162}
RequestHandler {#203}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/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
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Common
/Processors
/AssetsProcessor.php
namespace Grav\Common\Processors;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
class AssetsProcessor extends ProcessorBase
{
public $id = '_assets';
public $title = 'Assets';
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
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Framework
/RequestHandler
/Traits
/RequestHandlerTrait.php
private $handler;
/** @var ContainerInterface|null */
private $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
ServerRequest {#162}
RequestHandler {#200}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/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
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Common
/Processors
/SchedulerProcessor.php
namespace Grav\Common\Processors;
use RocketTheme\Toolbox\Event\Event;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
class SchedulerProcessor extends ProcessorBase
{
public $id = '_scheduler';
public $title = 'Scheduler';
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
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Framework
/RequestHandler
/Traits
/RequestHandlerTrait.php
private $handler;
/** @var ContainerInterface|null */
private $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
ServerRequest {#162}
RequestHandler {#170}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/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
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Common
/Processors
/BackupsProcessor.php
namespace Grav\Common\Processors;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
class BackupsProcessor extends ProcessorBase
{
public $id = '_backups';
public $title = 'Backups';
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
{
$this->startTimer();
$backups = $this->container['backups'];
$backups->init();
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Framework
/RequestHandler
/Traits
/RequestHandlerTrait.php
private $handler;
/** @var ContainerInterface|null */
private $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
ServerRequest {#162}
RequestHandler {#167}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/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
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Common
/Processors
/TasksProcessor.php
}
$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
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Framework
/RequestHandler
/Traits
/RequestHandlerTrait.php
private $handler;
/** @var ContainerInterface|null */
private $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
ServerRequest {#162}
RequestHandler {#165}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/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
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Common
/Processors
/RequestProcessor.php
$request = $request->withParsedBody(json_decode($request->getBody()->getContents(), true));
}
$request = $request
->withAttribute('grav', $this->container)
->withAttribute('time', $_SERVER['REQUEST_TIME_FLOAT'] ?? GRAV_REQUEST_TIME)
->withAttribute('route', Uri::getCurrentRoute())
->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
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Framework
/RequestHandler
/Traits
/RequestHandlerTrait.php
private $handler;
/** @var ContainerInterface|null */
private $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
ServerRequest {#162}
RequestHandler {#160}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/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
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Common
/Processors
/ThemesProcessor.php
*/
namespace Grav\Common\Processors;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
class ThemesProcessor extends ProcessorBase
{
public $id = 'themes';
public $title = 'Themes';
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
{
$this->startTimer();
$this->container['themes']->init();
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Framework
/RequestHandler
/Traits
/RequestHandlerTrait.php
private $handler;
/** @var ContainerInterface|null */
private $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
ServerRequest {#68}
RequestHandler {#155}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/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
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Common
/Processors
/PluginsProcessor.php
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
class PluginsProcessor extends ProcessorBase
{
public $id = 'plugins';
public $title = 'Plugins';
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
{
$this->startTimer();
// TODO: remove in 2.0.
$this->container['accounts'];
$this->container['plugins']->init();
$this->container->fireEvent('onPluginsInitialized');
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Framework
/RequestHandler
/Traits
/RequestHandlerTrait.php
private $handler;
/** @var ContainerInterface|null */
private $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
ServerRequest {#68}
RequestHandler {#137}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/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
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Common
/Processors
/InitializeProcessor.php
}
/** @var Uri $uri */
$uri = $this->container['uri'];
$uri->init();
// Redirect pages with trailing slash if configured to do so.
$path = $uri->path() ?: '/';
if ($path !== '/'
&& $config->get('system.pages.redirect_trailing_slash', false)
&& Utils::endsWith($path, '/')) {
$redirect = (string) $uri::getCurrentRoute()->toString();
$this->container->redirect($redirect);
}
$this->container->setLocale();
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Framework
/RequestHandler
/Traits
/RequestHandlerTrait.php
private $handler;
/** @var ContainerInterface|null */
private $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
ServerRequest {#68}
RequestHandler {#127}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/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
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Common
/Processors
/DebuggerProcessor.php
*/
namespace Grav\Common\Processors;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
class DebuggerProcessor extends ProcessorBase
{
public $id = '_debugger';
public $title = 'Init Debugger';
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
{
$this->startTimer();
$this->container['debugger']->init();
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Framework
/RequestHandler
/Traits
/RequestHandlerTrait.php
private $handler;
/** @var ContainerInterface|null */
private $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
ServerRequest {#68}
RequestHandler {#118}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/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
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Common
/Processors
/ErrorsProcessor.php
*/
namespace Grav\Common\Processors;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
class ErrorsProcessor extends ProcessorBase
{
public $id = '_errors';
public $title = 'Error Handlers Reset';
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
{
$this->startTimer();
$this->container['errors']->resetHandlers();
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Framework
/RequestHandler
/Traits
/RequestHandlerTrait.php
private $handler;
/** @var ContainerInterface|null */
private $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
ServerRequest {#68}
RequestHandler {#70}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/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
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Common
/Processors
/LoggerProcessor.php
/** @var Config $config */
$config = $grav['config'];
switch ($config->get('system.log.handler', 'file')) {
case 'syslog':
$log = $grav['log'];
$log->popHandler();
$facility = $config->get('system.log.syslog.facility', 'local6');
$logHandler = new SyslogHandler('grav', $facility);
$formatter = new LineFormatter("%channel%.%level_name%: %message% %extra%");
$logHandler->setFormatter($formatter);
$log->pushHandler($logHandler);
break;
}
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Framework
/RequestHandler
/Traits
/RequestHandlerTrait.php
private $handler;
/** @var ContainerInterface|null */
private $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
ServerRequest {#68}
RequestHandler {#95}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/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
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Common
/Processors
/ConfigurationProcessor.php
namespace Grav\Common\Processors;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
class ConfigurationProcessor extends ProcessorBase
{
public $id = '_config';
public $title = 'Configuration';
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
{
$this->startTimer();
$this->container['config']->init();
$this->container['plugins']->setup();
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Framework
/RequestHandler
/Traits
/RequestHandlerTrait.php
private $handler;
/** @var ContainerInterface|null */
private $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
ServerRequest {#68}
RequestHandler {#93}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/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
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/src
/Grav
/Common
/Grav.php
},
'debuggerAssetsProcessor' => function () {
return new DebuggerAssetsProcessor($this);
},
'renderProcessor' => function () {
return new RenderProcessor($this);
},
]
);
$default = function (ServerRequestInterface $request) {
return new Response(404);
};
/** @var Debugger $debugger */
$debugger = $this['debugger'];
$collection = new RequestHandler($this->middleware, $default, $container);
$response = $collection->handle($this['request']);
$this->header($response);
echo $response->getBody();
$debugger->render();
register_shutdown_function([$this, 'shutdown']);
}
/**
* Set the system locale based on the language and configuration
*/
public function setLocale()
{
// Initialize Locale if set and configured.
if ($this['language']->enabled() && $this['config']->get('system.languages.override_locale')) {
$language = $this['language']->getLanguage();
setlocale(LC_ALL, \strlen($language) < 3 ? ($language . '_' . strtoupper($language)) : $language);
} elseif ($this['config']->get('system.default_locale')) {
setlocale(LC_ALL, $this['config']->get('system.default_locale'));
Arguments
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/index.php
// Set timezone to default, falls back to system if php.ini not set
date_default_timezone_set(@date_default_timezone_get());
// Set internal encoding if mbstring loaded
if (!\extension_loaded('mbstring')) {
die("'mbstring' extension is not loaded. This is required for Grav to run correctly");
}
mb_internal_encoding('UTF-8');
// Get the Grav instance
$grav = Grav::instance(
array(
'loader' => $loader
)
);
// Process the page
try {
$grav->process();
} catch (\Error $e) {
$grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
throw $e;
} catch (\Exception $e) {
$grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
throw $e;
}
/home
/bucki
/Dokumente
/Coding
/Brick.Camp
/system
/router.php
*/
if (PHP_SAPI !== 'cli-server') {
die('This script cannot be run from browser. Run it from a CLI.');
}
$_SERVER['PHP_CLI_ROUTER'] = true;
if (is_file($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $_SERVER['SCRIPT_NAME'])) {
return false;
}
$_SERVER = array_merge($_SERVER, $_ENV);
$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'index.php';
$_SERVER['SCRIPT_NAME'] = DIRECTORY_SEPARATOR . 'index.php';
$_SERVER['PHP_SELF'] = DIRECTORY_SEPARATOR . 'index.php';
error_log(sprintf('%s:%d [%d]: %s', $_SERVER['REMOTE_ADDR'], $_SERVER['REMOTE_PORT'], http_response_code(), $_SERVER['REQUEST_URI']), 4);
require 'index.php';
Arguments
"/home/bucki/Dokumente/Coding/Brick.Camp/index.php"