/home/santosofa/www/user/plugins/facebook-conversions-api/vendor/facebook/php-business-sdk/src/FacebookAds/Http/Adapter/CurlAdapter.php
if (!empty($postfields)) {
$curlopts[CURLOPT_POSTFIELDS] = $postfields;
}
$this->getCurl()->setoptArray($curlopts);
$raw_response = $this->getCurl()->exec();
$status_code = $this->getCurl()->getInfo(CURLINFO_HTTP_CODE);
$curl_errno = $this->getCurl()->errno();
$curl_error = $curl_errno ? $this->getCurl()->error() : null;
$response_parts = $this->extractResponseHeadersAndBody($raw_response);
$response->setStatusCode($status_code);
$this->parseHeaders($response->getHeaders(), $response_parts[0]);
$response->setBody($response_parts[1]);
if ($curl_errno) {
throw new Exception($curl_error, $curl_errno);
}
return $response;
}
}
Arguments
"Failed to connect to graph.facebook.com port 443: Connection timed out"
/home/santosofa/www/user/plugins/facebook-conversions-api/vendor/facebook/php-business-sdk/src/FacebookAds/Http/Client.php
.'fb_ca_chain_bundle.crt';
}
return $this->caBundlePath;
}
/**
* @param string $path
*/
public function setCaBundlePath($path) {
$this->caBundlePath = $path;
}
/**
* @param RequestInterface $request
* @return ResponseInterface
* @throws RequestException
*/
public function sendRequest(RequestInterface $request) {
$response = $this->getAdapter()->sendRequest($request);
$response->setRequest($request);
$response_content = $response->getContent();
if ($response_content === null) {
throw new EmptyResponseException($response);
}
if (is_array($response_content)
&& array_key_exists('error', $response_content)) {
throw RequestException::create($response);
}
return $response;
}
}
Arguments
FacebookAds\Http\Request {#1980}
/home/santosofa/www/user/plugins/facebook-conversions-api/vendor/facebook/php-business-sdk/src/FacebookAds/Http/Request.php
public function getFileParams() {
if ($this->fileParams === null) {
$this->fileParams = new Parameters();
}
return $this->fileParams;
}
/**
* @param Parameters $params
*/
public function setFileParams(Parameters $params) {
$this->fileParams = $params;
}
/**
* @return ResponseInterface
*/
public function execute() {
return $this->getClient()->sendRequest($this);
}
/**
* @return Request
* @see RequestInterface::createClone()
*/
public function createClone() {
return clone $this;
}
}
Arguments
FacebookAds\Http\Request {#1980}
/home/santosofa/www/user/plugins/facebook-conversions-api/vendor/facebook/php-business-sdk/src/FacebookAds/Api.php
} else {
$params_ref = $request->getBodyParams();
}
if (!empty($params)) {
$params_ref->enhance($params);
}
$params_ref->enhance($this->getSession()->getRequestParameters());
return $request;
}
/**
* @param RequestInterface $request
* @return ResponseInterface
*/
public function executeRequest(RequestInterface $request) {
$this->getLogger()->logRequest('debug', $request);
$response = $request->execute();
$this->getLogger()->logResponse('debug', $response);
return $response;
}
/**
* @return string
*/
public function getDefaultGraphVersion() {
if ($this->defaultGraphVersion === null) {
$match = array();
if (preg_match("/^\d+\.\d+/", static::VERSION, $match)) {
$this->defaultGraphVersion = $match[0];
}
}
return $this->defaultGraphVersion;
}
/**
/home/santosofa/www/user/plugins/facebook-conversions-api/vendor/facebook/php-business-sdk/src/FacebookAds/Api.php
* @param string $path Ads API endpoint
* @param string $method Ads API request type
* @param array $params Assoc of request parameters
* @return ResponseInterface Graph API responses
*/
public function call(
$path,
$method = RequestInterface::METHOD_GET,
array $params = array(),
array $file_params = array()) {
$request = $this->prepareRequest($path, $method, $params);
if (!empty($file_params)) {
foreach($file_params as $key => $value) {
$request->getFileParams()->offsetSet($key, $value);
}
}
return $this->executeRequest($request);
}
/**
* @return SessionInterface
*/
public function getSession() {
return $this->session;
}
/**
* @param LoggerInterface $logger
*/
public function setLogger(LoggerInterface $logger) {
$this->logger = $logger;
}
/**
* @return LoggerInterface
*/
public function getLogger() {
Arguments
FacebookAds\Http\Request {#1980}
/home/santosofa/www/user/plugins/facebook-conversions-api/vendor/facebook/php-business-sdk/src/FacebookAds/ApiRequest.php
$file_key = 'source'.$this->file_counter;
if (file_exists($filename)) {
$this->file_params[$file_key] = $filename;
$this->file_counter++;
}
return $this;
}
/**
* Execute the request
*/
public function execute() {
$url_path = '/'.$this->id.$this->endpoint;
$updated_params = $this->params;
if (!empty($this->fields)) {
$fields = implode(',', $this->fields);
$updated_params['fields'] = $fields;
}
$response = $this->api->call(
$url_path, $this->method, $updated_params, $this->file_params);
if ($this->api_type === "EDGE" && $this->method === "GET") {
return new Cursor($response, $this->return_prototype, $this->api);
} else if ($this->method === "DELETE") {
return $response;
} else {
return $this->createObject($response->getContent());
}
}
protected function extractValue($value) {
if ($this->param_checker->isAbstractObject($value)) {
return $value->exportAllData();
} else if (is_array($value)) {
$extracted_value = [];
foreach ($value as $key => $sub_value) {
$extracted_value[$key] = $this->extractValue($sub_value);
}
return $extracted_value;
} else {
return $value;
Arguments
"/141722766383429/events"
"POST"
array:1 [
"data" => array:1 [
0 => array:6 [
"event_name" => "PageView"
"event_time" => 1711645813
"event_source_url" => "https://santosofa.com.br/images/5/2/5/d/7/525d7f271aba6d39f5591bea1382edf67e7143ed-prazo-de-entrega-146.jpeg"
"event_id" => "20e37b5447b404f2377f1000e3d28858"
"user_data" => array:2 [
"client_ip_address" => "3.236.139.73"
"client_user_agent" => "claudebot"
]
"action_source" => "website"
]
]
]
[]
/home/santosofa/www/user/plugins/facebook-conversions-api/vendor/facebook/php-business-sdk/src/FacebookAds/Object/AdsPixel.php
'upload_id' => 'string',
'upload_source' => 'string',
'upload_tag' => 'string',
);
$enums = array(
);
$request = new ApiRequest(
$this->api,
$this->data['id'],
RequestInterface::METHOD_POST,
'/events',
new AdsPixel(),
'EDGE',
AdsPixel::getFieldsEnum()->getValues(),
new TypeChecker($param_types, $enums)
);
$request->addParams($params);
$request->addFields($fields);
return $pending ? $request : $request->execute();
}
public function createShadowTrafficHelper(array $fields = array(), array $params = array(), $pending = false) {
$this->assureId();
$param_types = array(
);
$enums = array(
);
$request = new ApiRequest(
$this->api,
$this->data['id'],
RequestInterface::METHOD_POST,
'/shadowtraffichelper',
new AbstractCrudObject(),
'EDGE',
array(),
new TypeChecker($param_types, $enums)
);
/home/santosofa/www/user/plugins/facebook-conversions-api/vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/EventRequest.php
if ($this->http_client != null) {
$http_client = $this->http_client;
} else {
$http_client = HttpServiceClientConfig::getInstance()->getClient();
}
if ($http_client != null) {
return $this->httpClientExecute($http_client);
}
return $this->defaultExecute();
}
private function defaultExecute() {
$fields = array();
$normalized_param = $this->normalize();
$ads_pixel = new AdsPixel($this->container['pixel_id']);
$response = $ads_pixel->createEvent(
$fields,
$normalized_param
);
$event_response = new EventResponse($response->exportAllData());
return $event_response;
}
private function httpClientExecute($http_client) {
$base_url = 'https://graph.facebook.com/v' . ApiConfig::APIVersion;
$url = $base_url . '/' . $this->container['pixel_id'] . '/events';
$headers = array(
'User-Agent' => 'fbbizsdk-php-v' . ApiConfig::SDKVersion,
'Accept-Encoding' => '*',
);
$curl_options = array(
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_TIMEOUT => 60,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => true,
Arguments
[]
array:1 [
"data" => array:1 [
0 => array:6 [
"event_name" => "PageView"
"event_time" => 1711645813
"event_source_url" => "https://santosofa.com.br/images/5/2/5/d/7/525d7f271aba6d39f5591bea1382edf67e7143ed-prazo-de-entrega-146.jpeg"
"event_id" => "20e37b5447b404f2377f1000e3d28858"
"user_data" => array:2 [
"client_ip_address" => "3.236.139.73"
"client_user_agent" => "claudebot"
]
"action_source" => "website"
]
]
]
/home/santosofa/www/user/plugins/facebook-conversions-api/vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/EventRequest.php
}
/**
* Execute the request
* @return EventResponse
*/
public function execute() {
$http_client = null;
if ($this->http_client != null) {
$http_client = $this->http_client;
} else {
$http_client = HttpServiceClientConfig::getInstance()->getClient();
}
if ($http_client != null) {
return $this->httpClientExecute($http_client);
}
return $this->defaultExecute();
}
private function defaultExecute() {
$fields = array();
$normalized_param = $this->normalize();
$ads_pixel = new AdsPixel($this->container['pixel_id']);
$response = $ads_pixel->createEvent(
$fields,
$normalized_param
);
$event_response = new EventResponse($response->exportAllData());
return $event_response;
}
private function httpClientExecute($http_client) {
$base_url = 'https://graph.facebook.com/v' . ApiConfig::APIVersion;
$url = $base_url . '/' . $this->container['pixel_id'] . '/events';
$headers = array(
'User-Agent' => 'fbbizsdk-php-v' . ApiConfig::SDKVersion,
/home/santosofa/www/user/plugins/facebook-conversions-api/facebook-conversions-api.php
$eventRequest->execute();
return $event;
}
public function onOutputRendered()
{
$eventRequest = FacebookConversionAPIEventBuilder::buildEventRequest(
$this->config()['pixelId'],
'PageView',
FacebookConversionAPIEventBuilder::buildUserData(),
null,
$this->config()['testEventCode']
);
$event = $eventRequest->getEvents()[0];
$this->grav['session']->setFlashObject(self::EVENT_ID_NAME, $event->getEventId());
$eventRequest->execute();
}
}
/home/santosofa/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 {#2001}
"onOutputRendered"
Symfony\Component\EventDispatcher\EventDispatcher {#115
-listeners: array:52 [
"onPluginsInitialized" => array:7 [
100002 => array:1 [
0 => array:2 [
0 => Grav\Plugin\ProblemsPlugin {#104}
1 => "autoload"
]
]
100001 => array:2 [
0 => array:2 [
0 => Grav\Plugin\MarkdownNoticesPlugin {#103}
1 => "autoload"
]
1 => array:2 [
0 => Grav\Plugin\ProblemsPlugin {#104}
1 => "onPluginsInitialized"
]
]
100000 => array:2 [
0 => array:2 [
0 => Grav\Plugin\AdminPlugin {#94}
1 => "setup"
]
1 => array:2 [
0 => Grav\Plugin\FacebookConversionsAPIPlugin {#98}
1 => "autoload"
]
]
10000 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "initializeSession"
]
]
1001 => array:1 [
0 => array:2 [
0 => Grav\Plugin\AdminPlugin {#94}
1 => "onPluginsInitialized"
]
]
1000 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "initializeLogin"
]
]
0 => array:6 [
0 => array:2 [
0 => Grav\Plugin\EmailPlugin {#96}
1 => "onPluginsInitialized"
]
1 => array:2 [
0 => Grav\Plugin\FacebookConversionsAPIPlugin {#98}
1 => "onPluginsInitialized"
]
2 => array:2 [
0 => Grav\Plugin\FlexObjectsPlugin {#99}
1 => "onPluginsInitialized"
]
3 => array:2 [
0 => Grav\Plugin\FormPlugin {#100}
1 => "onPluginsInitialized"
]
4 => array:2 [
0 => Grav\Plugin\FPOptimizerPlugin {#101}
1 => "onPluginsInitialized"
]
5 => array:2 [
0 => Grav\Plugin\SocialSEOMetaTagsPlugin {#105}
1 => "onPluginsInitialized"
]
]
]
"onRequestHandlerInit" => array:1 [
100000 => array:1 [
0 => array:2 [
0 => Grav\Plugin\AdminPlugin {#94}
1 => "onRequestHandlerInit"
]
]
]
"onFormRegisterTypes" => array:1 [
0 => array:2 [
0 => array:2 [
0 => Grav\Plugin\AdminPlugin {#94}
1 => "onFormRegisterTypes"
]
1 => array:2 [
0 => Grav\Plugin\FlexObjectsPlugin {#99}
1 => "onFormRegisterTypes"
]
]
]
"onPageInitialized" => array:3 [
10000 => array:1 [
0 => array:2 [
0 => Grav\Plugin\FlexObjectsPlugin {#99}
1 => "authorizePage"
]
]
10 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "authorizeLoginPage"
]
]
0 => array:4 [
0 => array:2 [
0 => Grav\Plugin\AdminPlugin {#94}
1 => "onPageInitialized"
]
1 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "authorizePage"
]
2 => array:2 [
0 => Grav\Plugin\FormPlugin {#100}
1 => "onPageInitialized"
]
3 => array:2 [
0 => Grav\Plugin\SocialSEOMetaTagsPlugin {#105}
1 => "onPageInitialized"
]
]
]
"onShutdown" => array:1 [
1000 => array:1 [
0 => array:2 [
0 => Grav\Plugin\AdminPlugin {#94}
1 => "onShutdown"
]
]
]
"Grav\Events\PermissionsRegisterEvent" => array:2 [
1000 => array:1 [
0 => array:2 [
0 => Grav\Plugin\AdminPlugin {#94}
1 => "onRegisterPermissions"
]
]
100 => array:1 [
0 => array:2 [
0 => Grav\Plugin\FlexObjectsPlugin {#99}
1 => "onRegisterPermissions"
]
]
]
"onFormProcessed" => array:1 [
0 => array:3 [
0 => array:2 [
0 => Grav\Plugin\EmailPlugin {#96}
1 => "onFormProcessed"
]
1 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "onFormProcessed"
]
2 => array:2 [
0 => Grav\Plugin\FacebookConversionsAPIPlugin {#98}
1 => "onFormProcessed"
]
]
]
"onTwigTemplatePaths" => array:2 [
0 => array:4 [
0 => array:2 [
0 => Grav\Plugin\EmailPlugin {#96}
1 => "onTwigTemplatePaths"
]
1 => array:2 [
0 => Grav\Plugin\FormPlugin {#100}
1 => "onTwigTemplatePaths"
]
2 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "onTwigTemplatePaths"
]
3 => array:2 [
0 => Grav\Plugin\FlexObjectsPlugin {#99}
1 => "onTwigTemplatePaths"
]
]
-10 => array:1 [
0 => array:2 [
0 => Grav\Plugin\ErrorPlugin {#97}
1 => "onTwigTemplatePaths"
]
]
]
"onSchedulerInitialized" => array:1 [
0 => array:3 [
0 => array:2 [
0 => Grav\Plugin\EmailPlugin {#96}
1 => "onSchedulerInitialized"
]
1 => array:2 [
0 => Grav\Common\Cache {#158}
1 => "onSchedulerInitialized"
]
2 => array:2 [
0 => Grav\Common\Backup\Backups {#188}
1 => "onSchedulerInitialized"
]
]
]
"onAdminSave" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\EmailPlugin {#96}
1 => "onAdminSave"
]
]
]
"onCliInitialize" => array:2 [
100000 => array:2 [
0 => array:2 [
0 => Grav\Plugin\ErrorPlugin {#97}
1 => "autoload"
]
1 => array:2 [
0 => Grav\Plugin\FlexObjectsPlugin {#99}
1 => "autoload"
]
]
10 => array:1 [
0 => array:2 [
0 => Grav\Plugin\FlexObjectsPlugin {#99}
1 => "initializeFlex"
]
]
]
"onPageNotFound" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\ErrorPlugin {#97}
1 => "onPageNotFound"
]
]
]
"onGetPageTemplates" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\ErrorPlugin {#97}
1 => "onGetPageTemplates"
]
]
]
"onDisplayErrorPage.404" => array:1 [
-1 => array:1 [
0 => array:2 [
0 => Grav\Plugin\ErrorPlugin {#97}
1 => "onDisplayErrorPage404"
]
]
]
"Grav\Events\PluginsLoadedEvent" => array:1 [
10 => array:2 [
0 => array:2 [
0 => Grav\Plugin\FlexObjectsPlugin {#99}
1 => "initializeFlex"
]
1 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "onPluginsLoaded"
]
]
]
"Grav\Events\FlexRegisterEvent" => array:1 [
100 => array:1 [
0 => array:2 [
0 => Grav\Plugin\FlexObjectsPlugin {#99}
1 => "onRegisterFlex"
]
]
]
"onTwigExtensions" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\FormPlugin {#100}
1 => "onTwigExtensions"
]
]
]
"Grav\Events\SessionStartEvent" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "onSessionStart"
]
]
]
"Grav\Plugin\Login\Events\PageAuthorizeEvent" => array:1 [
-10000 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "onPageAuthorizeEvent"
]
]
]
"onTask.login.login" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "loginController"
]
]
]
"onTask.login.twofa" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "loginController"
]
]
]
"onTask.login.twofa_cancel" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "loginController"
]
]
]
"onTask.login.forgot" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "loginController"
]
]
]
"onTask.login.logout" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "loginController"
]
]
]
"onTask.login.reset" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "loginController"
]
]
]
"onTask.login.regenerate2FASecret" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "loginController"
]
]
]
"onPageTask.login.invite" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "loginController"
]
]
]
"onPagesInitialized" => array:2 [
0 => array:3 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "storeReferrerPage"
]
1 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "pageVisibility"
]
2 => array:2 [
0 => Grav\Plugin\FormPlugin {#100}
1 => "onPagesInitialized"
]
]
-10000 => array:1 [
0 => array:2 [
0 => Grav\Plugin\FlexObjectsPlugin {#99}
1 => "onPagesInitialized"
]
]
]
"onDisplayErrorPage.401" => array:1 [
-1 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "onDisplayErrorPage401"
]
]
]
"onDisplayErrorPage.403" => array:1 [
-1 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "onDisplayErrorPage403"
]
]
]
"onPageFallBackUrl" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "authorizeFallBackUrl"
]
]
]
"onTwigSiteVariables" => array:2 [
0 => array:3 [
0 => array:2 [
0 => Grav\Plugin\MarkdownNoticesPlugin {#103}
1 => "onTwigSiteVariables"
]
1 => array:2 [
0 => Grav\Plugin\FormPlugin {#100}
1 => "onTwigVariables"
]
2 => array:2 [
0 => Grav\Plugin\FPOptimizerPlugin {#101}
1 => "onTwigSiteVariables"
]
]
-100000 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "onTwigSiteVariables"
]
]
]
"onUserLoginAuthenticate" => array:5 [
10003 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "userLoginAuthenticateRateLimit"
]
]
10002 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "userLoginAuthenticateByRegistration"
]
]
10001 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "userLoginAuthenticateByRememberMe"
]
]
10000 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "userLoginAuthenticateByEmail"
]
]
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "userLoginAuthenticate"
]
]
]
"onUserLoginAuthorize" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "userLoginAuthorize"
]
]
]
"onUserLoginFailure" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "userLoginGuest"
]
]
]
"onUserLoginGuest" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "userLoginGuest"
]
]
]
"onUserLogin" => array:2 [
1000 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "userLoginResetRateLimit"
]
]
10 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "userLogin"
]
]
]
"onUserLogout" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\LoginPlugin {#102}
1 => "userLogout"
]
]
]
"onMarkdownInitialized" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\MarkdownNoticesPlugin {#103}
1 => "onMarkdownInitialized"
]
]
]
"onAdminGenerateReports" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\ProblemsPlugin {#104}
1 => "onAdminGenerateReports"
]
]
]
"onAdminCompilePresetSCSS" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\ProblemsPlugin {#104}
1 => "onAdminCompilePresetSCSS"
]
]
]
"onFatalException" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\ProblemsPlugin {#104}
1 => "onFatalException"
]
]
]
"onOutputRendered" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\FacebookConversionsAPIPlugin {#98}
1 => "onOutputRendered"
]
]
]
"onBeforeFlexFormInitialize" => array:1 [
-10 => array:1 [
0 => array:2 [
0 => Grav\Plugin\FlexObjectsPlugin {#99}
1 => "onBeforeFlexFormInitialize"
]
]
]
"onPageTask" => array:1 [
-10 => array:1 [
0 => array:2 [
0 => Grav\Plugin\FlexObjectsPlugin {#99}
1 => "onPageTask"
]
]
]
"onPageProcessed" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\FormPlugin {#100}
1 => "onPageProcessed"
]
]
]
"onTwigInitialized" => array:1 [
0 => array:2 [
0 => array:2 [
0 => Grav\Plugin\FormPlugin {#100}
1 => "onTwigInitialized"
]
1 => array:2 [
0 => Grav\Theme\SantoSofa {#171}
1 => "onTwigInitialized"
]
]
]
"onTwigPageVariables" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\FormPlugin {#100}
1 => "onTwigVariables"
]
]
]
"onFormValidationProcessed" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\FormPlugin {#100}
1 => "onFormValidationProcessed"
]
]
]
"onOutputGenerated" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Plugin\FPOptimizerPlugin {#101}
1 => "onOutputGenerated"
]
]
]
"onThemeInitialized" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Theme\SantoSofa {#171}
1 => "onThemeInitialized"
]
]
]
"onTwigLoader" => array:1 [
0 => array:1 [
0 => array:2 [
0 => Grav\Theme\SantoSofa {#171}
1 => "onTwigLoader"
]
]
]
]
-sorted: []
-optimized: array:27 [
"Grav\Events\PluginsLoadedEvent" => array:2 [
0 => Grav\Plugin\FlexObjectsPlugin::initializeFlex(): void {#123 …4}
1 => Grav\Plugin\LoginPlugin::onPluginsLoaded(): void {#131 …4}
]
"Grav\Events\SessionStartEvent" => array:1 [
0 => Grav\Plugin\LoginPlugin::onSessionStart(SessionStartEvent $event): void {#139 …4}
]
"onPluginsInitialized" => array:14 [
0 => Grav\Plugin\ProblemsPlugin::autoload(): ClassLoader {#143 …4}
1 => Grav\Plugin\MarkdownNoticesPlugin::autoload() {#144 …3}
2 => Grav\Plugin\ProblemsPlugin::onPluginsInitialized(): void {#145 …4}
3 => Grav\Plugin\AdminPlugin::setup() {#146 …3}
4 => Grav\Plugin\FacebookConversionsAPIPlugin::autoload(): ClassLoader {#147 …4}
5 => Grav\Plugin\LoginPlugin::initializeSession(): void {#148 …4}
6 => Grav\Plugin\AdminPlugin::onPluginsInitialized() {#149 …3}
7 => Grav\Plugin\LoginPlugin::initializeLogin(): void {#150 …4}
8 => Grav\Plugin\EmailPlugin::onPluginsInitialized() {#151 …3}
9 => Grav\Plugin\FacebookConversionsAPIPlugin::onPluginsInitialized(): void {#152 …4}
10 => Grav\Plugin\FlexObjectsPlugin::onPluginsInitialized(): void {#153 …4}
11 => Grav\Plugin\FormPlugin::onPluginsInitialized(): void {#154 …4}
12 => Grav\Plugin\FPOptimizerPlugin::onPluginsInitialized() {#155 …3}
13 => Grav\Plugin\SocialSEOMetaTagsPlugin::onPluginsInitialized() {#156 …3}
]
"onThemeInitialized" => array:1 [
0 => Grav\Theme\SantoSofa::onThemeInitialized() {#175 …3}
]
"onRequestHandlerInit" => array:1 [
0 => Grav\Plugin\AdminPlugin::onRequestHandlerInit(RequestHandlerEvent $event) {#181 …3}
]
"onGetPageTemplates" => array:1 [
0 => Grav\Plugin\ErrorPlugin::onGetPageTemplates(Event $event): void {#186 …4}
]
"onSchedulerInitialized" => array:3 [
0 => Grav\Plugin\EmailPlugin::onSchedulerInitialized(Event $e) {#197 …3}
1 => Grav\Common\Cache::onSchedulerInitialized(Event $event) {#198 …3}
2 => Grav\Common\Backup\Backups::onSchedulerInitialized(Event $event) {#199 …3}
]
"onTwigTemplatePaths" => array:5 [
0 => Grav\Plugin\EmailPlugin::onTwigTemplatePaths() {#233 …3}
1 => Grav\Plugin\FormPlugin::onTwigTemplatePaths(): void {#234 …4}
2 => Grav\Plugin\LoginPlugin::onTwigTemplatePaths(): void {#235 …4}
3 => Grav\Plugin\FlexObjectsPlugin::onTwigTemplatePaths(): void {#236 …4}
4 => Grav\Plugin\ErrorPlugin::onTwigTemplatePaths(): void {#237 …4}
]
"onTwigLoader" => array:1 [
0 => Grav\Theme\SantoSofa::onTwigLoader() {#239 …3}
]
"onTwigInitialized" => array:2 [
0 => Grav\Plugin\FormPlugin::onTwigInitialized(): void {#250 …4}
1 => Grav\Theme\SantoSofa::onTwigInitialized() {#251 …3}
]
"onTwigExtensions" => array:1 [
0 => Grav\Plugin\FormPlugin::onTwigExtensions(): void {#259 …4}
]
"onPageProcessed" => array:1 [
0 => Grav\Plugin\FormPlugin::onPageProcessed(Event $event): void {#283 …4}
]
"onPagesInitialized" => array:4 [
0 => Grav\Plugin\LoginPlugin::storeReferrerPage(): void {#275 …4}
1 => Grav\Plugin\LoginPlugin::pageVisibility(Event $event): void {#274 …4}
2 => Grav\Plugin\FormPlugin::onPagesInitialized(): void {#273 …4}
3 => Grav\Plugin\FlexObjectsPlugin::onPagesInitialized(Event $event): void {#272 …4}
]
"onPageFallBackUrl" => array:1 [
0 => Grav\Plugin\LoginPlugin::authorizeFallBackUrl(): void {#270 …4}
]
"Grav\Events\FlexRegisterEvent" => array:1 [
0 => Grav\Plugin\FlexObjectsPlugin::onRegisterFlex(FlexRegisterEvent $event): void {#691 …4}
]
"onPageInitialized" => array:6 [
0 => Grav\Plugin\FlexObjectsPlugin::authorizePage(Event $event): void {#552 …4}
1 => Grav\Plugin\LoginPlugin::authorizeLoginPage(Event $event): void {#687 …4}
2 => Grav\Plugin\AdminPlugin::onPageInitialized() {#686 …3}
3 => Grav\Plugin\LoginPlugin::authorizePage(): void {#685 …4}
4 => Grav\Plugin\FormPlugin::onPageInitialized(): void {#684 …4}
5 => Grav\Plugin\SocialSEOMetaTagsPlugin::onPageInitialized(Event $e) {#683 …3}
]
"onUserLoginAuthenticate" => array:5 [
0 => Grav\Plugin\LoginPlugin::userLoginAuthenticateRateLimit(UserLoginEvent $event): void {#677 …4}
1 => Grav\Plugin\LoginPlugin::userLoginAuthenticateByRegistration(UserLoginEvent $event): void {#676 …4}
2 => Grav\Plugin\LoginPlugin::userLoginAuthenticateByRememberMe(UserLoginEvent $event): void {#675 …4}
3 => Grav\Plugin\LoginPlugin::userLoginAuthenticateByEmail(UserLoginEvent $event): void {#674 …4}
4 => Grav\Plugin\LoginPlugin::userLoginAuthenticate(UserLoginEvent $event): void {#673 …4}
]
"onUserLoginGuest" => array:1 [
0 => Grav\Plugin\LoginPlugin::userLoginGuest(UserLoginEvent $event): void {#682 …4}
]
"Grav\Plugin\Login\Events\PageAuthorizeEvent" => array:1 [
0 => Grav\Plugin\LoginPlugin::onPageAuthorizeEvent(PageAuthorizeEvent $event): void {#679 …4}
]
"onFormRegisterTypes" => array:2 [
0 => Grav\Plugin\AdminPlugin::onFormRegisterTypes(Event $event): void {#665 …4}
1 => Grav\Plugin\FlexObjectsPlugin::onFormRegisterTypes(Event $event): void {#664 …4}
]
"onMarkdownInitialized" => array:1 [
0 => Grav\Plugin\MarkdownNoticesPlugin::onMarkdownInitialized(Event $event) {#654 …3}
]
"onTwigPageVariables" => array:1 [
0 => Grav\Plugin\FormPlugin::onTwigVariables(Event $event = null): void {#655 …4}
]
"onPageNotFound" => array:1 [
0 => Grav\Plugin\ErrorPlugin::onPageNotFound(Event $event): void {#1421 …4}
]
"onTwigSiteVariables" => array:4 [
0 => Grav\Plugin\MarkdownNoticesPlugin::onTwigSiteVariables() {#1413 …3}
1 => Grav\Plugin\FormPlugin::onTwigVariables(Event $event = null): void {#1427 …4}
2 => Grav\Plugin\FPOptimizerPlugin::onTwigSiteVariables() {#1433 …3}
3 => Grav\Plugin\LoginPlugin::onTwigSiteVariables(): void {#1432 …4}
]
"onOutputGenerated" => array:1 [
0 => Grav\Plugin\FPOptimizerPlugin::onOutputGenerated(Event $e) {#2002 …3}
]
"onOutputRendered" => array:1 [
0 => Grav\Plugin\FacebookConversionsAPIPlugin::onOutputRendered() {#1708 …3}
]
"onFatalException" => array:1 [
0 => Grav\Plugin\ProblemsPlugin::onFatalException(): void {#180 …4}
]
]
}
/home/santosofa/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:1 [
0 => Grav\Plugin\FacebookConversionsAPIPlugin::onOutputRendered() {#1708 …3}
]
"onOutputRendered"
RocketTheme\Toolbox\Event\Event {#2001}
/home/santosofa/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:1 [
0 => Grav\Plugin\FacebookConversionsAPIPlugin::onOutputRendered() {#1708 …3}
]
"onOutputRendered"
RocketTheme\Toolbox\Event\Event {#2001}
/home/santosofa/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 {#2001}
"onOutputRendered"
/home/santosofa/www/system/src/Grav/Common/Processors/RenderProcessor.php
/** @var PageInterface $page */
$page = $this->container['page'];
// Use internal Grav output.
$container->output = $output;
ob_start();
$event = new Event(['page' => $page, 'output' => &$container->output]);
$container->fireEvent('onOutputGenerated', $event);
echo $container->output;
$html = ob_get_clean();
// remove any output
$container->output = '';
$event = new Event(['page' => $page, 'output' => $html]);
$this->container->fireEvent('onOutputRendered', $event);
$this->stopTimer();
return new Response($page->httpResponseCode(), $page->httpHeaders(), $html);
}
}
Arguments
"onOutputRendered"
RocketTheme\Toolbox\Event\Event {#2001}
/home/santosofa/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 {#178}
Grav\Framework\RequestHandler\RequestHandler {#1414}
/home/santosofa/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 {#178}
/home/santosofa/www/system/src/Grav/Common/Processors/DebuggerAssetsProcessor.php
*/
class DebuggerAssetsProcessor extends ProcessorBase
{
/** @var string */
public $id = 'debugger_assets';
/** @var string */
public $title = 'Debugger Assets';
/**
* @param ServerRequestInterface $request
* @param RequestHandlerInterface $handler
* @return ResponseInterface
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$this->startTimer();
$this->container['debugger']->addAssets();
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#178}
/home/santosofa/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 {#178}
Grav\Framework\RequestHandler\RequestHandler {#1419}
/home/santosofa/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 {#178}
/home/santosofa/www/system/src/Grav/Common/Processors/PagesProcessor.php
/** @var Forms $forms */
$forms = $this->container['forms'] ?? null;
$form = $forms ? $forms->getActiveForm() : null;
$options = ['page' => $page, 'form' => $form, 'request' => $request];
if ($task) {
$event = new Event(['task' => $task] + $options);
$this->container->fireEvent('onPageTask', $event);
$this->container->fireEvent('onPageTask.' . $task, $event);
} elseif ($action) {
$event = new Event(['action' => $action] + $options);
$this->container->fireEvent('onPageAction', $event);
$this->container->fireEvent('onPageAction.' . $action, $event);
}
}
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
Nyholm\Psr7\ServerRequest {#178}
/home/santosofa/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 {#178}
Grav\Framework\RequestHandler\RequestHandler {#264}
/home/santosofa/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 {#178}
/home/santosofa/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 {#178}
/home/santosofa/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 {#178}
Grav\Framework\RequestHandler\RequestHandler {#230}
/home/santosofa/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 {#178}
/home/santosofa/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 {#178}
/home/santosofa/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 {#178}
Grav\Framework\RequestHandler\RequestHandler {#227}
/home/santosofa/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 {#178}
/home/santosofa/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 {#178}
/home/santosofa/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 {#178}
Grav\Framework\RequestHandler\RequestHandler {#194}
/home/santosofa/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 {#178}
/home/santosofa/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 {#178}
/home/santosofa/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 {#178}
Grav\Framework\RequestHandler\RequestHandler {#191}
/home/santosofa/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 {#178}
/home/santosofa/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 {#178}
/home/santosofa/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 {#178}
Grav\Framework\RequestHandler\RequestHandler {#182}
/home/santosofa/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 {#178}
/home/santosofa/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 {#178}
/home/santosofa/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 {#178}
Grav\Framework\RequestHandler\RequestHandler {#176}
/home/santosofa/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/santosofa/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/santosofa/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 {#168}
/home/santosofa/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/santosofa/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/santosofa/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/santosofa/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/santosofa/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/santosofa/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/santosofa/www/system/src/Grav/Common/Processors/InitializeProcessor.php
$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);
// Load plugins.
Arguments
/home/santosofa/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/santosofa/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/santosofa/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/santosofa/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/santosofa/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/santosofa/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/santosofa/www/index.php
if (!is_file($autoload)) {
die('Please run: <i>bin/grav install</i>');
}
// Register the auto-loader.
$loader = require $autoload;
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 $e) {
$grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
throw $e;
} catch (\Exception $e) {
$grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
throw $e;
}