/usr
/www
/users
/vcgrat
/vendor
/twig
/twig
/lib
/Twig
/Template.php
protected function displayWithErrorHandling(array $context, array $blocks = array())
{
try {
$this->doDisplay($context, $blocks);
} catch (Twig_Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
// this is mostly useful for Twig_Error_Loader exceptions
// see Twig_Error_Loader
if (false === $e->getTemplateLine()) {
$e->setTemplateLine(-1);
$e->guess();
}
throw $e;
} catch (Exception $e) {
throw new Twig_Error_Runtime(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
}
}
/**
* Auto-generated method to display the template with the given context.
*
* @param array $context An array of parameters to pass to the template
* @param array $blocks An array of blocks to pass to the template
*/
abstract protected function doDisplay(array $context, array $blocks = array());
/**
* Returns a variable from the context.
*
* This method is for internal use only and should never be called
* directly.
*
* This method should not be overridden in a sub-class as this is an
* implementation detail that has been introduced to optimize variable
* access for versions of PHP before 5.4. This is not a way to override
Arguments
"""
An exception has been thrown during the rendering of a template ("Error while trying to download (code: 400): https://graph.facebook.com/VCGratwein/?fields=feed{permalink_url,created_time,link,attachments,message}&access_token=2099352760347266|2d30767a7492dbe92279b2c5309f6cd4 \n
Message: HTTP response code said error\n
The requested URL returned error: 400 ") in "@Page:/usr/www/users/vcgrat/user/pages/01.home" at line 1.
"""
/usr
/www
/users
/vcgrat
/system
/src
/Grav
/Common
/GPM
/Response.php
$uri = $args[0];
$options = $args[1];
$callback = $args[2];
$ch = curl_init($uri);
$response = static::curlExecFollow($ch, $options, $callback);
$errno = curl_errno($ch);
if ($errno) {
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$error_message = curl_strerror($errno) . "\n" . curl_error($ch);
switch ($code) {
case '404':
throw new \RuntimeException("Page not found");
case '401':
throw new \RuntimeException("Invalid LICENSE");
default:
throw new \RuntimeException("Error while trying to download (code: $code): $uri \nMessage: $error_message");
}
}
curl_close($ch);
return $response;
}
/**
* @param $ch
* @param $options
* @param $callback
*
* @return bool|mixed
*/
private static function curlExecFollow($ch, $options, $callback)
{
if ($callback) {
curl_setopt_array(
$ch,
Arguments
"""
Error while trying to download (code: 400): https://graph.facebook.com/VCGratwein/?fields=feed{permalink_url,created_time,link,attachments,message}&access_token=2099352760347266|2d30767a7492dbe92279b2c5309f6cd4 \n
Message: HTTP response code said error\n
The requested URL returned error: 400
"""
/usr
/www
/users
/vcgrat
/system
/src
/Grav
/Common
/GPM
/Response.php
if (self::$callback !== null) {
call_user_func_array(self::$callback, [$progress]);
}
}
}
}
/**
* Automatically picks the preferred method
*
* @return string The response of the request
*/
private static function getAuto()
{
if (!ini_get('open_basedir') && self::isFopenAvailable()) {
return self::getFopen(func_get_args());
}
if (self::isCurlAvailable()) {
return self::getCurl(func_get_args());
}
return null;
}
/**
* Starts a HTTP request via fopen
*
* @return string The response of the request
*/
private static function getFopen()
{
if (count($args = func_get_args()) == 1) {
$args = $args[0];
}
$uri = $args[0];
$options = $args[1];
$callback = $args[2];
Arguments
array:3 [
0 => "https://graph.facebook.com/VCGratwein/?fields=feed{permalink_url,created_time,link,attachments,message}&access_token=2099352760347266|2d30767a7492dbe92279b2c5309f6cd4"
1 => array:2 [
"curl" => array:7 [
10016 => "Grav GPM"
10018 => "Grav GPM"
19913 => 1
52 => 1
45 => 1
13 => 15
42 => 0
]
"fopen" => array:5 [
"method" => "GET"
"user_agent" => "Grav GPM"
"max_redirects" => 5
"follow_location" => 1
"timeout" => 15
]
]
2 => null
]
/usr
/www
/users
/vcgrat
/system
/src
/Grav
/Common
/GPM
/Response.php
'request_fulluri' => true
]
]);
if (isset($proxy['port'])) {
$overrides['curl'][CURLOPT_PROXYPORT] = $proxy['port'];
}
if (isset($proxy['user']) && isset($proxy['pass'])) {
$fopen_auth = $auth = base64_encode($proxy['user'] . ':' . $proxy['pass']);
$overrides['curl'][CURLOPT_PROXYUSERPWD] = $proxy['user'] . ':' . $proxy['pass'];
$overrides['fopen']['header'] = "Proxy-Authorization: Basic $fopen_auth";
}
}
$options = array_replace_recursive(self::$defaults, $options, $overrides);
$method = 'get' . ucfirst(strtolower($settings['method']));
self::$callback = $callback;
return static::$method($uri, $options, $callback);
}
/**
* Checks if cURL is available
*
* @return boolean
*/
public static function isCurlAvailable()
{
return function_exists('curl_version');
}
/**
* Checks if the remote fopen request is enabled in PHP
*
* @return boolean
*/
public static function isFopenAvailable()
{
return preg_match('/1|yes|on|true/i', ini_get('allow_url_fopen'));
Arguments
"https://graph.facebook.com/VCGratwein/?fields=feed{permalink_url,created_time,link,attachments,message}&access_token=2099352760347266|2d30767a7492dbe92279b2c5309f6cd4"
array:2 [
"curl" => array:7 [
10016 => "Grav GPM"
10018 => "Grav GPM"
19913 => 1
52 => 1
45 => 1
13 => 15
42 => 0
]
"fopen" => array:5 [
"method" => "GET"
"user_agent" => "Grav GPM"
"max_redirects" => 5
"follow_location" => 1
"timeout" => 15
]
]
null
/usr
/www
/users
/vcgrat
/user
/plugins
/facebook
/facebook.php
public function getFacebookPosts($filtered_by_tags_from_page = "") {
/** @var Page $page */
$page = $this->grav['page'];
/** @var Twig $twig */
$twig = $this->grav['twig'];
/** @var Data $config */
$config = $this->mergeConfig($page, TRUE);
$filter_by_tags =
empty($filtered_by_tags_from_page)
? $config->get('facebook_page_settings.filter_by_tags')
: $filtered_by_tags_from_page;
// Generate API url
$url =
'https://graph.facebook.com/' . $config->get('facebook_page_settings.page_id')
. '/?fields=feed{permalink_url,created_time,link,attachments,message}&access_token='
. $config->get('facebook_common_settings.application_id') . '|'
. $config->get('facebook_common_settings.application_secret');
$results = Response::get($url);
$this->parsePostResponse($results, $config, $filter_by_tags);
$this->template_post_vars =
['pageLink' => 'https://www.facebook.com/'
. $config->get('facebook_page_settings.page_name'),
'sectionTitleRaw' => $config->get('facebook_page_settings.section_title'),
'sectionTitle' => '<a href="https://www.facebook.com/'
. $config->get('facebook_page_settings.page_name') . '/"><h3 class="heading">'
. $config->get('facebook_page_settings.section_title') . '</h3></a>',
'feed' => $this->feeds,
'count' => empty($config->get('facebook_page_settings.count')) ? 7
: $config->get('facebook_page_settings.count')];
$output =
$this->grav['twig']->twig()
->render($this->template_post_html, $this->template_post_vars);
return $output;
}
Arguments
"https://graph.facebook.com/VCGratwein/?fields=feed{permalink_url,created_time,link,attachments,message}&access_token=2099352760347266|2d30767a7492dbe92279b2c5309f6cd4"
/usr
/www
/users
/vcgrat
/cache
/twig
/01
/0154d0da9bc14759e279d8b1e6df7e64b5533c9f5304dea767dba11275a3fd46.php
<?php
/* @Page:/usr/www/users/vcgrat/user/pages/01.home */
class __TwigTemplate_d7d635a3b2ac0b52120f8bb5eccaadc28e0b0546d612b2d331657d91a26df744 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = array(
);
}
protected function doDisplay(array $context, array $blocks = array())
{
// line 1
echo call_user_func_array($this->env->getFunction('facebook_posts')->getCallable(), array());
}
public function getTemplateName()
{
return "@Page:/usr/www/users/vcgrat/user/pages/01.home";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 19 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
/usr
/www
/users
/vcgrat
/cache
/twig
/01
/0154d0da9bc14759e279d8b1e6df7e64b5533c9f5304dea767dba11275a3fd46.php
<?php
/* @Page:/usr/www/users/vcgrat/user/pages/01.home */
class __TwigTemplate_d7d635a3b2ac0b52120f8bb5eccaadc28e0b0546d612b2d331657d91a26df744 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = array(
);
}
protected function doDisplay(array $context, array $blocks = array())
{
// line 1
echo call_user_func_array($this->env->getFunction('facebook_posts')->getCallable(), array());
}
public function getTemplateName()
{
return "@Page:/usr/www/users/vcgrat/user/pages/01.home";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 19 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
Arguments
array:2 [
0 => FacebookPlugin {}
1 => "getFacebookPosts"
]
[]
/usr
/www
/users
/vcgrat
/vendor
/twig
/twig
/lib
/Twig
/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 = array())
{
try {
$this->doDisplay($context, $blocks);
} catch (Twig_Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
// this is mostly useful for Twig_Error_Loader exceptions
// see Twig_Error_Loader
if (false === $e->getTemplateLine()) {
$e->setTemplateLine(-1);
$e->guess();
}
throw $e;
} catch (Exception $e) {
throw new Twig_Error_Runtime(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
}
}
/**
* Auto-generated method to display the template with the given context.
Arguments
array:25 [
"config" => Config {}
"system" => array:22 [
"absolute_urls" => false
"timezone" => ""
"default_locale" => null
"param_sep" => ":"
"wrapped_site" => false
"reverse_proxy_setup" => false
"force_ssl" => false
"custom_base_url" => ""
"username_regex" => "^[a-z0-9_-]{3,16}$"
"pwd_regex" => "(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}"
"languages" => array:7 [
"supported" => []
"include_default_lang" => true
"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:25 [
"theme" => "gateway"
"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" => true
"events" => array:2 [
"page" => true
"twig" => true
]
"markdown" => array:5 [
"extra" => false
"auto_line_breaks" => false
"auto_url_links" => false
"escape_markup" => false
"special_chars" => array:2 [
">" => "gt"
"<" => "lt"
]
]
"types" => array:7 [
0 => "txt"
1 => "xml"
2 => "html"
3 => "htm"
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" => true
"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
"url_taxonomy_filters" => true
"frontmatter" => array:2 [
"process_twig" => false
"ignore_fields" => array:2 [
0 => "form"
1 => "forms"
]
]
]
"cache" => array:10 [
"enabled" => true
"check" => array:1 [
"method" => "file"
]
"driver" => "auto"
"prefix" => "g"
"clear_images_by_default" => true
"cli_compatibility" => false
"lifetime" => 604800
"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" => true
"css_minify_windows" => false
"css_rewrite" => true
"js_pipeline" => false
"js_pipeline_include_externals" => true
"js_pipeline_before_excludes" => true
"js_minify" => true
"enable_asset_timestamp" => false
"collections" => array:1 [
"jquery" => "system://assets/jquery/jquery-2.x.min.js"
]
]
"errors" => array:2 [
"display" => "1"
"log" => true
]
"debugger" => array:3 [
"enabled" => false
"shutdown" => array:1 [
"close_connection" => true
]
"twig" => true
]
"images" => array:5 [
"default_image_quality" => 85
"cache_all" => false
"cache_perms" => "0755"
"debug" => false
"auto_fix_orientation" => false
]
"media" => array:5 [
"enable_media_timestamp" => false
"upload_limit" => 0
"unsupported_inline_types" => []
"allowed_fallback_types" => []
"auto_metadata_exif" => false
]
"session" => array:7 [
"enabled" => true
"timeout" => 1800
"name" => "grav-site"
"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
]
]
"theme" => array:2 [
"enabled" => true
"dropdown" => array:1 [
"enabled" => true
]
]
"site" => array:12 [
"title" => "VC Gratwein"
"default_lang" => "de"
"author" => array:2 [
"name" => "VC Gratwein"
"email" => "john@email.com"
]
"taxonomies" => array:3 [
0 => "category"
1 => "tag"
2 => "volleyball"
]
"metadata" => array:1 [
"description" => "volleyball"
]
"summary" => array:4 [
"enabled" => false
"format" => "short"
"size" => 300
"delimiter" => "==="
]
"redirects" => null
"routes" => null
"blog" => array:1 [
"route" => "/blog"
]
"logo" => "gratwein/banner.png"
"header" => array:1 [
"background" => "gratwein/background-header.png"
]
"copyright" => "© Florian Nußmüller & VC Gratwein"
]
"uri" => Uri {}
"assets" => Assets {}
"taxonomy" => Taxonomy {}
"browser" => Browser {}
"base_dir" => "/usr/www/users/vcgrat"
"home_url" => "/"
"base_url" => ""
"base_url_absolute" => "http://www.vcgratwein.at"
"base_url_relative" => ""
"base_url_simple" => ""
"theme_dir" => "/usr/www/users/vcgrat/user/themes/gateway"
"theme_url" => "/user/themes/gateway"
"html_lang" => "de"
"language_codes" => LanguageCodes {}
"sections" => array:2 [
"page" => []
"modular" => []
]
"form" => null
"form_json_response" => []
"page" => Page {}
"media" => Media {}
"header" => {}
"grav" => Grav {}
]
[]
/usr
/www
/users
/vcgrat
/vendor
/twig
/twig
/lib
/Twig
/Template.php
}
/**
* Returns all blocks.
*
* This method is for internal use only and should never be called
* directly.
*
* @return array An array of blocks
*
* @internal
*/
public function getBlocks()
{
return $this->blocks;
}
public function display(array $context, array $blocks = array())
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
ob_start();
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;
Arguments
array:25 [
"config" => Config {}
"system" => array:22 [
"absolute_urls" => false
"timezone" => ""
"default_locale" => null
"param_sep" => ":"
"wrapped_site" => false
"reverse_proxy_setup" => false
"force_ssl" => false
"custom_base_url" => ""
"username_regex" => "^[a-z0-9_-]{3,16}$"
"pwd_regex" => "(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}"
"languages" => array:7 [
"supported" => []
"include_default_lang" => true
"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:25 [
"theme" => "gateway"
"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" => true
"events" => array:2 [
"page" => true
"twig" => true
]
"markdown" => array:5 [
"extra" => false
"auto_line_breaks" => false
"auto_url_links" => false
"escape_markup" => false
"special_chars" => array:2 [
">" => "gt"
"<" => "lt"
]
]
"types" => array:7 [
0 => "txt"
1 => "xml"
2 => "html"
3 => "htm"
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" => true
"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
"url_taxonomy_filters" => true
"frontmatter" => array:2 [
"process_twig" => false
"ignore_fields" => array:2 [
0 => "form"
1 => "forms"
]
]
]
"cache" => array:10 [
"enabled" => true
"check" => array:1 [
"method" => "file"
]
"driver" => "auto"
"prefix" => "g"
"clear_images_by_default" => true
"cli_compatibility" => false
"lifetime" => 604800
"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" => true
"css_minify_windows" => false
"css_rewrite" => true
"js_pipeline" => false
"js_pipeline_include_externals" => true
"js_pipeline_before_excludes" => true
"js_minify" => true
"enable_asset_timestamp" => false
"collections" => array:1 [
"jquery" => "system://assets/jquery/jquery-2.x.min.js"
]
]
"errors" => array:2 [
"display" => "1"
"log" => true
]
"debugger" => array:3 [
"enabled" => false
"shutdown" => array:1 [
"close_connection" => true
]
"twig" => true
]
"images" => array:5 [
"default_image_quality" => 85
"cache_all" => false
"cache_perms" => "0755"
"debug" => false
"auto_fix_orientation" => false
]
"media" => array:5 [
"enable_media_timestamp" => false
"upload_limit" => 0
"unsupported_inline_types" => []
"allowed_fallback_types" => []
"auto_metadata_exif" => false
]
"session" => array:7 [
"enabled" => true
"timeout" => 1800
"name" => "grav-site"
"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
]
]
"theme" => array:2 [
"enabled" => true
"dropdown" => array:1 [
"enabled" => true
]
]
"site" => array:12 [
"title" => "VC Gratwein"
"default_lang" => "de"
"author" => array:2 [
"name" => "VC Gratwein"
"email" => "john@email.com"
]
"taxonomies" => array:3 [
0 => "category"
1 => "tag"
2 => "volleyball"
]
"metadata" => array:1 [
"description" => "volleyball"
]
"summary" => array:4 [
"enabled" => false
"format" => "short"
"size" => 300
"delimiter" => "==="
]
"redirects" => null
"routes" => null
"blog" => array:1 [
"route" => "/blog"
]
"logo" => "gratwein/banner.png"
"header" => array:1 [
"background" => "gratwein/background-header.png"
]
"copyright" => "© Florian Nußmüller & VC Gratwein"
]
"uri" => Uri {}
"assets" => Assets {}
"taxonomy" => Taxonomy {}
"browser" => Browser {}
"base_dir" => "/usr/www/users/vcgrat"
"home_url" => "/"
"base_url" => ""
"base_url_absolute" => "http://www.vcgratwein.at"
"base_url_relative" => ""
"base_url_simple" => ""
"theme_dir" => "/usr/www/users/vcgrat/user/themes/gateway"
"theme_url" => "/user/themes/gateway"
"html_lang" => "de"
"language_codes" => LanguageCodes {}
"sections" => array:2 [
"page" => []
"modular" => []
]
"form" => null
"form_json_response" => []
"page" => Page {}
"media" => Media {}
"header" => {}
"grav" => Grav {}
]
[]
/usr
/www
/users
/vcgrat
/vendor
/twig
/twig
/lib
/Twig
/Template.php
* @return array An array of blocks
*
* @internal
*/
public function getBlocks()
{
return $this->blocks;
}
public function display(array $context, array $blocks = array())
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
ob_start();
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 = array())
{
try {
Arguments
array:24 [
"config" => Config {}
"system" => array:22 [
"absolute_urls" => false
"timezone" => ""
"default_locale" => null
"param_sep" => ":"
"wrapped_site" => false
"reverse_proxy_setup" => false
"force_ssl" => false
"custom_base_url" => ""
"username_regex" => "^[a-z0-9_-]{3,16}$"
"pwd_regex" => "(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}"
"languages" => array:7 [
"supported" => []
"include_default_lang" => true
"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:25 [
"theme" => "gateway"
"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" => true
"events" => array:2 [
"page" => true
"twig" => true
]
"markdown" => array:5 [
"extra" => false
"auto_line_breaks" => false
"auto_url_links" => false
"escape_markup" => false
"special_chars" => array:2 [
">" => "gt"
"<" => "lt"
]
]
"types" => array:7 [
0 => "txt"
1 => "xml"
2 => "html"
3 => "htm"
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" => true
"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
"url_taxonomy_filters" => true
"frontmatter" => array:2 [
"process_twig" => false
"ignore_fields" => array:2 [
0 => "form"
1 => "forms"
]
]
]
"cache" => array:10 [
"enabled" => true
"check" => array:1 [
"method" => "file"
]
"driver" => "auto"
"prefix" => "g"
"clear_images_by_default" => true
"cli_compatibility" => false
"lifetime" => 604800
"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" => true
"css_minify_windows" => false
"css_rewrite" => true
"js_pipeline" => false
"js_pipeline_include_externals" => true
"js_pipeline_before_excludes" => true
"js_minify" => true
"enable_asset_timestamp" => false
"collections" => array:1 [
"jquery" => "system://assets/jquery/jquery-2.x.min.js"
]
]
"errors" => array:2 [
"display" => "1"
"log" => true
]
"debugger" => array:3 [
"enabled" => false
"shutdown" => array:1 [
"close_connection" => true
]
"twig" => true
]
"images" => array:5 [
"default_image_quality" => 85
"cache_all" => false
"cache_perms" => "0755"
"debug" => false
"auto_fix_orientation" => false
]
"media" => array:5 [
"enable_media_timestamp" => false
"upload_limit" => 0
"unsupported_inline_types" => []
"allowed_fallback_types" => []
"auto_metadata_exif" => false
]
"session" => array:7 [
"enabled" => true
"timeout" => 1800
"name" => "grav-site"
"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
]
]
"theme" => array:2 [
"enabled" => true
"dropdown" => array:1 [
"enabled" => true
]
]
"site" => array:12 [
"title" => "VC Gratwein"
"default_lang" => "de"
"author" => array:2 [
"name" => "VC Gratwein"
"email" => "john@email.com"
]
"taxonomies" => array:3 [
0 => "category"
1 => "tag"
2 => "volleyball"
]
"metadata" => array:1 [
"description" => "volleyball"
]
"summary" => array:4 [
"enabled" => false
"format" => "short"
"size" => 300
"delimiter" => "==="
]
"redirects" => null
"routes" => null
"blog" => array:1 [
"route" => "/blog"
]
"logo" => "gratwein/banner.png"
"header" => array:1 [
"background" => "gratwein/background-header.png"
]
"copyright" => "© Florian Nußmüller & VC Gratwein"
]
"uri" => Uri {}
"assets" => Assets {}
"taxonomy" => Taxonomy {}
"browser" => Browser {}
"base_dir" => "/usr/www/users/vcgrat"
"home_url" => "/"
"base_url" => ""
"base_url_absolute" => "http://www.vcgratwein.at"
"base_url_relative" => ""
"base_url_simple" => ""
"theme_dir" => "/usr/www/users/vcgrat/user/themes/gateway"
"theme_url" => "/user/themes/gateway"
"html_lang" => "de"
"language_codes" => LanguageCodes {}
"sections" => array:2 [
"page" => []
"modular" => []
]
"form" => null
"form_json_response" => []
"page" => Page {}
"media" => Media {}
"header" => {}
]
/usr
/www
/users
/vcgrat
/vendor
/twig
/twig
/lib
/Twig
/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 $name The template name
* @param array $context An array of parameters to pass to the template
*
* @return string The rendered template
*
* @throws Twig_Error_Loader When the template cannot be found
* @throws Twig_Error_Syntax When an error occurred during compilation
* @throws Twig_Error_Runtime When an error occurred during rendering
*/
public function render($name, array $context = array())
{
return $this->loadTemplate($name)->render($context);
}
/**
* Displays a template.
*
* @param string $name The template name
* @param array $context An array of parameters to pass to the template
*
* @throws Twig_Error_Loader When the template cannot be found
* @throws Twig_Error_Syntax When an error occurred during compilation
* @throws Twig_Error_Runtime When an error occurred during rendering
*/
public function display($name, array $context = array())
{
$this->loadTemplate($name)->display($context);
}
/**
* Loads a template.
*
Arguments
array:24 [
"config" => Config {}
"system" => array:22 [
"absolute_urls" => false
"timezone" => ""
"default_locale" => null
"param_sep" => ":"
"wrapped_site" => false
"reverse_proxy_setup" => false
"force_ssl" => false
"custom_base_url" => ""
"username_regex" => "^[a-z0-9_-]{3,16}$"
"pwd_regex" => "(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}"
"languages" => array:7 [
"supported" => []
"include_default_lang" => true
"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:25 [
"theme" => "gateway"
"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" => true
"events" => array:2 [
"page" => true
"twig" => true
]
"markdown" => array:5 [
"extra" => false
"auto_line_breaks" => false
"auto_url_links" => false
"escape_markup" => false
"special_chars" => array:2 [
">" => "gt"
"<" => "lt"
]
]
"types" => array:7 [
0 => "txt"
1 => "xml"
2 => "html"
3 => "htm"
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" => true
"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
"url_taxonomy_filters" => true
"frontmatter" => array:2 [
"process_twig" => false
"ignore_fields" => array:2 [
0 => "form"
1 => "forms"
]
]
]
"cache" => array:10 [
"enabled" => true
"check" => array:1 [
"method" => "file"
]
"driver" => "auto"
"prefix" => "g"
"clear_images_by_default" => true
"cli_compatibility" => false
"lifetime" => 604800
"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" => true
"css_minify_windows" => false
"css_rewrite" => true
"js_pipeline" => false
"js_pipeline_include_externals" => true
"js_pipeline_before_excludes" => true
"js_minify" => true
"enable_asset_timestamp" => false
"collections" => array:1 [
"jquery" => "system://assets/jquery/jquery-2.x.min.js"
]
]
"errors" => array:2 [
"display" => "1"
"log" => true
]
"debugger" => array:3 [
"enabled" => false
"shutdown" => array:1 [
"close_connection" => true
]
"twig" => true
]
"images" => array:5 [
"default_image_quality" => 85
"cache_all" => false
"cache_perms" => "0755"
"debug" => false
"auto_fix_orientation" => false
]
"media" => array:5 [
"enable_media_timestamp" => false
"upload_limit" => 0
"unsupported_inline_types" => []
"allowed_fallback_types" => []
"auto_metadata_exif" => false
]
"session" => array:7 [
"enabled" => true
"timeout" => 1800
"name" => "grav-site"
"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
]
]
"theme" => array:2 [
"enabled" => true
"dropdown" => array:1 [
"enabled" => true
]
]
"site" => array:12 [
"title" => "VC Gratwein"
"default_lang" => "de"
"author" => array:2 [
"name" => "VC Gratwein"
"email" => "john@email.com"
]
"taxonomies" => array:3 [
0 => "category"
1 => "tag"
2 => "volleyball"
]
"metadata" => array:1 [
"description" => "volleyball"
]
"summary" => array:4 [
"enabled" => false
"format" => "short"
"size" => 300
"delimiter" => "==="
]
"redirects" => null
"routes" => null
"blog" => array:1 [
"route" => "/blog"
]
"logo" => "gratwein/banner.png"
"header" => array:1 [
"background" => "gratwein/background-header.png"
]
"copyright" => "© Florian Nußmüller & VC Gratwein"
]
"uri" => Uri {}
"assets" => Assets {}
"taxonomy" => Taxonomy {}
"browser" => Browser {}
"base_dir" => "/usr/www/users/vcgrat"
"home_url" => "/"
"base_url" => ""
"base_url_absolute" => "http://www.vcgratwein.at"
"base_url_relative" => ""
"base_url_simple" => ""
"theme_dir" => "/usr/www/users/vcgrat/user/themes/gateway"
"theme_url" => "/user/themes/gateway"
"html_lang" => "de"
"language_codes" => LanguageCodes {}
"sections" => array:2 [
"page" => []
"modular" => []
]
"form" => null
"form_json_response" => []
"page" => Page {}
"media" => Media {}
"header" => {}
]
/usr
/www
/users
/vcgrat
/system
/src
/Grav
/Common
/Twig
/Twig.php
$twig_vars['page'] = $item;
$twig_vars['media'] = $item->media();
$twig_vars['header'] = $item->header();
$local_twig = clone($this->twig);
try {
// Process Modular Twig
if ($item->modularTwig()) {
$twig_vars['content'] = $content;
$template = $item->template() . TEMPLATE_EXT;
$output = $content = $local_twig->render($template, $twig_vars);
}
// Process in-page Twig
if ($item->shouldProcess('twig')) {
$name = '@Page:' . $item->path();
$this->setTemplate($name, $content);
$output = $local_twig->render($name, $twig_vars);
}
} catch (\Twig_Error_Loader $e) {
throw new \RuntimeException($e->getRawMessage(), 404, $e);
}
return $output;
}
/**
* Process a Twig template directly by using a template name
* and optional array of variables
*
* @param string $template template to render with
* @param array $vars Optional variables
*
* @return string
*/
public function processTemplate($template, $vars = [])
{
Arguments
"@Page:/usr/www/users/vcgrat/user/pages/01.home"
array:24 [
"config" => Config {}
"system" => array:22 [
"absolute_urls" => false
"timezone" => ""
"default_locale" => null
"param_sep" => ":"
"wrapped_site" => false
"reverse_proxy_setup" => false
"force_ssl" => false
"custom_base_url" => ""
"username_regex" => "^[a-z0-9_-]{3,16}$"
"pwd_regex" => "(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}"
"languages" => array:7 [
"supported" => []
"include_default_lang" => true
"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:25 [
"theme" => "gateway"
"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" => true
"events" => array:2 [
"page" => true
"twig" => true
]
"markdown" => array:5 [
"extra" => false
"auto_line_breaks" => false
"auto_url_links" => false
"escape_markup" => false
"special_chars" => array:2 [
">" => "gt"
"<" => "lt"
]
]
"types" => array:7 [
0 => "txt"
1 => "xml"
2 => "html"
3 => "htm"
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" => true
"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
"url_taxonomy_filters" => true
"frontmatter" => array:2 [
"process_twig" => false
"ignore_fields" => array:2 [
0 => "form"
1 => "forms"
]
]
]
"cache" => array:10 [
"enabled" => true
"check" => array:1 [
"method" => "file"
]
"driver" => "auto"
"prefix" => "g"
"clear_images_by_default" => true
"cli_compatibility" => false
"lifetime" => 604800
"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" => true
"css_minify_windows" => false
"css_rewrite" => true
"js_pipeline" => false
"js_pipeline_include_externals" => true
"js_pipeline_before_excludes" => true
"js_minify" => true
"enable_asset_timestamp" => false
"collections" => array:1 [
"jquery" => "system://assets/jquery/jquery-2.x.min.js"
]
]
"errors" => array:2 [
"display" => "1"
"log" => true
]
"debugger" => array:3 [
"enabled" => false
"shutdown" => array:1 [
"close_connection" => true
]
"twig" => true
]
"images" => array:5 [
"default_image_quality" => 85
"cache_all" => false
"cache_perms" => "0755"
"debug" => false
"auto_fix_orientation" => false
]
"media" => array:5 [
"enable_media_timestamp" => false
"upload_limit" => 0
"unsupported_inline_types" => []
"allowed_fallback_types" => []
"auto_metadata_exif" => false
]
"session" => array:7 [
"enabled" => true
"timeout" => 1800
"name" => "grav-site"
"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
]
]
"theme" => array:2 [
"enabled" => true
"dropdown" => array:1 [
"enabled" => true
]
]
"site" => array:12 [
"title" => "VC Gratwein"
"default_lang" => "de"
"author" => array:2 [
"name" => "VC Gratwein"
"email" => "john@email.com"
]
"taxonomies" => array:3 [
0 => "category"
1 => "tag"
2 => "volleyball"
]
"metadata" => array:1 [
"description" => "volleyball"
]
"summary" => array:4 [
"enabled" => false
"format" => "short"
"size" => 300
"delimiter" => "==="
]
"redirects" => null
"routes" => null
"blog" => array:1 [
"route" => "/blog"
]
"logo" => "gratwein/banner.png"
"header" => array:1 [
"background" => "gratwein/background-header.png"
]
"copyright" => "© Florian Nußmüller & VC Gratwein"
]
"uri" => Uri {}
"assets" => Assets {}
"taxonomy" => Taxonomy {}
"browser" => Browser {}
"base_dir" => "/usr/www/users/vcgrat"
"home_url" => "/"
"base_url" => ""
"base_url_absolute" => "http://www.vcgratwein.at"
"base_url_relative" => ""
"base_url_simple" => ""
"theme_dir" => "/usr/www/users/vcgrat/user/themes/gateway"
"theme_url" => "/user/themes/gateway"
"html_lang" => "de"
"language_codes" => LanguageCodes {}
"sections" => array:2 [
"page" => []
"modular" => []
]
"form" => null
"form_json_response" => []
"page" => Page {}
"media" => Media {}
"header" => {}
]
/usr
/www
/users
/vcgrat
/system
/src
/Grav
/Common
/Page
/Page.php
}
// Initialize the preferred variant of Parsedown
if ($defaults['extra']) {
$parsedown = new ParsedownExtra($this, $defaults);
} else {
$parsedown = new Parsedown($this, $defaults);
}
$this->content = $parsedown->text($this->content);
}
/**
* Process the Twig page content.
*/
private function processTwig()
{
$twig = Grav::instance()['twig'];
$this->content = $twig->processPage($this, $this->content);
}
/**
* Fires the onPageContentProcessed event, and caches the page content using a unique ID for the page
*/
public function cachePageContent()
{
$cache = Grav::instance()['cache'];
$cache_id = md5('page' . $this->id());
$cache->save($cache_id, ['content' => $this->content, 'content_meta' => $this->content_meta]);
}
/**
* Needed by the onPageContentProcessed event to get the raw page content
*
* @return string the current page content
*/
public function getRawContent()
{
return $this->content;
Arguments
Page {}
"{{ facebook_posts() }}"
/usr
/www
/users
/vcgrat
/system
/src
/Grav
/Common
/Page
/Page.php
// if no cached-content run everything
if ($never_cache_twig) {
if ($this->content === false || $cache_enable === false) {
$this->content = $this->raw_content;
Grav::instance()->fireEvent('onPageContentRaw', new Event(['page' => $this]));
if ($process_markdown) {
$this->processMarkdown();
}
// Content Processed but not cached yet
Grav::instance()->fireEvent('onPageContentProcessed', new Event(['page' => $this]));
if ($cache_enable) {
$this->cachePageContent();
}
}
if ($process_twig) {
$this->processTwig();
}
} else {
if ($this->content === false || $cache_enable === false) {
$this->content = $this->raw_content;
Grav::instance()->fireEvent('onPageContentRaw', new Event(['page' => $this]));
if ($twig_first) {
if ($process_twig) {
$this->processTwig();
}
if ($process_markdown) {
$this->processMarkdown();
}
// Content Processed but not cached yet
Grav::instance()->fireEvent('onPageContentProcessed', new Event(['page' => $this]));
} else {
if ($process_markdown) {
/usr
/www
/users
/vcgrat
/system
/src
/Grav
/Common
/Twig
/Twig.php
return $output;
}
/**
* Twig process that renders the site layout. This is the main twig process that renders the overall
* page and handles all the layout for the site display.
*
* @param string $format Output format (defaults to HTML).
*
* @return string the rendered output
* @throws \RuntimeException
*/
public function processSite($format = null, array $vars = [])
{
// set the page now its been processed
$this->grav->fireEvent('onTwigSiteVariables');
$pages = $this->grav['pages'];
$page = $this->grav['page'];
$content = $page->content();
$twig_vars = $this->twig_vars;
$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 ? $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);
/usr
/www
/users
/vcgrat
/system
/src
/Grav
/Common
/Service
/OutputServiceProvider.php
namespace Grav\Common\Service;
use Grav\Common\Page\Page;
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 Page $page */
$page = $c['page'];
return $twig->processSite($page->templateFormat());
};
}
}
Arguments
/usr
/www
/users
/vcgrat
/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
/usr
/www
/users
/vcgrat
/system
/src
/Grav
/Common
/Processors
/RenderProcessor.php
<?php
/**
* @package Grav.Common.Processors
*
* @copyright Copyright (C) 2014 - 2017 RocketTheme, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Processors;
class RenderProcessor extends ProcessorBase implements ProcessorInterface
{
public $id = 'render';
public $title = 'Render';
public function process()
{
$container = $this->container;
$output = $container['output'];
if ($output instanceof \Psr\Http\Message\ResponseInterface) {
// Support for custom output providers like Slim Framework.
} else {
// Use internal Grav output.
$container->output = $output;
$container->fireEvent('onOutputGenerated');
// Set the header type
$container->header();
echo $container->output;
// remove any output
$container->output = '';
$this->container->fireEvent('onOutputRendered');
}
}
}
Arguments
/usr
/www
/users
/vcgrat
/system
/src
/Grav
/Common
/Grav.php
} elseif ($values) {
$instance = self::$instance;
foreach ($values as $key => $value) {
$instance->offsetSet($key, $value);
}
}
return self::$instance;
}
/**
* Process a request
*/
public function process()
{
// process all processors (e.g. config, initialize, assets, ..., render)
foreach ($this->processors as $processor) {
$processor = $this[$processor];
$this->measureTime($processor->id, $processor->title, function () use ($processor) {
$processor->process();
});
}
/** @var Debugger $debugger */
$debugger = $this['debugger'];
$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, count($language < 3) ? ($language . '_' . strtoupper($language)) : $language);
} elseif ($this['config']->get('system.default_locale')) {
/usr
/www
/users
/vcgrat
/system
/src
/Grav
/Common
/Grav.php
*
* @param array $values
*
* @return static
*/
protected static function load(array $values)
{
$container = new static($values);
$container['grav'] = $container;
$container['debugger'] = new Debugger();
$debugger = $container['debugger'];
// closure that measures time by wrapping a function into startTimer and stopTimer
// The debugger can be passed to the closure. Should be more performant
// then to get it from the container all time.
$container->measureTime = function ($timerId, $timerTitle, $callback) use ($debugger) {
$debugger->startTimer($timerId, $timerTitle);
$callback();
$debugger->stopTimer($timerId);
};
$container->measureTime('_services', 'Services', function () use ($container) {
$container->registerServices($container);
});
return $container;
}
/**
* Register all services
* Services are defined in the diMap. They can either only the class
* of a Service Provider or a pair of serviceKey => serviceClass that
* gets directly mapped into the container.
*
* @return void
*/
protected function registerServices()
{
/usr
/www
/users
/vcgrat
/system
/src
/Grav
/Common
/Grav.php
ob_end_flush();
@ob_flush();
flush();
}
}
// Run any time consuming tasks.
$this->fireEvent('onShutdown');
}
/**
* Magic Catch All Function
* Used to call closures like measureTime on the instance.
* Source: http://stackoverflow.com/questions/419804/closures-as-class-members
*/
public function __call($method, $args)
{
$closure = $this->$method;
call_user_func_array($closure, $args);
}
/**
* Initialize and return a Grav instance
*
* @param array $values
*
* @return static
*/
protected static function load(array $values)
{
$container = new static($values);
$container['grav'] = $container;
$container['debugger'] = new Debugger();
$debugger = $container['debugger'];
// closure that measures time by wrapping a function into startTimer and stopTimer
// The debugger can be passed to the closure. Should be more performant
Arguments
"render"
"Render"
Closure {
class: "Grav\Common\Grav"
this: Grav { …}
use: {
$processor: RenderProcessor {}
}
file: "/usr/www/users/vcgrat/system/src/Grav/Common/Grav.php"
line: "131 to 133"
}
/usr
/www
/users
/vcgrat
/system
/src
/Grav
/Common
/Grav.php
ob_end_flush();
@ob_flush();
flush();
}
}
// Run any time consuming tasks.
$this->fireEvent('onShutdown');
}
/**
* Magic Catch All Function
* Used to call closures like measureTime on the instance.
* Source: http://stackoverflow.com/questions/419804/closures-as-class-members
*/
public function __call($method, $args)
{
$closure = $this->$method;
call_user_func_array($closure, $args);
}
/**
* Initialize and return a Grav instance
*
* @param array $values
*
* @return static
*/
protected static function load(array $values)
{
$container = new static($values);
$container['grav'] = $container;
$container['debugger'] = new Debugger();
$debugger = $container['debugger'];
// closure that measures time by wrapping a function into startTimer and stopTimer
// The debugger can be passed to the closure. Should be more performant
Arguments
Closure {
class: "Grav\Common\Grav"
parameters: {
$timerId: {}
$timerTitle: {}
$callback: {}
}
use: {
$debugger: Debugger {}
}
file: "/usr/www/users/vcgrat/system/src/Grav/Common/Grav.php"
line: "377 to 381"
}
array:3 [
0 => "render"
1 => "Render"
2 => Closure {
class: "Grav\Common\Grav"
this: Grav { …}
use: {
$processor: RenderProcessor {}
}
file: "/usr/www/users/vcgrat/system/src/Grav/Common/Grav.php"
line: "131 to 133"
}
]
/usr
/www
/users
/vcgrat
/system
/src
/Grav
/Common
/Grav.php
$instance = self::$instance;
foreach ($values as $key => $value) {
$instance->offsetSet($key, $value);
}
}
return self::$instance;
}
/**
* Process a request
*/
public function process()
{
// process all processors (e.g. config, initialize, assets, ..., render)
foreach ($this->processors as $processor) {
$processor = $this[$processor];
$this->measureTime($processor->id, $processor->title, function () use ($processor) {
$processor->process();
});
}
/** @var Debugger $debugger */
$debugger = $this['debugger'];
$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, count($language < 3) ? ($language . '_' . strtoupper($language)) : $language);
} elseif ($this['config']->get('system.default_locale')) {
setlocale(LC_ALL, $this['config']->get('system.default_locale'));
Arguments
"measureTime"
array:3 [
0 => "render"
1 => "Render"
2 => Closure {
class: "Grav\Common\Grav"
this: Grav { …}
use: {
$processor: RenderProcessor {}
}
file: "/usr/www/users/vcgrat/system/src/Grav/Common/Grav.php"
line: "131 to 133"
}
]
/usr
/www
/users
/vcgrat
/system
/src
/Grav
/Common
/Grav.php
$instance = self::$instance;
foreach ($values as $key => $value) {
$instance->offsetSet($key, $value);
}
}
return self::$instance;
}
/**
* Process a request
*/
public function process()
{
// process all processors (e.g. config, initialize, assets, ..., render)
foreach ($this->processors as $processor) {
$processor = $this[$processor];
$this->measureTime($processor->id, $processor->title, function () use ($processor) {
$processor->process();
});
}
/** @var Debugger $debugger */
$debugger = $this['debugger'];
$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, count($language < 3) ? ($language . '_' . strtoupper($language)) : $language);
} elseif ($this['config']->get('system.default_locale')) {
setlocale(LC_ALL, $this['config']->get('system.default_locale'));
Arguments
"render"
"Render"
Closure {
class: "Grav\Common\Grav"
this: Grav { …}
use: {
$processor: RenderProcessor {}
}
file: "/usr/www/users/vcgrat/system/src/Grav/Common/Grav.php"
line: "131 to 133"
}
/usr
/www
/users
/vcgrat
/index.php
// Set timezone to default, falls back to system if php.ini not set
date_default_timezone_set(@date_default_timezone_get());
// Set internal encoding if mbstring loaded
if (!extension_loaded('mbstring')) {
die("'mbstring' extension is not loaded. This is required for Grav to run correctly");
}
mb_internal_encoding('UTF-8');
// Get the Grav instance
$grav = Grav::instance(
array(
'loader' => $loader
)
);
// Process the page
try {
$grav->process();
} catch (\Exception $e) {
$grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
throw $e;
}