Twig_Error_Syntax
An exception has been thrown during the compilation of a template ("Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`") in "@Page:/home/petigny/www/blog/user/plugins/error/pages". Twig_Error_Syntax thrown with message "An exception has been thrown during the compilation of a template ("Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`") in "@Page:/home/petigny/www/blog/user/plugins/error/pages"." Stacktrace: #46 Twig_Error_Syntax in /home/petigny/www/blog/vendor/twig/twig/lib/Twig/Environment.php:779 #45 Whoops\Exception\ErrorException in /home/petigny/www/blog/vendor/twig/twig/lib/Twig/Node.php:42 #44 Whoops\Run:handleError in /home/petigny/www/blog/vendor/composer/ClassLoader.php:444 #43 include in /home/petigny/www/blog/vendor/composer/ClassLoader.php:444 #42 Composer\Autoload\includeFile in /home/petigny/www/blog/vendor/composer/ClassLoader.php:322 #41 Composer\Autoload\ClassLoader:loadClass in [internal]:0 #40 spl_autoload_call in [internal]:0 #39 class_exists in /home/petigny/www/blog/vendor/twig/twig/lib/Twig/Parser.php:411 #38 include in /home/petigny/www/blog/vendor/composer/ClassLoader.php:444 #37 Composer\Autoload\includeFile in /home/petigny/www/blog/vendor/composer/ClassLoader.php:322 #36 Composer\Autoload\ClassLoader:loadClass in [internal]:0 #35 spl_autoload_call in [internal]:0 #34 class_exists in /home/petigny/www/blog/vendor/twig/twig/lib/Twig/TokenParserInterface.php:42 #33 include in /home/petigny/www/blog/vendor/composer/ClassLoader.php:444 #32 Composer\Autoload\includeFile in /home/petigny/www/blog/vendor/composer/ClassLoader.php:322 #31 Composer\Autoload\ClassLoader:loadClass in [internal]:0 #30 spl_autoload_call in /home/petigny/www/blog/vendor/twig/twig/lib/Twig/TokenParser.php:17 #29 include in /home/petigny/www/blog/vendor/composer/ClassLoader.php:444 #28 Composer\Autoload\includeFile in /home/petigny/www/blog/vendor/composer/ClassLoader.php:322 #27 Composer\Autoload\ClassLoader:loadClass in [internal]:0 #26 spl_autoload_call in /home/petigny/www/blog/vendor/twig/twig/lib/Twig/TokenParser/For.php:26 #25 include in /home/petigny/www/blog/vendor/composer/ClassLoader.php:444 #24 Composer\Autoload\includeFile in /home/petigny/www/blog/vendor/composer/ClassLoader.php:322 #23 Composer\Autoload\ClassLoader:loadClass in [internal]:0 #22 spl_autoload_call in /home/petigny/www/blog/vendor/twig/twig/lib/Twig/Extension/Core.php:123 #21 Twig_Extension_Core:getTokenParsers in /home/petigny/www/blog/vendor/twig/twig/lib/Twig/Environment.php:1546 #20 Twig_Environment:initExtension in /home/petigny/www/blog/vendor/twig/twig/lib/Twig/Environment.php:1500 #19 Twig_Environment:initExtensions in /home/petigny/www/blog/vendor/twig/twig/lib/Twig/Environment.php:1422 #18 Twig_Environment:getUnaryOperators in /home/petigny/www/blog/vendor/twig/twig/lib/Twig/Lexer.php:385 #17 Twig_Lexer:getOperatorRegex in /home/petigny/www/blog/vendor/twig/twig/lib/Twig/Lexer.php:68 #16 Twig_Lexer:__construct in /home/petigny/www/blog/vendor/twig/twig/lib/Twig/Environment.php:674 #15 Twig_Environment:tokenize in /home/petigny/www/blog/vendor/twig/twig/lib/Twig/Environment.php:774 #14 Twig_Environment:compileSource in /home/petigny/www/blog/vendor/twig/twig/lib/Twig/Environment.php:452 #13 Twig_Environment:loadTemplate in /home/petigny/www/blog/vendor/twig/twig/lib/Twig/Environment.php:363 #12 Twig_Environment:render in /home/petigny/www/blog/system/src/Grav/Common/Twig/Twig.php:249 #11 Grav\Common\Twig\Twig:processPage in /home/petigny/www/blog/system/src/Grav/Common/Page/Page.php:786 #10 Grav\Common\Page\Page:processTwig in /home/petigny/www/blog/system/src/Grav/Common/Page/Page.php:653 #9 Grav\Common\Page\Page:content in /home/petigny/www/blog/system/src/Grav/Common/Twig/Twig.php:327 #8 Grav\Common\Twig\Twig:processSite in /home/petigny/www/blog/system/src/Grav/Common/Service/OutputServiceProvider.php:27 #7 Grav\Common\Service\OutputServiceProvider:Grav\Common\Service\{closure} in /home/petigny/www/blog/vendor/pimple/pimple/src/Pimple/Container.php:118 #6 Pimple\Container:offsetGet in /home/petigny/www/blog/system/src/Grav/Common/Processors/RenderProcessor.php:19 #5 Grav\Common\Processors\RenderProcessor:process in /home/petigny/www/blog/system/src/Grav/Common/Grav.php:132 #4 Grav\Common\Grav:Grav\Common\{closure} in /home/petigny/www/blog/system/src/Grav/Common/Grav.php:374 #3 Grav\Common\Grav:Grav\Common\{closure} in /home/petigny/www/blog/system/src/Grav/Common/Grav.php:350 #2 call_user_func_array in /home/petigny/www/blog/system/src/Grav/Common/Grav.php:350 #1 Grav\Common\Grav:__call in /home/petigny/www/blog/system/src/Grav/Common/Grav.php:133 #0 Grav\Common\Grav:process in /home/petigny/www/blog/index.php:52
Stack frames (47)
46
Twig_Error_Syntax
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
779
45
Whoops
\
Exception
\
ErrorException
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Node.php
42
44
Whoops
\
Run
handleError
/
vendor
/
composer
/
ClassLoader.php
444
43
include
/
vendor
/
composer
/
ClassLoader.php
444
42
Composer
\
Autoload
\
includeFile
/
vendor
/
composer
/
ClassLoader.php
322
41
Composer
\
Autoload
\
ClassLoader
loadClass
[internal]
0
40
spl_autoload_call
[internal]
0
39
class_exists
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Parser.php
411
38
include
/
vendor
/
composer
/
ClassLoader.php
444
37
Composer
\
Autoload
\
includeFile
/
vendor
/
composer
/
ClassLoader.php
322
36
Composer
\
Autoload
\
ClassLoader
loadClass
[internal]
0
35
spl_autoload_call
[internal]
0
34
class_exists
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
TokenParserInterface.php
42
33
include
/
vendor
/
composer
/
ClassLoader.php
444
32
Composer
\
Autoload
\
includeFile
/
vendor
/
composer
/
ClassLoader.php
322
31
Composer
\
Autoload
\
ClassLoader
loadClass
[internal]
0
30
spl_autoload_call
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
TokenParser.php
17
29
include
/
vendor
/
composer
/
ClassLoader.php
444
28
Composer
\
Autoload
\
includeFile
/
vendor
/
composer
/
ClassLoader.php
322
27
Composer
\
Autoload
\
ClassLoader
loadClass
[internal]
0
26
spl_autoload_call
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
TokenParser
/
For.php
26
25
include
/
vendor
/
composer
/
ClassLoader.php
444
24
Composer
\
Autoload
\
includeFile
/
vendor
/
composer
/
ClassLoader.php
322
23
Composer
\
Autoload
\
ClassLoader
loadClass
[internal]
0
22
spl_autoload_call
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Extension
/
Core.php
123
21
Twig_Extension_Core
getTokenParsers
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
1546
20
Twig_Environment
initExtension
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
1500
19
Twig_Environment
initExtensions
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
1422
18
Twig_Environment
getUnaryOperators
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Lexer.php
385
17
Twig_Lexer
getOperatorRegex
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Lexer.php
68
16
Twig_Lexer
__construct
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
674
15
Twig_Environment
tokenize
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
774
14
Twig_Environment
compileSource
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
452
13
Twig_Environment
loadTemplate
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
363
12
Twig_Environment
render
/
system
/
src
/
Grav
/
Common
/
Twig
/
Twig.php
249
11
Grav
\
Common
\
Twig
\
Twig
processPage
/
system
/
src
/
Grav
/
Common
/
Page
/
Page.php
786
10
Grav
\
Common
\
Page
\
Page
processTwig
/
system
/
src
/
Grav
/
Common
/
Page
/
Page.php
653
9
Grav
\
Common
\
Page
\
Page
content
/
system
/
src
/
Grav
/
Common
/
Twig
/
Twig.php
327
8
Grav
\
Common
\
Twig
\
Twig
processSite
/
system
/
src
/
Grav
/
Common
/
Service
/
OutputServiceProvider.php
27
7
Grav
\
Common
\
Service
\
OutputServiceProvider
Grav
\
Common
\
Service
\
{closure}
/
vendor
/
pimple
/
pimple
/
src
/
Pimple
/
Container.php
118
6
Pimple
\
Container
offsetGet
/
system
/
src
/
Grav
/
Common
/
Processors
/
RenderProcessor.php
19
5
Grav
\
Common
\
Processors
\
RenderProcessor
process
/
system
/
src
/
Grav
/
Common
/
Grav.php
132
4
Grav
\
Common
\
Grav
Grav
\
Common
\
{closure}
/
system
/
src
/
Grav
/
Common
/
Grav.php
374
3
Grav
\
Common
\
Grav
Grav
\
Common
\
{closure}
/
system
/
src
/
Grav
/
Common
/
Grav.php
350
2
call_user_func_array
/
system
/
src
/
Grav
/
Common
/
Grav.php
350
1
Grav
\
Common
\
Grav
__call
/
system
/
src
/
Grav
/
Common
/
Grav.php
133
0
Grav
\
Common
\
Grav
process
/
index.php
52
/
home
/
petigny
/
www
/
blog
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
     * @param string             $name   The template name (deprecated)
     *
     * @return string The compiled PHP source code
     *
     * @throws Twig_Error_Syntax When there was an error during tokenizing, parsing or compiling
     */
    public function compileSource($source, $name = null)
    {
        if (!$source instanceof Twig_Source) {
            @trigger_error(sprintf('Passing a string as the $source argument of %s() is deprecated since version 1.27. Pass a Twig_Source instance instead.', __METHOD__), E_USER_DEPRECATED);
            $source = new Twig_Source($source, $name);
        }
 
        try {
            return $this->compile($this->parse($this->tokenize($source)));
        } catch (Twig_Error $e) {
            $e->setSourceContext($source);
            throw $e;
        } catch (Exception $e) {
            throw new Twig_Error_Syntax(sprintf('An exception has been thrown during the compilation of a template ("%s").', $e->getMessage()), -1, $source, $e);
        }
    }
 
    public function setLoader(Twig_LoaderInterface $loader)
    {
        if (!$loader instanceof Twig_SourceContextLoaderInterface && 0 !== strpos(get_class($loader), 'Mock_')) {
            @trigger_error(sprintf('Twig loader "%s" should implement Twig_SourceContextLoaderInterface since version 1.27.', get_class($loader)), E_USER_DEPRECATED);
        }
 
        $this->loader = $loader;
    }
 
    /**
     * Gets the Loader instance.
     *
     * @return Twig_LoaderInterface
     */
    public function getLoader()
    {
        if (null === $this->loader) {
Arguments
  1. "An exception has been thrown during the compilation of a template ("Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`") in "@Page:/home/petigny/www/blog/user/plugins/error/pages"."
    
/
home
/
petigny
/
www
/
blog
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Node.php
    protected $tag;
 
    private $name;
 
    /**
     * Constructor.
     *
     * The nodes are automatically made available as properties ($this->node).
     * The attributes are automatically made available as array items ($this['name']).
     *
     * @param array  $nodes      An array of named nodes
     * @param array  $attributes An array of attributes (should not be nodes)
     * @param int    $lineno     The line number
     * @param string $tag        The tag name associated with the Node
     */
    public function __construct(array $nodes = array(), array $attributes = array(), $lineno = 0, $tag = null)
    {
        foreach ($nodes as $name => $node) {
            if (!$node instanceof Twig_NodeInterface) {
                @trigger_error(sprintf('Using "%s" for the value of node "%s" of "%s" is deprecated since version 1.25 and will be removed in 2.0.', is_object($node) ? get_class($node) : null === $node ? 'null' : gettype($node), $name, get_class($this)), E_USER_DEPRECATED);
            }
        }
        $this->nodes = $nodes;
        $this->attributes = $attributes;
        $this->lineno = $lineno;
        $this->tag = $tag;
    }
 
    public function __toString()
    {
        $attributes = array();
        foreach ($this->attributes as $name => $value) {
            $attributes[] = sprintf('%s: %s', $name, str_replace("\n", '', var_export($value, true)));
        }
 
        $repr = array(get_class($this).'('.implode(', ', $attributes));
 
        if (count($this->nodes)) {
            foreach ($this->nodes as $name => $node) {
                $len = strlen($name) + 4;
Arguments
  1. "Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`"
    
Exception message: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
/
home
/
petigny
/
www
/
blog
/
vendor
/
composer
/
ClassLoader.php
            }
        }
 
        // PSR-0 include paths.
        if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
            return $file;
        }
 
        return false;
    }
}
 
/**
 * Scope isolated include.
 *
 * Prevents access to $this/self from included files.
 */
function includeFile($file)
{
    include $file;
}
 
Arguments
  1. 8192
    
  2. "Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`"
    
  3. "/home/petigny/www/blog/vendor/twig/twig/lib/Twig/Node.php"
    
  4. 42
    
  5. array:1 [
      "file" => "/home/petigny/www/blog/vendor/composer/../twig/twig/lib/Twig/Node.php"
    ]
    
/
home
/
petigny
/
www
/
blog
/
vendor
/
composer
/
ClassLoader.php
            }
        }
 
        // PSR-0 include paths.
        if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
            return $file;
        }
 
        return false;
    }
}
 
/**
 * Scope isolated include.
 *
 * Prevents access to $this/self from included files.
 */
function includeFile($file)
{
    include $file;
}
 
/
home
/
petigny
/
www
/
blog
/
vendor
/
composer
/
ClassLoader.php
    }
 
    /**
     * Unregisters this instance as an autoloader.
     */
    public function unregister()
    {
        spl_autoload_unregister(array($this, 'loadClass'));
    }
 
    /**
     * Loads the given class or interface.
     *
     * @param  string    $class The name of the class
     * @return bool|null True if loaded, null otherwise
     */
    public function loadClass($class)
    {
        if ($file = $this->findFile($class)) {
            includeFile($file);
 
            return true;
        }
    }
 
    /**
     * Finds the path to the file where the class is defined.
     *
     * @param string $class The name of the class
     *
     * @return string|false The path if found, false otherwise
     */
    public function findFile($class)
    {
        // class map lookup
        if (isset($this->classMap[$class])) {
            return $this->classMap[$class];
        }
        if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
            return false;
Arguments
  1. "/home/petigny/www/blog/vendor/composer/../twig/twig/lib/Twig/Node.php"
    
[internal]
Arguments
  1. "Twig_Node"
    
[internal]
Arguments
  1. "Twig_Node"
    
/
home
/
petigny
/
www
/
blog
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Parser.php
        if ($node instanceof Twig_NodeCaptureInterface) {
            return $node;
        }
 
        if ($node instanceof Twig_NodeOutputInterface) {
            return;
        }
 
        foreach ($node as $k => $n) {
            if (null !== $n && null === $this->filterBodyNodes($n)) {
                $node->removeNode($k);
            }
        }
 
        return $node;
    }
}
 
class_alias('Twig_Parser', 'Twig\Parser', false);
class_exists('Twig_Node');
class_exists('Twig_TokenStream');
 
Arguments
  1. "Twig_Node"
    
/
home
/
petigny
/
www
/
blog
/
vendor
/
composer
/
ClassLoader.php
            }
        }
 
        // PSR-0 include paths.
        if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
            return $file;
        }
 
        return false;
    }
}
 
/**
 * Scope isolated include.
 *
 * Prevents access to $this/self from included files.
 */
function includeFile($file)
{
    include $file;
}
 
Arguments
  1. "/home/petigny/www/blog/vendor/twig/twig/lib/Twig/Parser.php"
    
/
home
/
petigny
/
www
/
blog
/
vendor
/
composer
/
ClassLoader.php
    }
 
    /**
     * Unregisters this instance as an autoloader.
     */
    public function unregister()
    {
        spl_autoload_unregister(array($this, 'loadClass'));
    }
 
    /**
     * Loads the given class or interface.
     *
     * @param  string    $class The name of the class
     * @return bool|null True if loaded, null otherwise
     */
    public function loadClass($class)
    {
        if ($file = $this->findFile($class)) {
            includeFile($file);
 
            return true;
        }
    }
 
    /**
     * Finds the path to the file where the class is defined.
     *
     * @param string $class The name of the class
     *
     * @return string|false The path if found, false otherwise
     */
    public function findFile($class)
    {
        // class map lookup
        if (isset($this->classMap[$class])) {
            return $this->classMap[$class];
        }
        if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
            return false;
Arguments
  1. "/home/petigny/www/blog/vendor/composer/../twig/twig/lib/Twig/Parser.php"
    
[internal]
Arguments
  1. "Twig_Parser"
    
[internal]
Arguments
  1. "Twig_Parser"
    
/
home
/
petigny
/
www
/
blog
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
TokenParserInterface.php
 
    /**
     * Parses a token and returns a node.
     *
     * @return Twig_NodeInterface
     *
     * @throws Twig_Error_Syntax
     */
    public function parse(Twig_Token $token);
 
    /**
     * Gets the tag name associated with this token parser.
     *
     * @return string The tag name
     */
    public function getTag();
}
 
class_alias('Twig_TokenParserInterface', 'Twig\TokenParser\TokenParserInterface', false);
class_exists('Twig_Parser');
class_exists('Twig_Token');
 
Arguments
  1. "Twig_Parser"
    
/
home
/
petigny
/
www
/
blog
/
vendor
/
composer
/
ClassLoader.php
            }
        }
 
        // PSR-0 include paths.
        if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
            return $file;
        }
 
        return false;
    }
}
 
/**
 * Scope isolated include.
 *
 * Prevents access to $this/self from included files.
 */
function includeFile($file)
{
    include $file;
}
 
Arguments
  1. "/home/petigny/www/blog/vendor/twig/twig/lib/Twig/TokenParserInterface.php"
    
/
home
/
petigny
/
www
/
blog
/
vendor
/
composer
/
ClassLoader.php
    }
 
    /**
     * Unregisters this instance as an autoloader.
     */
    public function unregister()
    {
        spl_autoload_unregister(array($this, 'loadClass'));
    }
 
    /**
     * Loads the given class or interface.
     *
     * @param  string    $class The name of the class
     * @return bool|null True if loaded, null otherwise
     */
    public function loadClass($class)
    {
        if ($file = $this->findFile($class)) {
            includeFile($file);
 
            return true;
        }
    }
 
    /**
     * Finds the path to the file where the class is defined.
     *
     * @param string $class The name of the class
     *
     * @return string|false The path if found, false otherwise
     */
    public function findFile($class)
    {
        // class map lookup
        if (isset($this->classMap[$class])) {
            return $this->classMap[$class];
        }
        if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
            return false;
Arguments
  1. "/home/petigny/www/blog/vendor/composer/../twig/twig/lib/Twig/TokenParserInterface.php"
    
[internal]
Arguments
  1. "Twig_TokenParserInterface"
    
/
home
/
petigny
/
www
/
blog
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
TokenParser.php
<?php
 
/*
 * This file is part of Twig.
 *
 * (c) Fabien Potencier
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
 
/**
 * Base class for all token parsers.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
abstract class Twig_TokenParser implements Twig_TokenParserInterface
{
    /**
     * @var Twig_Parser
     */
    protected $parser;
 
    /**
     * Sets the parser associated with this token parser.
     */
    public function setParser(Twig_Parser $parser)
    {
        $this->parser = $parser;
    }
}
 
class_alias('Twig_TokenParser', 'Twig\TokenParser\AbstractTokenParser', false);
 
Arguments
  1. "Twig_TokenParserInterface"
    
/
home
/
petigny
/
www
/
blog
/
vendor
/
composer
/
ClassLoader.php
            }
        }
 
        // PSR-0 include paths.
        if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
            return $file;
        }
 
        return false;
    }
}
 
/**
 * Scope isolated include.
 *
 * Prevents access to $this/self from included files.
 */
function includeFile($file)
{
    include $file;
}
 
Arguments
  1. "/home/petigny/www/blog/vendor/twig/twig/lib/Twig/TokenParser.php"
    
/
home
/
petigny
/
www
/
blog
/
vendor
/
composer
/
ClassLoader.php
    }
 
    /**
     * Unregisters this instance as an autoloader.
     */
    public function unregister()
    {
        spl_autoload_unregister(array($this, 'loadClass'));
    }
 
    /**
     * Loads the given class or interface.
     *
     * @param  string    $class The name of the class
     * @return bool|null True if loaded, null otherwise
     */
    public function loadClass($class)
    {
        if ($file = $this->findFile($class)) {
            includeFile($file);
 
            return true;
        }
    }
 
    /**
     * Finds the path to the file where the class is defined.
     *
     * @param string $class The name of the class
     *
     * @return string|false The path if found, false otherwise
     */
    public function findFile($class)
    {
        // class map lookup
        if (isset($this->classMap[$class])) {
            return $this->classMap[$class];
        }
        if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
            return false;
Arguments
  1. "/home/petigny/www/blog/vendor/composer/../twig/twig/lib/Twig/TokenParser.php"
    
[internal]
Arguments
  1. "Twig_TokenParser"
    
/
home
/
petigny
/
www
/
blog
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
TokenParser
/
For.php
 * (c) Armin Ronacher
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
 
/**
 * Loops over each item of a sequence.
 *
 * <pre>
 * <ul>
 *  {% for user in users %}
 *    <li>{{ user.username|e }}</li>
 *  {% endfor %}
 * </ul>
 * </pre>
 *
 * @final
 */
class Twig_TokenParser_For extends Twig_TokenParser
{
    public function parse(Twig_Token $token)
    {
        $lineno = $token->getLine();
        $stream = $this->parser->getStream();
        $targets = $this->parser->getExpressionParser()->parseAssignmentExpression();
        $stream->expect(Twig_Token::OPERATOR_TYPE, 'in');
        $seq = $this->parser->getExpressionParser()->parseExpression();
 
        $ifexpr = null;
        if ($stream->nextIf(Twig_Token::NAME_TYPE, 'if')) {
            $ifexpr = $this->parser->getExpressionParser()->parseExpression();
        }
 
        $stream->expect(Twig_Token::BLOCK_END_TYPE);
        $body = $this->parser->subparse(array($this, 'decideForFork'));
        if ('else' == $stream->next()->getValue()) {
            $stream->expect(Twig_Token::BLOCK_END_TYPE);
            $else = $this->parser->subparse(array($this, 'decideForEnd'), true);
        } else {
Arguments
  1. "Twig_TokenParser"
    
/
home
/
petigny
/
www
/
blog
/
vendor
/
composer
/
ClassLoader.php
            }
        }
 
        // PSR-0 include paths.
        if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
            return $file;
        }
 
        return false;
    }
}
 
/**
 * Scope isolated include.
 *
 * Prevents access to $this/self from included files.
 */
function includeFile($file)
{
    include $file;
}
 
Arguments
  1. "/home/petigny/www/blog/vendor/twig/twig/lib/Twig/TokenParser/For.php"
    
/
home
/
petigny
/
www
/
blog
/
vendor
/
composer
/
ClassLoader.php
    }
 
    /**
     * Unregisters this instance as an autoloader.
     */
    public function unregister()
    {
        spl_autoload_unregister(array($this, 'loadClass'));
    }
 
    /**
     * Loads the given class or interface.
     *
     * @param  string    $class The name of the class
     * @return bool|null True if loaded, null otherwise
     */
    public function loadClass($class)
    {
        if ($file = $this->findFile($class)) {
            includeFile($file);
 
            return true;
        }
    }
 
    /**
     * Finds the path to the file where the class is defined.
     *
     * @param string $class The name of the class
     *
     * @return string|false The path if found, false otherwise
     */
    public function findFile($class)
    {
        // class map lookup
        if (isset($this->classMap[$class])) {
            return $this->classMap[$class];
        }
        if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
            return false;
Arguments
  1. "/home/petigny/www/blog/vendor/composer/../twig/twig/lib/Twig/TokenParser/For.php"
    
[internal]
Arguments
  1. "Twig_TokenParser_For"
    
/
home
/
petigny
/
www
/
blog
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Extension
/
Core.php
     */
    public function setNumberFormat($decimal, $decimalPoint, $thousandSep)
    {
        $this->numberFormat = array($decimal, $decimalPoint, $thousandSep);
    }
 
    /**
     * Get the default format used by the number_format filter.
     *
     * @return array The arguments for number_format()
     */
    public function getNumberFormat()
    {
        return $this->numberFormat;
    }
 
    public function getTokenParsers()
    {
        return array(
            new Twig_TokenParser_For(),
            new Twig_TokenParser_If(),
            new Twig_TokenParser_Extends(),
            new Twig_TokenParser_Include(),
            new Twig_TokenParser_Block(),
            new Twig_TokenParser_Use(),
            new Twig_TokenParser_Filter(),
            new Twig_TokenParser_Macro(),
            new Twig_TokenParser_Import(),
            new Twig_TokenParser_From(),
            new Twig_TokenParser_Set(),
            new Twig_TokenParser_Spaceless(),
            new Twig_TokenParser_Flush(),
            new Twig_TokenParser_Do(),
            new Twig_TokenParser_Embed(),
            new Twig_TokenParser_With(),
        );
    }
 
    public function getFilters()
    {
Arguments
  1. "Twig_TokenParser_For"
    
/
home
/
petigny
/
www
/
blog
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
            } else {
                @trigger_error(sprintf('Using an instance of "%s" for function "%s" is deprecated since version 1.21. Use Twig_SimpleFunction instead.', get_class($function), $name), E_USER_DEPRECATED);
            }
 
            $this->functions[$name] = $function;
        }
 
        // tests
        foreach ($extension->getTests() as $name => $test) {
            if ($test instanceof Twig_SimpleTest) {
                $name = $test->getName();
            } else {
                @trigger_error(sprintf('Using an instance of "%s" for test "%s" is deprecated since version 1.21. Use Twig_SimpleTest instead.', get_class($test), $name), E_USER_DEPRECATED);
            }
 
            $this->tests[$name] = $test;
        }
 
        // token parsers
        foreach ($extension->getTokenParsers() as $parser) {
            if ($parser instanceof Twig_TokenParserInterface) {
                $this->parsers->addTokenParser($parser);
            } elseif ($parser instanceof Twig_TokenParserBrokerInterface) {
                @trigger_error('Registering a Twig_TokenParserBrokerInterface instance is deprecated since version 1.21.', E_USER_DEPRECATED);
 
                $this->parsers->addTokenParserBroker($parser);
            } else {
                throw new LogicException('getTokenParsers() must return an array of Twig_TokenParserInterface or Twig_TokenParserBrokerInterface instances.');
            }
        }
 
        // node visitors
        foreach ($extension->getNodeVisitors() as $visitor) {
            $this->visitors[] = $visitor;
        }
 
        // operators
        if ($operators = $extension->getOperators()) {
            if (!is_array($operators)) {
                throw new InvalidArgumentException(sprintf('"%s::getOperators()" must return an array with operators, got "%s".', get_class($extension), is_object($operators) ? get_class($operators) : gettype($operators).(is_resource($operators) ? '' : '#'.$operators)));
/
home
/
petigny
/
www
/
blog
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
 
    /**
     * @internal
     */
    protected function initExtensions()
    {
        if ($this->extensionInitialized) {
            return;
        }
 
        $this->parsers = new Twig_TokenParserBroker(array(), array(), false);
        $this->filters = array();
        $this->functions = array();
        $this->tests = array();
        $this->visitors = array();
        $this->unaryOperators = array();
        $this->binaryOperators = array();
 
        foreach ($this->extensions as $extension) {
            $this->initExtension($extension);
        }
        $this->initExtension($this->staging);
        // Done at the end only, so that an exception during initialization does not mark the environment as initialized when catching the exception
        $this->extensionInitialized = true;
    }
 
    /**
     * @internal
     */
    protected function initExtension(Twig_ExtensionInterface $extension)
    {
        // filters
        foreach ($extension->getFilters() as $name => $filter) {
            if ($filter instanceof Twig_SimpleFilter) {
                $name = $filter->getName();
            } else {
                @trigger_error(sprintf('Using an instance of "%s" for filter "%s" is deprecated since version 1.21. Use Twig_SimpleFilter instead.', get_class($filter), $name), E_USER_DEPRECATED);
            }
 
            $this->filters[$name] = $filter;
Arguments
  1. Twig_Extension_Core {}
    
/
home
/
petigny
/
www
/
blog
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
        foreach ($this->getGlobals() as $key => $value) {
            if (!array_key_exists($key, $context)) {
                $context[$key] = $value;
            }
        }
 
        return $context;
    }
 
    /**
     * Gets the registered unary Operators.
     *
     * @return array An array of unary operators
     *
     * @internal
     */
    public function getUnaryOperators()
    {
        if (!$this->extensionInitialized) {
            $this->initExtensions();
        }
 
        return $this->unaryOperators;
    }
 
    /**
     * Gets the registered binary Operators.
     *
     * @return array An array of binary operators
     *
     * @internal
     */
    public function getBinaryOperators()
    {
        if (!$this->extensionInitialized) {
            $this->initExtensions();
        }
 
        return $this->binaryOperators;
    }
/
home
/
petigny
/
www
/
blog
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Lexer.php
    {
        // do not push empty text tokens
        if (Twig_Token::TEXT_TYPE === $type && '' === $value) {
            return;
        }
 
        $this->tokens[] = new Twig_Token($type, $value, $this->lineno);
    }
 
    protected function moveCursor($text)
    {
        $this->cursor += strlen($text);
        $this->lineno += substr_count($text, "\n");
    }
 
    protected function getOperatorRegex()
    {
        $operators = array_merge(
            array('='),
            array_keys($this->env->getUnaryOperators()),
            array_keys($this->env->getBinaryOperators())
        );
 
        $operators = array_combine($operators, array_map('strlen', $operators));
        arsort($operators);
 
        $regex = array();
        foreach ($operators as $operator => $length) {
            // an operator that ends with a character must be followed by
            // a whitespace or a parenthesis
            if (ctype_alpha($operator[$length - 1])) {
                $r = preg_quote($operator, '/').'(?=[\s()])';
            } else {
                $r = preg_quote($operator, '/');
            }
 
            // an operator with a space can be any amount of whitespaces
            $r = preg_replace('/\s+/', '\s+', $r);
 
            $regex[] = $r;
/
home
/
petigny
/
www
/
blog
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Lexer.php
    const REGEX_DQ_STRING_PART = '/[^#"\\\\]*(?:(?:\\\\.|#(?!\{))[^#"\\\\]*)*/As';
    const PUNCTUATION = '()[]{}?:.,|';
 
    public function __construct(Twig_Environment $env, array $options = array())
    {
        $this->env = $env;
 
        $this->options = array_merge(array(
            'tag_comment' => array('{#', '#}'),
            'tag_block' => array('{%', '%}'),
            'tag_variable' => array('{{', '}}'),
            'whitespace_trim' => '-',
            'interpolation' => array('#{', '}'),
        ), $options);
 
        $this->regexes = array(
            'lex_var' => '/\s*'.preg_quote($this->options['whitespace_trim'].$this->options['tag_variable'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_variable'][1], '/').'/A',
            'lex_block' => '/\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')\n?/A',
            'lex_raw_data' => '/('.preg_quote($this->options['tag_block'][0].$this->options['whitespace_trim'], '/').'|'.preg_quote($this->options['tag_block'][0], '/').')\s*(?:end%s)\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')/s',
            'operator' => $this->getOperatorRegex(),
            'lex_comment' => '/(?:'.preg_quote($this->options['whitespace_trim'], '/').preg_quote($this->options['tag_comment'][1], '/').'\s*|'.preg_quote($this->options['tag_comment'][1], '/').')\n?/s',
            'lex_block_raw' => '/\s*(raw|verbatim)\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')/As',
            'lex_block_line' => '/\s*line\s+(\d+)\s*'.preg_quote($this->options['tag_block'][1], '/').'/As',
            'lex_tokens_start' => '/('.preg_quote($this->options['tag_variable'][0], '/').'|'.preg_quote($this->options['tag_block'][0], '/').'|'.preg_quote($this->options['tag_comment'][0], '/').')('.preg_quote($this->options['whitespace_trim'], '/').')?/s',
            'interpolation_start' => '/'.preg_quote($this->options['interpolation'][0], '/').'\s*/A',
            'interpolation_end' => '/\s*'.preg_quote($this->options['interpolation'][1], '/').'/A',
        );
    }
 
    public function tokenize($code, $name = null)
    {
        if (!$code instanceof Twig_Source) {
            @trigger_error(sprintf('Passing a string as the $code argument of %s() is deprecated since version 1.27 and will be removed in 2.0. Pass a Twig_Source instance instead.', __METHOD__), E_USER_DEPRECATED);
            $this->source = new Twig_Source($code, $name);
        } else {
            $this->source = $code;
        }
 
        if (((int) ini_get('mbstring.func_overload')) & 2) {
            @trigger_error('Support for having "mbstring.func_overload" different from 0 is deprecated version 1.29 and will be removed in 2.0.', E_USER_DEPRECATED);
/
home
/
petigny
/
www
/
blog
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
 
    /**
     * Tokenizes a source code.
     *
     * @param string|Twig_Source $source The template source code
     * @param string             $name   The template name (deprecated)
     *
     * @return Twig_TokenStream
     *
     * @throws Twig_Error_Syntax When the code is syntactically wrong
     */
    public function tokenize($source, $name = null)
    {
        if (!$source instanceof Twig_Source) {
            @trigger_error(sprintf('Passing a string as the $source argument of %s() is deprecated since version 1.27. Pass a Twig_Source instance instead.', __METHOD__), E_USER_DEPRECATED);
            $source = new Twig_Source($source, $name);
        }
 
        if (null === $this->lexer) {
            $this->lexer = new Twig_Lexer($this);
        }
 
        return $this->lexer->tokenize($source);
    }
 
    /**
     * Gets the Parser instance.
     *
     * @return Twig_ParserInterface
     *
     * @deprecated since 1.25 (to be removed in 2.0)
     */
    public function getParser()
    {
        @trigger_error(sprintf('The %s() method is deprecated since version 1.25 and will be removed in 2.0.', __FUNCTION__), E_USER_DEPRECATED);
 
        if (null === $this->parser) {
            $this->parser = new Twig_Parser($this);
        }
 
Arguments
  1. TwigEnvironment {}
    
/
home
/
petigny
/
www
/
blog
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
 
    /**
     * Compiles a template source code.
     *
     * @param string|Twig_Source $source The template source code
     * @param string             $name   The template name (deprecated)
     *
     * @return string The compiled PHP source code
     *
     * @throws Twig_Error_Syntax When there was an error during tokenizing, parsing or compiling
     */
    public function compileSource($source, $name = null)
    {
        if (!$source instanceof Twig_Source) {
            @trigger_error(sprintf('Passing a string as the $source argument of %s() is deprecated since version 1.27. Pass a Twig_Source instance instead.', __METHOD__), E_USER_DEPRECATED);
            $source = new Twig_Source($source, $name);
        }
 
        try {
            return $this->compile($this->parse($this->tokenize($source)));
        } catch (Twig_Error $e) {
            $e->setSourceContext($source);
            throw $e;
        } catch (Exception $e) {
            throw new Twig_Error_Syntax(sprintf('An exception has been thrown during the compilation of a template ("%s").', $e->getMessage()), -1, $source, $e);
        }
    }
 
    public function setLoader(Twig_LoaderInterface $loader)
    {
        if (!$loader instanceof Twig_SourceContextLoaderInterface && 0 !== strpos(get_class($loader), 'Mock_')) {
            @trigger_error(sprintf('Twig loader "%s" should implement Twig_SourceContextLoaderInterface since version 1.27.', get_class($loader)), E_USER_DEPRECATED);
        }
 
        $this->loader = $loader;
    }
 
    /**
     * Gets the Loader instance.
     *
Arguments
  1. Twig_Source {}
    
/
home
/
petigny
/
www
/
blog
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
        if (!class_exists($cls, false)) {
            if ($this->bcGetCacheFilename) {
                $key = $this->getCacheFilename($name);
            } else {
                $key = $this->cache->generateKey($name, $mainCls);
            }
 
            if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
                $this->cache->load($key);
            }
 
            if (!class_exists($cls, false)) {
                $loader = $this->getLoader();
                if (!$loader instanceof Twig_SourceContextLoaderInterface) {
                    $source = new Twig_Source($loader->getSource($name), $name);
                } else {
                    $source = $loader->getSourceContext($name);
                }
 
                $content = $this->compileSource($source);
 
                if ($this->bcWriteCacheFile) {
                    $this->writeCacheFile($key, $content);
                } else {
                    $this->cache->write($key, $content);
                    $this->cache->load($key);
                }
 
                if (!class_exists($mainCls, false)) {
                    /* Last line of defense if either $this->bcWriteCacheFile was used,
                     * $this->cache is implemented as a no-op or we have a race condition
                     * where the cache was cleared between the above calls to write to and load from
                     * the cache.
                     */
                    eval('?>'.$content);
                }
            }
 
            if (!class_exists($cls, false)) {
                throw new Twig_Error_Runtime(sprintf('Failed to load Twig template "%s", index "%s": cache is corrupted.', $name, $index), -1, $source);
Arguments
  1. Twig_Source {}
    
/
home
/
petigny
/
www
/
blog
/
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
  1. "@Page:/home/petigny/www/blog/user/plugins/error/pages"
    
/
home
/
petigny
/
www
/
blog
/
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
  1. "@Page:/home/petigny/www/blog/user/plugins/error/pages"
    
  2. array:35 [
      "form_button_outer_classes" => "button-wrapper"
      "form_button_classes" => "btn"
      "form_errors_classes" => ""
      "form_field_outer_classes" => "form-group"
      "form_field_outer_label_classes" => "form-label-wrapper"
      "form_field_label_classes" => "form-label"
      "form_field_input_classes" => "form-input"
      "form_field_textarea_classes" => "form-input"
      "form_field_select_classes" => "form-select"
      "form_field_radio_classes" => "form-radio"
      "form_field_checkbox_classes" => "form-checkbox"
      "config" => Config {}
      "system" => array:24 [
        "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: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" => "quark"
          "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" => false
          ]
          "twig_first" => false
          "never_cache_twig" => false
          "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" => 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
          "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" => true
          "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
          "unsupported_inline_types" => []
          "allowed_fallback_types" => []
          "auto_metadata_exif" => false
          "upload_limit" => 134217728
        ]
        "session" => array:8 [
          "enabled" => true
          "initialize" => 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:10 [
        "enabled" => true
        "production-mode" => true
        "grid-size" => "grid-lg"
        "header-fixed" => true
        "header-animated" => true
        "header-dark" => false
        "header-transparent" => false
        "sticky-footer" => true
        "blog-page" => "/blog"
        "spectre" => array:2 [
          "exp" => false
          "icons" => false
        ]
      ]
      "site" => array:9 [
        "title" => "Grav"
        "default_lang" => "en"
        "author" => array:2 [
          "name" => "Joe Bloggs"
          "email" => "joe@test.com"
        ]
        "taxonomies" => array:2 [
          0 => "category"
          1 => "tag"
        ]
        "metadata" => array:1 [
          "description" => "Grav is an easy to use, yet powerful, open source flat-file CMS"
        ]
        "summary" => array:4 [
          "enabled" => true
          "format" => "short"
          "size" => 300
          "delimiter" => "==="
        ]
        "redirects" => null
        "routes" => null
        "blog" => array:1 [
          "route" => "/blog"
        ]
      ]
      "uri" => Uri {}
      "assets" => Assets {}
      "taxonomy" => Taxonomy {}
      "browser" => Browser {}
      "base_dir" => "/home/petigny/www/blog"
      "home_url" => "/blog"
      "base_url" => "/blog"
      "base_url_absolute" => "https://www.petigny.com/blog"
      "base_url_relative" => "/blog"
      "base_url_simple" => "/blog"
      "theme_dir" => "/home/petigny/www/blog/user/themes/quark"
      "theme_url" => "/blog/user/themes/quark"
      "html_lang" => "en"
      "language_codes" => LanguageCodes {}
      "form" => null
      "form_max_filesize" => 128
      "form_json_response" => []
      "page" => Page {}
      "media" => Media {}
      "header" => {}
    ]
    
/
home
/
petigny
/
www
/
blog
/
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
  1. Page {}
    
  2. """
    {{ 'PLUGIN_ERROR.ERROR_MESSAGE'|t }}\n
    \n
    """
    
/
home
/
petigny
/
www
/
blog
/
system
/
src
/
Grav
/
Common
/
Page
/
Page.php
                    // 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) {
                            $this->processMarkdown();
                        }
 
                        // Content Processed but not cached yet
                        Grav::instance()->fireEvent('onPageContentProcessed', new Event(['page' => $this]));
 
                        if ($process_twig) {
                            $this->processTwig();
                        }
                    }
/
home
/
petigny
/
www
/
blog
/
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);
 
/
home
/
petigny
/
www
/
blog
/
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
  1. "html"
    
/
home
/
petigny
/
www
/
blog
/
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
  1. Grav {}
    
/
home
/
petigny
/
www
/
blog
/
system
/
src
/
Grav
/
Common
/
Processors
/
RenderProcessor.php
<?php
/**
 * @package    Grav.Common.Processors
 *
 * @copyright  Copyright (C) 2015 - 2018 Trilby Media, 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
  1. "output"
    
/
home
/
petigny
/
www
/
blog
/
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, strlen($language) < 3 ? ($language . '_' . strtoupper($language)) : $language);
        } elseif ($this['config']->get('system.default_locale')) {
/
home
/
petigny
/
www
/
blog
/
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()
    {
/
home
/
petigny
/
www
/
blog
/
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
  1. "render"
    
  2. "Render"
    
  3. Closure {
      class: "Grav\Common\Grav"
      this: Grav { …}
      use: {
        $processor: RenderProcessor {}
      }
      file: "/home/petigny/www/blog/system/src/Grav/Common/Grav.php"
      line: "131 to 133"
    }
    
/
home
/
petigny
/
www
/
blog
/
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
  1. Closure {
      class: "Grav\Common\Grav"
      parameters: {
        $timerId: {}
        $timerTitle: {}
        $callback: {}
      }
      use: {
        $debugger: Debugger {}
      }
      file: "/home/petigny/www/blog/system/src/Grav/Common/Grav.php"
      line: "372 to 376"
    }
    
  2. array:3 [
      0 => "render"
      1 => "Render"
      2 => Closure {
        class: "Grav\Common\Grav"
        this: Grav { …}
        use: {
          $processor: RenderProcessor {}
        }
        file: "/home/petigny/www/blog/system/src/Grav/Common/Grav.php"
        line: "131 to 133"
      }
    ]
    
/
home
/
petigny
/
www
/
blog
/
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, strlen($language) < 3 ? ($language . '_' . strtoupper($language)) : $language);
        } elseif ($this['config']->get('system.default_locale')) {
            setlocale(LC_ALL, $this['config']->get('system.default_locale'));
Arguments
  1. "measureTime"
    
  2. array:3 [
      0 => "render"
      1 => "Render"
      2 => Closure {
        class: "Grav\Common\Grav"
        this: Grav { …}
        use: {
          $processor: RenderProcessor {}
        }
        file: "/home/petigny/www/blog/system/src/Grav/Common/Grav.php"
        line: "131 to 133"
      }
    ]
    
/
home
/
petigny
/
www
/
blog
/
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;
}
 

Environment & details:

empty
empty
empty
empty
Key Value
user
User {}
Key Value
PATH
"/usr/local/bin:/usr/bin:/bin"
REDIRECT_STATUS
"200"
UNIQUE_ID
"ZgWN3xMXKabAJ7MDCbb5LgAAACU"
GEOIP_COUNTRY_CODE
"US"
GEOIP_COUNTRY_NAME
"United States"
GEOIP_REGION
"VA"
GEOIP_CITY
"Ashburn"
GEOIP_DMA_CODE
"511"
GEOIP_AREA_CODE
"703"
GEOIP_LATITUDE
"39.046902"
GEOIP_LONGITUDE
"-77.490303"
SCRIPT_URL
"/blog/2015/03/08/le-jour-ou-jai-arrete-de-poster-sur-facebook"
SCRIPT_URI
"https://www.petigny.com:443/blog/2015/03/08/le-jour-ou-jai-arrete-de-poster-sur-facebook"
HTTPS
"on"
CFG_CLUSTER
"cluster014"
ENVIRONMENT
"production"
APP_ENGINE_VERSION
"7.4"
APP_ENGINE
"phpcgi"
HTTP_HOST
"www.petigny.com"
HTTP_X_PREDICTOR
"1"
HTTP_X_FORWARDED_FOR
"44.192.247.185"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_X_OVHREQUEST_ID
"6fc31091ca1a656ab6486b50985dba6e"
HTTP_ACCEPT
"*/*"
HTTP_USER_AGENT
"claudebot"
HTTP_REFERER
"https://www.petigny.com/blog/2015/03/08/le-jour-ou-jai-arrete-de-poster-sur-facebook/"
HTTP_REMOTE_IP
"44.192.247.185"
SERVER_SIGNATURE
""
SERVER_SOFTWARE
"Apache"
SERVER_NAME
"www.petigny.com"
SERVER_ADDR
"10.14.20.34"
SERVER_PORT
"443"
REMOTE_ADDR
"44.192.247.185"
DOCUMENT_ROOT
"/home/petigny/www"
SERVER_ADMIN
"postmaster@www.petigny.com"
SCRIPT_FILENAME
"/home/petigny/www/blog/index.php"
REMOTE_PORT
"60152"
REDIRECT_URL
"/blog/2015/03/08/le-jour-ou-jai-arrete-de-poster-sur-facebook"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.1"
REQUEST_METHOD
"GET"
QUERY_STRING
""
REQUEST_URI
"/blog/2015/03/08/le-jour-ou-jai-arrete-de-poster-sur-facebook"
SCRIPT_NAME
"/blog/index.php"
HOME
"/homez.574/petigny"
PWD
"/homez.574/petigny/www/blog"
UID
"petigny"
PHP_SELF
"/blog/index.php"
REQUEST_TIME_FLOAT
1711640031.5329
REQUEST_TIME
1711640031
argv
array:1 [
  0 => "index.php"
]
argc
1
Key Value
PATH
"/usr/local/bin:/usr/bin:/bin"
REDIRECT_STATUS
"200"
UNIQUE_ID
"ZgWN3xMXKabAJ7MDCbb5LgAAACU"
GEOIP_COUNTRY_CODE
"US"
GEOIP_COUNTRY_NAME
"United States"
GEOIP_REGION
"VA"
GEOIP_CITY
"Ashburn"
GEOIP_DMA_CODE
"511"
GEOIP_AREA_CODE
"703"
GEOIP_LATITUDE
"39.046902"
GEOIP_LONGITUDE
"-77.490303"
SCRIPT_URL
"/blog/2015/03/08/le-jour-ou-jai-arrete-de-poster-sur-facebook"
SCRIPT_URI
"https://www.petigny.com:443/blog/2015/03/08/le-jour-ou-jai-arrete-de-poster-sur-facebook"
HTTPS
"on"
CFG_CLUSTER
"cluster014"
ENVIRONMENT
"production"
APP_ENGINE_VERSION
"7.4"
APP_ENGINE
"phpcgi"
HTTP_HOST
"www.petigny.com"
HTTP_X_PREDICTOR
"1"
HTTP_X_FORWARDED_FOR
"44.192.247.185"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_X_OVHREQUEST_ID
"6fc31091ca1a656ab6486b50985dba6e"
HTTP_ACCEPT
"*/*"
HTTP_USER_AGENT
"claudebot"
HTTP_REFERER
"https://www.petigny.com/blog/2015/03/08/le-jour-ou-jai-arrete-de-poster-sur-facebook/"
HTTP_REMOTE_IP
"44.192.247.185"
SERVER_SIGNATURE
""
SERVER_SOFTWARE
"Apache"
SERVER_NAME
"www.petigny.com"
SERVER_ADDR
"10.14.20.34"
SERVER_PORT
"443"
REMOTE_ADDR
"44.192.247.185"
DOCUMENT_ROOT
"/home/petigny/www"
SERVER_ADMIN
"postmaster@www.petigny.com"
SCRIPT_FILENAME
"/home/petigny/www/blog/index.php"
REMOTE_PORT
"60152"
REDIRECT_URL
"/blog/2015/03/08/le-jour-ou-jai-arrete-de-poster-sur-facebook"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.1"
REQUEST_METHOD
"GET"
QUERY_STRING
""
REQUEST_URI
"/blog/2015/03/08/le-jour-ou-jai-arrete-de-poster-sur-facebook"
SCRIPT_NAME
"/blog/index.php"
HOME
"/homez.574/petigny"
PWD
"/homez.574/petigny/www/blog"
UID
"petigny"
0. Whoops\Handler\PrettyPageHandler
1. Whoops\Handler\CallbackHandler