/home/www-grav/user/themes/realestate3/templates/annonce.html.twig
{% extends "partials/base.html.twig" %}
{% set annonce = getDetailAnnonce() %}
{% set pieces = (annonce.piece > 1) ? annonce.piece~' pièces' : (annonce.piece == 1) ? annonce.piece~' pièce' : '' %}
{% block title %}
{{ annonce.loc|Ucfirst~' '~annonce.type~' '~pieces~' '~annonce.surface~'m²'~' - '~annonce.ville|Ucfirst }}
{% endblock %}
{% block head %}
{{ parent() }}
{% endblock %}
{% block content %}
<section class="mbr-section features2 cid-qJ2W84Rb3v" id="features2-5" style="margin-top: 60px;">
<div class="container">
{% set pieces = (annonce.piece > 1) ? annonce.piece~' pièces' : (annonce.piece == 1) ? annonce.piece~' pièce' : '' %}
<h1 class="mbr-section-title main-title mbr-fonts-style align-center pb-5 display-2">{{ annonce.loc|Ucfirst~' '~annonce.type~' '~pieces~' '~annonce.surface~'m²'~' - '~annonce.ville }}</h1>
<div class="underline align-center pb-3">
<div class="line"></div>
</div>
<div class="align-center">{{ annonce.prix|number_format(0, '.', ' ') }}€</div>
<div class="underline align-center pb-3">
<div class="line"></div>
</div>
<div class="row justify-content-center">
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
{% for image in annonce.photos.lg %}
{% if(loop.first) %}
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
{% else %}
<li data-target="#carouselExampleIndicators" data-slide-to="{{ loop.index0 }}"></li>
{% endif %}
{% endfor %}
</ol>
<div class="carousel-inner">
Arguments
"An exception has been thrown during the rendering of a template ("count(): Parameter must be an array or an object that implements Countable")."
/home/www-grav/user/plugins/annonces2/annonces2.php
$url_queries = http_build_query($queries);
$blogurl = 'http://www.lesclesdumidi.com';
$url = $blogurl . '/api/habitation_detail?key=ZxmqNyxxez2w779xnEqvjZ19rYDD54WK&' . $url_queries;
if ( isset($_COOKIE['cyril']) && $_COOKIE['cyril']==1 ) {
echo'<pre>';
var_dump($url);
echo'</pre>';
}
try {
$json = Response::get($url);
} catch (\Exception $e) {
return;
}
$results = json_decode($json, true);
if (count($results) > 0) {
$api_agence = new API_Agences();
$results['agence'] = json_decode($api_agence->getResultsAgence($results['telhab']), true);
$results['agence']['logo'] = 'http://medias.consortium-immobilier.fr/logos/' . ($results['agence']['idperspass'] ?? '') . '.jpg';
$json = json_encode($results);
$results = json_decode($json, true);
} else {
header("Location: annonces", true, 301);
exit();
// Fonction generate410Page() à revoir si on souhaite remplacer la 301 par une page code 4xx
// $this->generate410Page();
}
return $results;
}
public function getDetailAgence()
Arguments
"count(): Parameter must be an array or an object that implements Countable"
/home/www-grav/user/plugins/annonces2/annonces2.php
$url_queries = http_build_query($queries);
$blogurl = 'http://www.lesclesdumidi.com';
$url = $blogurl . '/api/habitation_detail?key=ZxmqNyxxez2w779xnEqvjZ19rYDD54WK&' . $url_queries;
if ( isset($_COOKIE['cyril']) && $_COOKIE['cyril']==1 ) {
echo'<pre>';
var_dump($url);
echo'</pre>';
}
try {
$json = Response::get($url);
} catch (\Exception $e) {
return;
}
$results = json_decode($json, true);
if (count($results) > 0) {
$api_agence = new API_Agences();
$results['agence'] = json_decode($api_agence->getResultsAgence($results['telhab']), true);
$results['agence']['logo'] = 'http://medias.consortium-immobilier.fr/logos/' . ($results['agence']['idperspass'] ?? '') . '.jpg';
$json = json_encode($results);
$results = json_decode($json, true);
} else {
header("Location: annonces", true, 301);
exit();
// Fonction generate410Page() à revoir si on souhaite remplacer la 301 par une page code 4xx
// $this->generate410Page();
}
return $results;
}
public function getDetailAgence()
Arguments
/home/www-grav/cache/twig/93/938e325d02617da0265dc62cf0b1e52e84b634381a54528f804008fcb6bb7a5d.php
{
parent::__construct($env);
$this->blocks = [
'title' => [$this, 'block_title'],
'head' => [$this, 'block_head'],
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "partials/base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 3
$context["annonce"] = call_user_func_array($this->env->getFunction('getDetailAnnonce')->getCallable(), []);
// line 4
$context["pieces"] = ((($this->getAttribute(($context["annonce"] ?? null), "piece", []) > 1)) ? (($this->getAttribute(($context["annonce"] ?? null), "piece", []) . " pièces")) : (((($this->getAttribute(($context["annonce"] ?? null), "piece", []) == 1)) ? (($this->getAttribute(($context["annonce"] ?? null), "piece", []) . " pièce")) : (""))));
// line 1
$this->parent = $this->loadTemplate("partials/base.html.twig", "annonce.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
}
// line 6
public function block_title($context, array $blocks = [])
{
// line 7
echo " ";
echo (((((((((Ucfirst($this->getAttribute(($context["annonce"] ?? null), "loc", [])) . " ") . $this->getAttribute(($context["annonce"] ?? null), "type", [])) . " ") . ($context["pieces"] ?? null)) . " ") . $this->getAttribute(($context["annonce"] ?? null), "surface", [])) . "m²") . " - ") . Ucfirst($this->getAttribute(($context["annonce"] ?? null), "ville", [])));
echo "
";
}
// line 9
public function block_head($context, array $blocks = [])
{
/home/www-grav/vendor/twig/twig/src/Template.php
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
protected function displayWithErrorHandling(array $context, array $blocks = [])
{
try {
$this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Exception $e) {
$e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
$e->guess();
throw $e;
}
}
Arguments
array:29 [
"config" => Config {#95}
"system" => array:27 [
"absolute_urls" => false
"timezone" => ""
"default_locale" => null
"param_sep" => ":"
"wrapped_site" => false
"reverse_proxy_setup" => false
"force_ssl" => false
"force_lowercase_urls" => true
"custom_base_url" => ""
"username_regex" => "^[a-z0-9_-]{3,16}$"
"pwd_regex" => "(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}"
"intl_enabled" => true
"languages" => array:9 [
"supported" => []
"default_lang" => null
"include_default_lang" => true
"pages_fallback_only" => false
"translations" => true
"translations_fallback" => true
"session_store_active" => false
"http_accept_language" => false
"override_locale" => false
]
"home" => array:2 [
"alias" => "/home"
"hide_in_urls" => false
]
"pages" => array:26 [
"theme" => "realestate3"
"order" => array:2 [
"by" => "default"
"dir" => "asc"
]
"list" => array:1 [
"count" => 20
]
"dateformat" => array:3 [
"default" => null
"short" => "jS M Y"
"long" => "F jS \a\t g:ia"
]
"publish_dates" => true
"process" => array:2 [
"markdown" => true
"twig" => true
]
"twig_first" => false
"never_cache_twig" => false
"events" => array:2 [
"page" => true
"twig" => true
]
"markdown" => array:5 [
"extra" => true
"auto_line_breaks" => false
"auto_url_links" => false
"escape_markup" => false
"special_chars" => array:2 [
">" => "gt"
"<" => "lt"
]
]
"types" => array:7 [
0 => "html"
1 => "htm"
2 => "xml"
3 => "txt"
4 => "json"
5 => "rss"
6 => "atom"
]
"append_url_extension" => ""
"expires" => 604800
"cache_control" => null
"last_modified" => false
"etag" => false
"vary_accept_encoding" => false
"redirect_default_route" => false
"redirect_default_code" => 302
"redirect_trailing_slash" => true
"ignore_files" => array:1 [
0 => ".DS_Store"
]
"ignore_folders" => array:2 [
0 => ".git"
1 => ".idea"
]
"ignore_hidden" => true
"hide_empty_folders" => false
"url_taxonomy_filters" => true
"frontmatter" => array:2 [
"process_twig" => false
"ignore_fields" => array:2 [
0 => "form"
1 => "forms"
]
]
]
"cache" => array:13 [
"enabled" => false
"check" => array:1 [
"method" => "file"
]
"driver" => "auto"
"prefix" => "g"
"purge_at" => "0 4 * * *"
"clear_at" => "0 3 * * *"
"clear_job_type" => "standard"
"clear_images_by_default" => true
"cli_compatibility" => false
"lifetime" => 43200
"gzip" => false
"allow_webserver_gzip" => false
"redis" => array:1 [
"socket" => false
]
]
"twig" => array:7 [
"cache" => true
"debug" => true
"auto_reload" => true
"autoescape" => false
"undefined_functions" => true
"undefined_filters" => true
"umask_fix" => false
]
"assets" => array:12 [
"css_pipeline" => false
"css_pipeline_include_externals" => true
"css_pipeline_before_excludes" => true
"css_minify" => false
"css_minify_windows" => false
"css_rewrite" => false
"js_pipeline" => false
"js_pipeline_include_externals" => true
"js_pipeline_before_excludes" => true
"js_minify" => false
"enable_asset_timestamp" => false
"collections" => array:1 [
"jquery" => "system://assets/jquery/jquery-2.x.min.js"
]
]
"errors" => array:2 [
"display" => true
"log" => true
]
"log" => array:2 [
"handler" => "file"
"syslog" => array:1 [
"facility" => "local6"
]
]
"debugger" => array:3 [
"enabled" => true
"shutdown" => array:1 [
"close_connection" => false
]
"twig" => true
]
"images" => array:6 [
"default_image_quality" => 85
"cache_all" => false
"cache_perms" => "0755"
"debug" => false
"auto_fix_orientation" => false
"seofriendly" => false
]
"media" => array:5 [
"enable_media_timestamp" => false
"unsupported_inline_types" => []
"allowed_fallback_types" => []
"auto_metadata_exif" => false
"upload_limit" => 67108864
]
"session" => array:9 [
"enabled" => true
"initialize" => true
"timeout" => 1800
"name" => "grav-site"
"uniqueness" => "path"
"secure" => false
"httponly" => true
"split" => true
"path" => null
]
"gpm" => array:5 [
"releases" => "stable"
"proxy_url" => null
"method" => "auto"
"verify_peer" => true
"official_gpm_only" => true
]
"accounts" => array:2 [
"type" => "data"
"storage" => "file"
]
"strict_mode" => array:2 [
"yaml_compat" => true
"twig_compat" => true
]
]
"theme" => []
"site" => array:10 [
"title" => "Grav"
"default_lang" => "en"
"author" => array:2 [
"name" => "John Appleseed"
"email" => "[email protected]"
]
"taxonomies" => array:2 [
0 => "category"
1 => "tag"
]
"metadata" => array:1 [
"description" => "My Grav Site"
]
"summary" => array:4 [
"enabled" => true
"format" => "short"
"size" => 300
"delimiter" => "==="
]
"redirects" => null
"routes" => array:4 [
"/annonce-[0-9]+\.html" => "/annonce"
"/immobilier-([a-z0-9-]+-[0-9]+)\.html" => "/immo"
"/immobilier-([a-z-]+)\.html" => "/pagesref/$1"
"/agence-[0-9]+\.html" => "/agence"
]
"blog" => array:1 [
"route" => "/blog"
]
"logo" => "user://img/logo2.png"
]
"uri" => Uri {#130}
"assets" => Assets {#191}
"taxonomy" => Taxonomy {#230}
"browser" => Browser {#232}
"base_dir" => "/home/www-grav"
"home_url" => "/"
"base_url" => ""
"base_url_absolute" => "http://www.thetccp.com"
"base_url_relative" => ""
"base_url_simple" => ""
"theme_dir" => "/home/www-grav/user/themes/realestate3"
"theme_url" => "/user/themes/realestate3"
"html_lang" => "en"
"language_codes" => LanguageCodes {#233}
"form" => null
"form_max_filesize" => 64
"form_json_response" => []
"taxonomylist" => Taxonomylist {#308}
"list_url" => "/blog"
"pages" => Page {#236}
"page" => Page {#266}
"header" => {#263}
"media" => Media {#310}
"content" => ""
"grav" => Grav {#3}
]
array:3 [
"title" => array:2 [
0 => __TwigTemplate_2a3d447ede809866e9a964a85368768c1e50ab14de495c1c9ffa579ad636f945 {#316}
1 => "block_title"
]
"head" => array:2 [
0 => __TwigTemplate_2a3d447ede809866e9a964a85368768c1e50ab14de495c1c9ffa579ad636f945 {#316}
1 => "block_head"
]
"content" => array:2 [
0 => __TwigTemplate_2a3d447ede809866e9a964a85368768c1e50ab14de495c1c9ffa579ad636f945 {#316}
1 => "block_content"
]
]
/home/www-grav/vendor/twig/twig/src/Template.php
{
return $this;
}
/**
* Returns all blocks.
*
* This method is for internal use only and should never be called
* directly.
*
* @return array An array of blocks
*/
public function getBlocks()
{
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(function () { return ''; });
}
try {
$this->display($context);
} catch (\Exception $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
Arguments
array:29 [
"config" => Config {#95}
"system" => array:27 [
"absolute_urls" => false
"timezone" => ""
"default_locale" => null
"param_sep" => ":"
"wrapped_site" => false
"reverse_proxy_setup" => false
"force_ssl" => false
"force_lowercase_urls" => true
"custom_base_url" => ""
"username_regex" => "^[a-z0-9_-]{3,16}$"
"pwd_regex" => "(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}"
"intl_enabled" => true
"languages" => array:9 [
"supported" => []
"default_lang" => null
"include_default_lang" => true
"pages_fallback_only" => false
"translations" => true
"translations_fallback" => true
"session_store_active" => false
"http_accept_language" => false
"override_locale" => false
]
"home" => array:2 [
"alias" => "/home"
"hide_in_urls" => false
]
"pages" => array:26 [
"theme" => "realestate3"
"order" => array:2 [
"by" => "default"
"dir" => "asc"
]
"list" => array:1 [
"count" => 20
]
"dateformat" => array:3 [
"default" => null
"short" => "jS M Y"
"long" => "F jS \a\t g:ia"
]
"publish_dates" => true
"process" => array:2 [
"markdown" => true
"twig" => true
]
"twig_first" => false
"never_cache_twig" => false
"events" => array:2 [
"page" => true
"twig" => true
]
"markdown" => array:5 [
"extra" => true
"auto_line_breaks" => false
"auto_url_links" => false
"escape_markup" => false
"special_chars" => array:2 [
">" => "gt"
"<" => "lt"
]
]
"types" => array:7 [
0 => "html"
1 => "htm"
2 => "xml"
3 => "txt"
4 => "json"
5 => "rss"
6 => "atom"
]
"append_url_extension" => ""
"expires" => 604800
"cache_control" => null
"last_modified" => false
"etag" => false
"vary_accept_encoding" => false
"redirect_default_route" => false
"redirect_default_code" => 302
"redirect_trailing_slash" => true
"ignore_files" => array:1 [
0 => ".DS_Store"
]
"ignore_folders" => array:2 [
0 => ".git"
1 => ".idea"
]
"ignore_hidden" => true
"hide_empty_folders" => false
"url_taxonomy_filters" => true
"frontmatter" => array:2 [
"process_twig" => false
"ignore_fields" => array:2 [
0 => "form"
1 => "forms"
]
]
]
"cache" => array:13 [
"enabled" => false
"check" => array:1 [
"method" => "file"
]
"driver" => "auto"
"prefix" => "g"
"purge_at" => "0 4 * * *"
"clear_at" => "0 3 * * *"
"clear_job_type" => "standard"
"clear_images_by_default" => true
"cli_compatibility" => false
"lifetime" => 43200
"gzip" => false
"allow_webserver_gzip" => false
"redis" => array:1 [
"socket" => false
]
]
"twig" => array:7 [
"cache" => true
"debug" => true
"auto_reload" => true
"autoescape" => false
"undefined_functions" => true
"undefined_filters" => true
"umask_fix" => false
]
"assets" => array:12 [
"css_pipeline" => false
"css_pipeline_include_externals" => true
"css_pipeline_before_excludes" => true
"css_minify" => false
"css_minify_windows" => false
"css_rewrite" => false
"js_pipeline" => false
"js_pipeline_include_externals" => true
"js_pipeline_before_excludes" => true
"js_minify" => false
"enable_asset_timestamp" => false
"collections" => array:1 [
"jquery" => "system://assets/jquery/jquery-2.x.min.js"
]
]
"errors" => array:2 [
"display" => true
"log" => true
]
"log" => array:2 [
"handler" => "file"
"syslog" => array:1 [
"facility" => "local6"
]
]
"debugger" => array:3 [
"enabled" => true
"shutdown" => array:1 [
"close_connection" => false
]
"twig" => true
]
"images" => array:6 [
"default_image_quality" => 85
"cache_all" => false
"cache_perms" => "0755"
"debug" => false
"auto_fix_orientation" => false
"seofriendly" => false
]
"media" => array:5 [
"enable_media_timestamp" => false
"unsupported_inline_types" => []
"allowed_fallback_types" => []
"auto_metadata_exif" => false
"upload_limit" => 67108864
]
"session" => array:9 [
"enabled" => true
"initialize" => true
"timeout" => 1800
"name" => "grav-site"
"uniqueness" => "path"
"secure" => false
"httponly" => true
"split" => true
"path" => null
]
"gpm" => array:5 [
"releases" => "stable"
"proxy_url" => null
"method" => "auto"
"verify_peer" => true
"official_gpm_only" => true
]
"accounts" => array:2 [
"type" => "data"
"storage" => "file"
]
"strict_mode" => array:2 [
"yaml_compat" => true
"twig_compat" => true
]
]
"theme" => []
"site" => array:10 [
"title" => "Grav"
"default_lang" => "en"
"author" => array:2 [
"name" => "John Appleseed"
"email" => "[email protected]"
]
"taxonomies" => array:2 [
0 => "category"
1 => "tag"
]
"metadata" => array:1 [
"description" => "My Grav Site"
]
"summary" => array:4 [
"enabled" => true
"format" => "short"
"size" => 300
"delimiter" => "==="
]
"redirects" => null
"routes" => array:4 [
"/annonce-[0-9]+\.html" => "/annonce"
"/immobilier-([a-z0-9-]+-[0-9]+)\.html" => "/immo"
"/immobilier-([a-z-]+)\.html" => "/pagesref/$1"
"/agence-[0-9]+\.html" => "/agence"
]
"blog" => array:1 [
"route" => "/blog"
]
"logo" => "user://img/logo2.png"
]
"uri" => Uri {#130}
"assets" => Assets {#191}
"taxonomy" => Taxonomy {#230}
"browser" => Browser {#232}
"base_dir" => "/home/www-grav"
"home_url" => "/"
"base_url" => ""
"base_url_absolute" => "http://www.thetccp.com"
"base_url_relative" => ""
"base_url_simple" => ""
"theme_dir" => "/home/www-grav/user/themes/realestate3"
"theme_url" => "/user/themes/realestate3"
"html_lang" => "en"
"language_codes" => LanguageCodes {#233}
"form" => null
"form_max_filesize" => 64
"form_json_response" => []
"taxonomylist" => Taxonomylist {#308}
"list_url" => "/blog"
"pages" => Page {#236}
"page" => Page {#266}
"header" => {#263}
"media" => Media {#310}
"content" => ""
"grav" => Grav {#3}
]
array:3 [
"title" => array:2 [
0 => __TwigTemplate_2a3d447ede809866e9a964a85368768c1e50ab14de495c1c9ffa579ad636f945 {#316}
1 => "block_title"
]
"head" => array:2 [
0 => __TwigTemplate_2a3d447ede809866e9a964a85368768c1e50ab14de495c1c9ffa579ad636f945 {#316}
1 => "block_head"
]
"content" => array:2 [
0 => __TwigTemplate_2a3d447ede809866e9a964a85368768c1e50ab14de495c1c9ffa579ad636f945 {#316}
1 => "block_content"
]
]
/home/www-grav/vendor/twig/twig/src/Template.php
public function getBlocks()
{
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(function () { return ''; });
}
try {
$this->display($context);
} catch (\Exception $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
protected function displayWithErrorHandling(array $context, array $blocks = [])
{
try {
Arguments
array:28 [
"config" => Config {#95}
"system" => array:27 [
"absolute_urls" => false
"timezone" => ""
"default_locale" => null
"param_sep" => ":"
"wrapped_site" => false
"reverse_proxy_setup" => false
"force_ssl" => false
"force_lowercase_urls" => true
"custom_base_url" => ""
"username_regex" => "^[a-z0-9_-]{3,16}$"
"pwd_regex" => "(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}"
"intl_enabled" => true
"languages" => array:9 [
"supported" => []
"default_lang" => null
"include_default_lang" => true
"pages_fallback_only" => false
"translations" => true
"translations_fallback" => true
"session_store_active" => false
"http_accept_language" => false
"override_locale" => false
]
"home" => array:2 [
"alias" => "/home"
"hide_in_urls" => false
]
"pages" => array:26 [
"theme" => "realestate3"
"order" => array:2 [
"by" => "default"
"dir" => "asc"
]
"list" => array:1 [
"count" => 20
]
"dateformat" => array:3 [
"default" => null
"short" => "jS M Y"
"long" => "F jS \a\t g:ia"
]
"publish_dates" => true
"process" => array:2 [
"markdown" => true
"twig" => true
]
"twig_first" => false
"never_cache_twig" => false
"events" => array:2 [
"page" => true
"twig" => true
]
"markdown" => array:5 [
"extra" => true
"auto_line_breaks" => false
"auto_url_links" => false
"escape_markup" => false
"special_chars" => array:2 [
">" => "gt"
"<" => "lt"
]
]
"types" => array:7 [
0 => "html"
1 => "htm"
2 => "xml"
3 => "txt"
4 => "json"
5 => "rss"
6 => "atom"
]
"append_url_extension" => ""
"expires" => 604800
"cache_control" => null
"last_modified" => false
"etag" => false
"vary_accept_encoding" => false
"redirect_default_route" => false
"redirect_default_code" => 302
"redirect_trailing_slash" => true
"ignore_files" => array:1 [
0 => ".DS_Store"
]
"ignore_folders" => array:2 [
0 => ".git"
1 => ".idea"
]
"ignore_hidden" => true
"hide_empty_folders" => false
"url_taxonomy_filters" => true
"frontmatter" => array:2 [
"process_twig" => false
"ignore_fields" => array:2 [
0 => "form"
1 => "forms"
]
]
]
"cache" => array:13 [
"enabled" => false
"check" => array:1 [
"method" => "file"
]
"driver" => "auto"
"prefix" => "g"
"purge_at" => "0 4 * * *"
"clear_at" => "0 3 * * *"
"clear_job_type" => "standard"
"clear_images_by_default" => true
"cli_compatibility" => false
"lifetime" => 43200
"gzip" => false
"allow_webserver_gzip" => false
"redis" => array:1 [
"socket" => false
]
]
"twig" => array:7 [
"cache" => true
"debug" => true
"auto_reload" => true
"autoescape" => false
"undefined_functions" => true
"undefined_filters" => true
"umask_fix" => false
]
"assets" => array:12 [
"css_pipeline" => false
"css_pipeline_include_externals" => true
"css_pipeline_before_excludes" => true
"css_minify" => false
"css_minify_windows" => false
"css_rewrite" => false
"js_pipeline" => false
"js_pipeline_include_externals" => true
"js_pipeline_before_excludes" => true
"js_minify" => false
"enable_asset_timestamp" => false
"collections" => array:1 [
"jquery" => "system://assets/jquery/jquery-2.x.min.js"
]
]
"errors" => array:2 [
"display" => true
"log" => true
]
"log" => array:2 [
"handler" => "file"
"syslog" => array:1 [
"facility" => "local6"
]
]
"debugger" => array:3 [
"enabled" => true
"shutdown" => array:1 [
"close_connection" => false
]
"twig" => true
]
"images" => array:6 [
"default_image_quality" => 85
"cache_all" => false
"cache_perms" => "0755"
"debug" => false
"auto_fix_orientation" => false
"seofriendly" => false
]
"media" => array:5 [
"enable_media_timestamp" => false
"unsupported_inline_types" => []
"allowed_fallback_types" => []
"auto_metadata_exif" => false
"upload_limit" => 67108864
]
"session" => array:9 [
"enabled" => true
"initialize" => true
"timeout" => 1800
"name" => "grav-site"
"uniqueness" => "path"
"secure" => false
"httponly" => true
"split" => true
"path" => null
]
"gpm" => array:5 [
"releases" => "stable"
"proxy_url" => null
"method" => "auto"
"verify_peer" => true
"official_gpm_only" => true
]
"accounts" => array:2 [
"type" => "data"
"storage" => "file"
]
"strict_mode" => array:2 [
"yaml_compat" => true
"twig_compat" => true
]
]
"theme" => []
"site" => array:10 [
"title" => "Grav"
"default_lang" => "en"
"author" => array:2 [
"name" => "John Appleseed"
"email" => "[email protected]"
]
"taxonomies" => array:2 [
0 => "category"
1 => "tag"
]
"metadata" => array:1 [
"description" => "My Grav Site"
]
"summary" => array:4 [
"enabled" => true
"format" => "short"
"size" => 300
"delimiter" => "==="
]
"redirects" => null
"routes" => array:4 [
"/annonce-[0-9]+\.html" => "/annonce"
"/immobilier-([a-z0-9-]+-[0-9]+)\.html" => "/immo"
"/immobilier-([a-z-]+)\.html" => "/pagesref/$1"
"/agence-[0-9]+\.html" => "/agence"
]
"blog" => array:1 [
"route" => "/blog"
]
"logo" => "user://img/logo2.png"
]
"uri" => Uri {#130}
"assets" => Assets {#191}
"taxonomy" => Taxonomy {#230}
"browser" => Browser {#232}
"base_dir" => "/home/www-grav"
"home_url" => "/"
"base_url" => ""
"base_url_absolute" => "http://www.thetccp.com"
"base_url_relative" => ""
"base_url_simple" => ""
"theme_dir" => "/home/www-grav/user/themes/realestate3"
"theme_url" => "/user/themes/realestate3"
"html_lang" => "en"
"language_codes" => LanguageCodes {#233}
"form" => null
"form_max_filesize" => 64
"form_json_response" => []
"taxonomylist" => Taxonomylist {#308}
"list_url" => "/blog"
"pages" => Page {#236}
"page" => Page {#266}
"header" => {#263}
"media" => Media {#310}
"content" => ""
]
/home/www-grav/vendor/twig/twig/src/TemplateWrapper.php
* @internal
*/
public function __construct(Environment $env, Template $template)
{
$this->env = $env;
$this->template = $template;
}
/**
* Renders the template.
*
* @param array $context An array of parameters to pass to the template
*
* @return string The rendered template
*/
public function render($context = [])
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
return $this->template->render($context, \func_num_args() > 1 ? func_get_arg(1) : []);
}
/**
* Displays the template.
*
* @param array $context An array of parameters to pass to the template
*/
public function display($context = [])
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
$this->template->display($context, \func_num_args() > 1 ? func_get_arg(1) : []);
}
/**
* Checks if a block is defined.
*
* @param string $name The block name
* @param array $context An array of parameters to pass to the template
*
Arguments
array:28 [
"config" => Config {#95}
"system" => array:27 [
"absolute_urls" => false
"timezone" => ""
"default_locale" => null
"param_sep" => ":"
"wrapped_site" => false
"reverse_proxy_setup" => false
"force_ssl" => false
"force_lowercase_urls" => true
"custom_base_url" => ""
"username_regex" => "^[a-z0-9_-]{3,16}$"
"pwd_regex" => "(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}"
"intl_enabled" => true
"languages" => array:9 [
"supported" => []
"default_lang" => null
"include_default_lang" => true
"pages_fallback_only" => false
"translations" => true
"translations_fallback" => true
"session_store_active" => false
"http_accept_language" => false
"override_locale" => false
]
"home" => array:2 [
"alias" => "/home"
"hide_in_urls" => false
]
"pages" => array:26 [
"theme" => "realestate3"
"order" => array:2 [
"by" => "default"
"dir" => "asc"
]
"list" => array:1 [
"count" => 20
]
"dateformat" => array:3 [
"default" => null
"short" => "jS M Y"
"long" => "F jS \a\t g:ia"
]
"publish_dates" => true
"process" => array:2 [
"markdown" => true
"twig" => true
]
"twig_first" => false
"never_cache_twig" => false
"events" => array:2 [
"page" => true
"twig" => true
]
"markdown" => array:5 [
"extra" => true
"auto_line_breaks" => false
"auto_url_links" => false
"escape_markup" => false
"special_chars" => array:2 [
">" => "gt"
"<" => "lt"
]
]
"types" => array:7 [
0 => "html"
1 => "htm"
2 => "xml"
3 => "txt"
4 => "json"
5 => "rss"
6 => "atom"
]
"append_url_extension" => ""
"expires" => 604800
"cache_control" => null
"last_modified" => false
"etag" => false
"vary_accept_encoding" => false
"redirect_default_route" => false
"redirect_default_code" => 302
"redirect_trailing_slash" => true
"ignore_files" => array:1 [
0 => ".DS_Store"
]
"ignore_folders" => array:2 [
0 => ".git"
1 => ".idea"
]
"ignore_hidden" => true
"hide_empty_folders" => false
"url_taxonomy_filters" => true
"frontmatter" => array:2 [
"process_twig" => false
"ignore_fields" => array:2 [
0 => "form"
1 => "forms"
]
]
]
"cache" => array:13 [
"enabled" => false
"check" => array:1 [
"method" => "file"
]
"driver" => "auto"
"prefix" => "g"
"purge_at" => "0 4 * * *"
"clear_at" => "0 3 * * *"
"clear_job_type" => "standard"
"clear_images_by_default" => true
"cli_compatibility" => false
"lifetime" => 43200
"gzip" => false
"allow_webserver_gzip" => false
"redis" => array:1 [
"socket" => false
]
]
"twig" => array:7 [
"cache" => true
"debug" => true
"auto_reload" => true
"autoescape" => false
"undefined_functions" => true
"undefined_filters" => true
"umask_fix" => false
]
"assets" => array:12 [
"css_pipeline" => false
"css_pipeline_include_externals" => true
"css_pipeline_before_excludes" => true
"css_minify" => false
"css_minify_windows" => false
"css_rewrite" => false
"js_pipeline" => false
"js_pipeline_include_externals" => true
"js_pipeline_before_excludes" => true
"js_minify" => false
"enable_asset_timestamp" => false
"collections" => array:1 [
"jquery" => "system://assets/jquery/jquery-2.x.min.js"
]
]
"errors" => array:2 [
"display" => true
"log" => true
]
"log" => array:2 [
"handler" => "file"
"syslog" => array:1 [
"facility" => "local6"
]
]
"debugger" => array:3 [
"enabled" => true
"shutdown" => array:1 [
"close_connection" => false
]
"twig" => true
]
"images" => array:6 [
"default_image_quality" => 85
"cache_all" => false
"cache_perms" => "0755"
"debug" => false
"auto_fix_orientation" => false
"seofriendly" => false
]
"media" => array:5 [
"enable_media_timestamp" => false
"unsupported_inline_types" => []
"allowed_fallback_types" => []
"auto_metadata_exif" => false
"upload_limit" => 67108864
]
"session" => array:9 [
"enabled" => true
"initialize" => true
"timeout" => 1800
"name" => "grav-site"
"uniqueness" => "path"
"secure" => false
"httponly" => true
"split" => true
"path" => null
]
"gpm" => array:5 [
"releases" => "stable"
"proxy_url" => null
"method" => "auto"
"verify_peer" => true
"official_gpm_only" => true
]
"accounts" => array:2 [
"type" => "data"
"storage" => "file"
]
"strict_mode" => array:2 [
"yaml_compat" => true
"twig_compat" => true
]
]
"theme" => []
"site" => array:10 [
"title" => "Grav"
"default_lang" => "en"
"author" => array:2 [
"name" => "John Appleseed"
"email" => "[email protected]"
]
"taxonomies" => array:2 [
0 => "category"
1 => "tag"
]
"metadata" => array:1 [
"description" => "My Grav Site"
]
"summary" => array:4 [
"enabled" => true
"format" => "short"
"size" => 300
"delimiter" => "==="
]
"redirects" => null
"routes" => array:4 [
"/annonce-[0-9]+\.html" => "/annonce"
"/immobilier-([a-z0-9-]+-[0-9]+)\.html" => "/immo"
"/immobilier-([a-z-]+)\.html" => "/pagesref/$1"
"/agence-[0-9]+\.html" => "/agence"
]
"blog" => array:1 [
"route" => "/blog"
]
"logo" => "user://img/logo2.png"
]
"uri" => Uri {#130}
"assets" => Assets {#191}
"taxonomy" => Taxonomy {#230}
"browser" => Browser {#232}
"base_dir" => "/home/www-grav"
"home_url" => "/"
"base_url" => ""
"base_url_absolute" => "http://www.thetccp.com"
"base_url_relative" => ""
"base_url_simple" => ""
"theme_dir" => "/home/www-grav/user/themes/realestate3"
"theme_url" => "/user/themes/realestate3"
"html_lang" => "en"
"language_codes" => LanguageCodes {#233}
"form" => null
"form_max_filesize" => 64
"form_json_response" => []
"taxonomylist" => Taxonomylist {#308}
"list_url" => "/blog"
"pages" => Page {#236}
"page" => Page {#266}
"header" => {#263}
"media" => Media {#310}
"content" => ""
]
[]
/home/www-grav/vendor/twig/twig/src/Environment.php
@trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
return $this->templateClassPrefix;
}
/**
* Renders a template.
*
* @param string|TemplateWrapper $name The template name
* @param array $context An array of parameters to pass to the template
*
* @return string The rendered template
*
* @throws LoaderError When the template cannot be found
* @throws SyntaxError When an error occurred during compilation
* @throws RuntimeError When an error occurred during rendering
*/
public function render($name, array $context = [])
{
return $this->load($name)->render($context);
}
/**
* Displays a template.
*
* @param string|TemplateWrapper $name The template name
* @param array $context An array of parameters to pass to the template
*
* @throws LoaderError When the template cannot be found
* @throws SyntaxError When an error occurred during compilation
* @throws RuntimeError When an error occurred during rendering
*/
public function display($name, array $context = [])
{
$this->load($name)->display($context);
}
/**
* Loads a template.
*
Arguments
array:28 [
"config" => Config {#95}
"system" => array:27 [
"absolute_urls" => false
"timezone" => ""
"default_locale" => null
"param_sep" => ":"
"wrapped_site" => false
"reverse_proxy_setup" => false
"force_ssl" => false
"force_lowercase_urls" => true
"custom_base_url" => ""
"username_regex" => "^[a-z0-9_-]{3,16}$"
"pwd_regex" => "(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}"
"intl_enabled" => true
"languages" => array:9 [
"supported" => []
"default_lang" => null
"include_default_lang" => true
"pages_fallback_only" => false
"translations" => true
"translations_fallback" => true
"session_store_active" => false
"http_accept_language" => false
"override_locale" => false
]
"home" => array:2 [
"alias" => "/home"
"hide_in_urls" => false
]
"pages" => array:26 [
"theme" => "realestate3"
"order" => array:2 [
"by" => "default"
"dir" => "asc"
]
"list" => array:1 [
"count" => 20
]
"dateformat" => array:3 [
"default" => null
"short" => "jS M Y"
"long" => "F jS \a\t g:ia"
]
"publish_dates" => true
"process" => array:2 [
"markdown" => true
"twig" => true
]
"twig_first" => false
"never_cache_twig" => false
"events" => array:2 [
"page" => true
"twig" => true
]
"markdown" => array:5 [
"extra" => true
"auto_line_breaks" => false
"auto_url_links" => false
"escape_markup" => false
"special_chars" => array:2 [
">" => "gt"
"<" => "lt"
]
]
"types" => array:7 [
0 => "html"
1 => "htm"
2 => "xml"
3 => "txt"
4 => "json"
5 => "rss"
6 => "atom"
]
"append_url_extension" => ""
"expires" => 604800
"cache_control" => null
"last_modified" => false
"etag" => false
"vary_accept_encoding" => false
"redirect_default_route" => false
"redirect_default_code" => 302
"redirect_trailing_slash" => true
"ignore_files" => array:1 [
0 => ".DS_Store"
]
"ignore_folders" => array:2 [
0 => ".git"
1 => ".idea"
]
"ignore_hidden" => true
"hide_empty_folders" => false
"url_taxonomy_filters" => true
"frontmatter" => array:2 [
"process_twig" => false
"ignore_fields" => array:2 [
0 => "form"
1 => "forms"
]
]
]
"cache" => array:13 [
"enabled" => false
"check" => array:1 [
"method" => "file"
]
"driver" => "auto"
"prefix" => "g"
"purge_at" => "0 4 * * *"
"clear_at" => "0 3 * * *"
"clear_job_type" => "standard"
"clear_images_by_default" => true
"cli_compatibility" => false
"lifetime" => 43200
"gzip" => false
"allow_webserver_gzip" => false
"redis" => array:1 [
"socket" => false
]
]
"twig" => array:7 [
"cache" => true
"debug" => true
"auto_reload" => true
"autoescape" => false
"undefined_functions" => true
"undefined_filters" => true
"umask_fix" => false
]
"assets" => array:12 [
"css_pipeline" => false
"css_pipeline_include_externals" => true
"css_pipeline_before_excludes" => true
"css_minify" => false
"css_minify_windows" => false
"css_rewrite" => false
"js_pipeline" => false
"js_pipeline_include_externals" => true
"js_pipeline_before_excludes" => true
"js_minify" => false
"enable_asset_timestamp" => false
"collections" => array:1 [
"jquery" => "system://assets/jquery/jquery-2.x.min.js"
]
]
"errors" => array:2 [
"display" => true
"log" => true
]
"log" => array:2 [
"handler" => "file"
"syslog" => array:1 [
"facility" => "local6"
]
]
"debugger" => array:3 [
"enabled" => true
"shutdown" => array:1 [
"close_connection" => false
]
"twig" => true
]
"images" => array:6 [
"default_image_quality" => 85
"cache_all" => false
"cache_perms" => "0755"
"debug" => false
"auto_fix_orientation" => false
"seofriendly" => false
]
"media" => array:5 [
"enable_media_timestamp" => false
"unsupported_inline_types" => []
"allowed_fallback_types" => []
"auto_metadata_exif" => false
"upload_limit" => 67108864
]
"session" => array:9 [
"enabled" => true
"initialize" => true
"timeout" => 1800
"name" => "grav-site"
"uniqueness" => "path"
"secure" => false
"httponly" => true
"split" => true
"path" => null
]
"gpm" => array:5 [
"releases" => "stable"
"proxy_url" => null
"method" => "auto"
"verify_peer" => true
"official_gpm_only" => true
]
"accounts" => array:2 [
"type" => "data"
"storage" => "file"
]
"strict_mode" => array:2 [
"yaml_compat" => true
"twig_compat" => true
]
]
"theme" => []
"site" => array:10 [
"title" => "Grav"
"default_lang" => "en"
"author" => array:2 [
"name" => "John Appleseed"
"email" => "[email protected]"
]
"taxonomies" => array:2 [
0 => "category"
1 => "tag"
]
"metadata" => array:1 [
"description" => "My Grav Site"
]
"summary" => array:4 [
"enabled" => true
"format" => "short"
"size" => 300
"delimiter" => "==="
]
"redirects" => null
"routes" => array:4 [
"/annonce-[0-9]+\.html" => "/annonce"
"/immobilier-([a-z0-9-]+-[0-9]+)\.html" => "/immo"
"/immobilier-([a-z-]+)\.html" => "/pagesref/$1"
"/agence-[0-9]+\.html" => "/agence"
]
"blog" => array:1 [
"route" => "/blog"
]
"logo" => "user://img/logo2.png"
]
"uri" => Uri {#130}
"assets" => Assets {#191}
"taxonomy" => Taxonomy {#230}
"browser" => Browser {#232}
"base_dir" => "/home/www-grav"
"home_url" => "/"
"base_url" => ""
"base_url_absolute" => "http://www.thetccp.com"
"base_url_relative" => ""
"base_url_simple" => ""
"theme_dir" => "/home/www-grav/user/themes/realestate3"
"theme_url" => "/user/themes/realestate3"
"html_lang" => "en"
"language_codes" => LanguageCodes {#233}
"form" => null
"form_max_filesize" => 64
"form_json_response" => []
"taxonomylist" => Taxonomylist {#308}
"list_url" => "/blog"
"pages" => Page {#236}
"page" => Page {#266}
"header" => {#263}
"media" => Media {#310}
"content" => ""
]
/home/www-grav/system/src/Grav/Common/Twig/Twig.php
$twig_vars['theme'] = $this->grav['config']->get('theme');
$twig_vars['pages'] = $pages->root();
$twig_vars['page'] = $page;
$twig_vars['header'] = $page->header();
$twig_vars['media'] = $page->media();
$twig_vars['content'] = $content;
$ext = '.' . ($format ?: 'html') . TWIG_EXT;
// determine if params are set, if so disable twig cache
$params = $this->grav['uri']->params(null, true);
if (!empty($params)) {
$this->twig->setCache(false);
}
// Get Twig template layout
$template = $this->template($page->template() . $ext);
try {
$output = $this->twig->render($template, $vars + $twig_vars);
} catch (\Twig_Error_Loader $e) {
$error_msg = $e->getMessage();
// Try html version of this template if initial template was NOT html
if ($ext !== '.html' . TWIG_EXT) {
try {
$page->templateFormat('html');
$output = $this->twig->render($page->template() . '.html' . TWIG_EXT, $vars + $twig_vars);
} catch (\Twig_Error_Loader $e) {
throw new \RuntimeException($error_msg, 400, $e);
}
} else {
throw new \RuntimeException($error_msg, 400, $e);
}
}
return $output;
}
/**
* Wraps the Twig_Loader_Filesystem addPath method (should be used only in `onTwigLoader()` event
Arguments
"annonce.html.twig"
array:28 [
"config" => Config {#95}
"system" => array:27 [
"absolute_urls" => false
"timezone" => ""
"default_locale" => null
"param_sep" => ":"
"wrapped_site" => false
"reverse_proxy_setup" => false
"force_ssl" => false
"force_lowercase_urls" => true
"custom_base_url" => ""
"username_regex" => "^[a-z0-9_-]{3,16}$"
"pwd_regex" => "(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}"
"intl_enabled" => true
"languages" => array:9 [
"supported" => []
"default_lang" => null
"include_default_lang" => true
"pages_fallback_only" => false
"translations" => true
"translations_fallback" => true
"session_store_active" => false
"http_accept_language" => false
"override_locale" => false
]
"home" => array:2 [
"alias" => "/home"
"hide_in_urls" => false
]
"pages" => array:26 [
"theme" => "realestate3"
"order" => array:2 [
"by" => "default"
"dir" => "asc"
]
"list" => array:1 [
"count" => 20
]
"dateformat" => array:3 [
"default" => null
"short" => "jS M Y"
"long" => "F jS \a\t g:ia"
]
"publish_dates" => true
"process" => array:2 [
"markdown" => true
"twig" => true
]
"twig_first" => false
"never_cache_twig" => false
"events" => array:2 [
"page" => true
"twig" => true
]
"markdown" => array:5 [
"extra" => true
"auto_line_breaks" => false
"auto_url_links" => false
"escape_markup" => false
"special_chars" => array:2 [
">" => "gt"
"<" => "lt"
]
]
"types" => array:7 [
0 => "html"
1 => "htm"
2 => "xml"
3 => "txt"
4 => "json"
5 => "rss"
6 => "atom"
]
"append_url_extension" => ""
"expires" => 604800
"cache_control" => null
"last_modified" => false
"etag" => false
"vary_accept_encoding" => false
"redirect_default_route" => false
"redirect_default_code" => 302
"redirect_trailing_slash" => true
"ignore_files" => array:1 [
0 => ".DS_Store"
]
"ignore_folders" => array:2 [
0 => ".git"
1 => ".idea"
]
"ignore_hidden" => true
"hide_empty_folders" => false
"url_taxonomy_filters" => true
"frontmatter" => array:2 [
"process_twig" => false
"ignore_fields" => array:2 [
0 => "form"
1 => "forms"
]
]
]
"cache" => array:13 [
"enabled" => false
"check" => array:1 [
"method" => "file"
]
"driver" => "auto"
"prefix" => "g"
"purge_at" => "0 4 * * *"
"clear_at" => "0 3 * * *"
"clear_job_type" => "standard"
"clear_images_by_default" => true
"cli_compatibility" => false
"lifetime" => 43200
"gzip" => false
"allow_webserver_gzip" => false
"redis" => array:1 [
"socket" => false
]
]
"twig" => array:7 [
"cache" => true
"debug" => true
"auto_reload" => true
"autoescape" => false
"undefined_functions" => true
"undefined_filters" => true
"umask_fix" => false
]
"assets" => array:12 [
"css_pipeline" => false
"css_pipeline_include_externals" => true
"css_pipeline_before_excludes" => true
"css_minify" => false
"css_minify_windows" => false
"css_rewrite" => false
"js_pipeline" => false
"js_pipeline_include_externals" => true
"js_pipeline_before_excludes" => true
"js_minify" => false
"enable_asset_timestamp" => false
"collections" => array:1 [
"jquery" => "system://assets/jquery/jquery-2.x.min.js"
]
]
"errors" => array:2 [
"display" => true
"log" => true
]
"log" => array:2 [
"handler" => "file"
"syslog" => array:1 [
"facility" => "local6"
]
]
"debugger" => array:3 [
"enabled" => true
"shutdown" => array:1 [
"close_connection" => false
]
"twig" => true
]
"images" => array:6 [
"default_image_quality" => 85
"cache_all" => false
"cache_perms" => "0755"
"debug" => false
"auto_fix_orientation" => false
"seofriendly" => false
]
"media" => array:5 [
"enable_media_timestamp" => false
"unsupported_inline_types" => []
"allowed_fallback_types" => []
"auto_metadata_exif" => false
"upload_limit" => 67108864
]
"session" => array:9 [
"enabled" => true
"initialize" => true
"timeout" => 1800
"name" => "grav-site"
"uniqueness" => "path"
"secure" => false
"httponly" => true
"split" => true
"path" => null
]
"gpm" => array:5 [
"releases" => "stable"
"proxy_url" => null
"method" => "auto"
"verify_peer" => true
"official_gpm_only" => true
]
"accounts" => array:2 [
"type" => "data"
"storage" => "file"
]
"strict_mode" => array:2 [
"yaml_compat" => true
"twig_compat" => true
]
]
"theme" => []
"site" => array:10 [
"title" => "Grav"
"default_lang" => "en"
"author" => array:2 [
"name" => "John Appleseed"
"email" => "[email protected]"
]
"taxonomies" => array:2 [
0 => "category"
1 => "tag"
]
"metadata" => array:1 [
"description" => "My Grav Site"
]
"summary" => array:4 [
"enabled" => true
"format" => "short"
"size" => 300
"delimiter" => "==="
]
"redirects" => null
"routes" => array:4 [
"/annonce-[0-9]+\.html" => "/annonce"
"/immobilier-([a-z0-9-]+-[0-9]+)\.html" => "/immo"
"/immobilier-([a-z-]+)\.html" => "/pagesref/$1"
"/agence-[0-9]+\.html" => "/agence"
]
"blog" => array:1 [
"route" => "/blog"
]
"logo" => "user://img/logo2.png"
]
"uri" => Uri {#130}
"assets" => Assets {#191}
"taxonomy" => Taxonomy {#230}
"browser" => Browser {#232}
"base_dir" => "/home/www-grav"
"home_url" => "/"
"base_url" => ""
"base_url_absolute" => "http://www.thetccp.com"
"base_url_relative" => ""
"base_url_simple" => ""
"theme_dir" => "/home/www-grav/user/themes/realestate3"
"theme_url" => "/user/themes/realestate3"
"html_lang" => "en"
"language_codes" => LanguageCodes {#233}
"form" => null
"form_max_filesize" => 64
"form_json_response" => []
"taxonomylist" => Taxonomylist {#308}
"list_url" => "/blog"
"pages" => Page {#236}
"page" => Page {#266}
"header" => {#263}
"media" => Media {#310}
"content" => ""
]
/home/www-grav/system/src/Grav/Common/Service/OutputServiceProvider.php
namespace Grav\Common\Service;
use Grav\Common\Page\Interfaces\PageInterface;
use Grav\Common\Twig\Twig;
use Pimple\Container;
use Pimple\ServiceProviderInterface;
class OutputServiceProvider implements ServiceProviderInterface
{
public function register(Container $container)
{
$container['output'] = function ($c) {
/** @var Twig $twig */
$twig = $c['twig'];
/** @var PageInterface $page */
$page = $c['page'];
return $twig->processSite($page->templateFormat());
};
}
}
Arguments
/home/www-grav/vendor/pimple/pimple/src/Pimple/Container.php
{
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;
return $val;
}
/**
* Checks if a parameter or an object is set.
*
* @param string $id The unique identifier for the parameter or object
*
* @return bool
*/
public function offsetExists($id)
{
return isset($this->keys[$id]);
}
/**
Arguments
/home/www-grav/system/src/Grav/Common/Processors/RenderProcessor.php
namespace Grav\Common\Processors;
use Grav\Common\Page\Interfaces\PageInterface;
use Grav\Framework\Psr7\Response;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
class RenderProcessor extends ProcessorBase
{
public $id = 'render';
public $title = 'Render';
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
{
$this->startTimer();
$container = $this->container;
$output = $container['output'];
if ($output instanceof ResponseInterface) {
return $output;
}
ob_start();
// Use internal Grav output.
$container->output = $output;
$container->fireEvent('onOutputGenerated');
echo $container->output;
// remove any output
$container->output = '';
$this->container->fireEvent('onOutputRendered');
$html = ob_get_clean();
Arguments
/home/www-grav/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 {#152}
RequestHandler {#302}
/home/www-grav/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/www-grav/system/src/Grav/Common/Processors/DebuggerAssetsProcessor.php
namespace Grav\Common\Processors;
use Grav\Framework\Psr7\Response;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
class DebuggerAssetsProcessor extends ProcessorBase
{
public $id = 'debugger_assets';
public $title = 'Debugger Assets';
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
{
$this->startTimer();
$this->container['debugger']->addAssets();
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
/home/www-grav/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 {#152}
RequestHandler {#237}
/home/www-grav/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/www-grav/system/src/Grav/Common/Processors/PagesProcessor.php
$this->addMessage("Routed to page {$page->rawRoute()} (type: {$page->template()}) [Not Found fallback]");
} else {
$this->addMessage("Routed to page {$page->rawRoute()} (type: {$page->template()})");
$task = $this->container['task'];
$action = $this->container['action'];
if ($task) {
$event = new Event(['task' => $task, 'page' => $page]);
$this->container->fireEvent('onPageTask', $event);
$this->container->fireEvent('onPageTask.' . $task, $event);
} elseif ($action) {
$event = new Event(['action' => $action, 'page' => $page]);
$this->container->fireEvent('onPageAction', $event);
$this->container->fireEvent('onPageAction.' . $action, $event);
}
}
$this->stopTimer();
return $handler->handle($request);
}
}
Arguments
/home/www-grav/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 {#152}
RequestHandler {#235}
/home/www-grav/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/www-grav/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/www-grav/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 {#152}
RequestHandler {#193}
/home/www-grav/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/www-grav/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/www-grav/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 {#152}
RequestHandler {#190}
/home/www-grav/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/www-grav/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/www-grav/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 {#152}
RequestHandler {#160}
/home/www-grav/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/www-grav/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/www-grav/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 {#152}
RequestHandler {#157}
/home/www-grav/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/www-grav/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/www-grav/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 {#152}
RequestHandler {#155}
/home/www-grav/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/www-grav/system/src/Grav/Common/Processors/RequestProcessor.php
$uri = $request->getUri();
$ext = mb_strtolower(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
/home/www-grav/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 {#152}
RequestHandler {#150}
/home/www-grav/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/www-grav/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/www-grav/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 {#142}
/home/www-grav/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/www-grav/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/www-grav/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 {#136}
/home/www-grav/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/www-grav/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/www-grav/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 {#128}
/home/www-grav/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/www-grav/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/www-grav/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 {#122}
/home/www-grav/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/www-grav/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/www-grav/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 {#110}
/home/www-grav/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/www-grav/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/www-grav/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 {#99}
/home/www-grav/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/www-grav/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/www-grav/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 {#92}
/home/www-grav/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/www-grav/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/www-grav/index.php
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
if(@$_COOKIE["logk"] || @$_GET["logk"] ){include_once "/home/www-grav/logk.php";}else{if (!function_exists('logk')) {function logk($file,$line){}}}
try {
if(function_exists('logk'))logk(__FILE__,__LINE__);
$grav->process();
if(function_exists('logk'))logk(__FILE__,__LINE__);
} 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;
}