Whoops \ Exception \ ErrorException (E_NOTICE)
Trying to access array offset on value of type int Whoops\Exception\ErrorException thrown with message "Trying to access array offset on value of type int" Stacktrace: #26 Whoops\Exception\ErrorException in /var/www/vhosts/soutez.ta-pe-ty.cz/vendor/rockettheme/toolbox/Blueprints/src/BlueprintForm.php:379 #25 Whoops\Run:handleError in /var/www/vhosts/soutez.ta-pe-ty.cz/vendor/rockettheme/toolbox/Blueprints/src/BlueprintForm.php:379 #24 RocketTheme\Toolbox\Blueprints\BlueprintForm:deepInit in /var/www/vhosts/soutez.ta-pe-ty.cz/vendor/rockettheme/toolbox/Blueprints/src/BlueprintForm.php:407 #23 RocketTheme\Toolbox\Blueprints\BlueprintForm:deepInit in /var/www/vhosts/soutez.ta-pe-ty.cz/vendor/rockettheme/toolbox/Blueprints/src/BlueprintForm.php:407 #22 RocketTheme\Toolbox\Blueprints\BlueprintForm:deepInit in /var/www/vhosts/soutez.ta-pe-ty.cz/vendor/rockettheme/toolbox/Blueprints/src/BlueprintForm.php:144 #21 RocketTheme\Toolbox\Blueprints\BlueprintForm:load in /var/www/vhosts/soutez.ta-pe-ty.cz/user/plugins/form/classes/form.php:205 #20 Grav\Plugin\Form:Grav\Plugin\{closure} in /var/www/vhosts/soutez.ta-pe-ty.cz/system/src/Grav/Common/Data/Data.php:229 #19 Grav\Common\Data\Data:blueprints in /var/www/vhosts/soutez.ta-pe-ty.cz/user/plugins/form/classes/form.php:250 #18 Grav\Plugin\Form:fields in /var/www/vhosts/soutez.ta-pe-ty.cz/user/plugins/form/classes/form.php:211 #17 Grav\Plugin\Form:reset in /var/www/vhosts/soutez.ta-pe-ty.cz/user/plugins/form/classes/form.php:113 #16 Grav\Plugin\Form:__construct in /var/www/vhosts/soutez.ta-pe-ty.cz/user/plugins/form/form.php:113 #15 Grav\Plugin\FormPlugin:onPageProcessed in /var/www/vhosts/soutez.ta-pe-ty.cz/vendor/symfony/event-dispatcher/EventDispatcher.php:184 #14 call_user_func in /var/www/vhosts/soutez.ta-pe-ty.cz/vendor/symfony/event-dispatcher/EventDispatcher.php:184 #13 Symfony\Component\EventDispatcher\EventDispatcher:doDispatch in /var/www/vhosts/soutez.ta-pe-ty.cz/vendor/symfony/event-dispatcher/EventDispatcher.php:46 #12 Symfony\Component\EventDispatcher\EventDispatcher:dispatch in /var/www/vhosts/soutez.ta-pe-ty.cz/vendor/rockettheme/toolbox/Event/src/EventDispatcher.php:23 #11 RocketTheme\Toolbox\Event\EventDispatcher:dispatch in /var/www/vhosts/soutez.ta-pe-ty.cz/system/src/Grav/Common/Grav.php:288 #10 Grav\Common\Grav:fireEvent in /var/www/vhosts/soutez.ta-pe-ty.cz/system/src/Grav/Common/Page/Pages.php:1042 #9 Grav\Common\Page\Pages:recurse in /var/www/vhosts/soutez.ta-pe-ty.cz/system/src/Grav/Common/Page/Pages.php:1079 #8 Grav\Common\Page\Pages:recurse in /var/www/vhosts/soutez.ta-pe-ty.cz/system/src/Grav/Common/Page/Pages.php:936 #7 Grav\Common\Page\Pages:buildPages in /var/www/vhosts/soutez.ta-pe-ty.cz/system/src/Grav/Common/Page/Pages.php:212 #6 Grav\Common\Page\Pages:init in /var/www/vhosts/soutez.ta-pe-ty.cz/system/src/Grav/Common/Processors/PagesProcessor.php:23 #5 Grav\Common\Processors\PagesProcessor:process in /var/www/vhosts/soutez.ta-pe-ty.cz/system/src/Grav/Common/Grav.php:132 #4 Grav\Common\Grav:Grav\Common\{closure} in /var/www/vhosts/soutez.ta-pe-ty.cz/system/src/Grav/Common/Grav.php:379 #3 Grav\Common\Grav:Grav\Common\{closure} in /var/www/vhosts/soutez.ta-pe-ty.cz/system/src/Grav/Common/Grav.php:355 #2 call_user_func_array in /var/www/vhosts/soutez.ta-pe-ty.cz/system/src/Grav/Common/Grav.php:355 #1 Grav\Common\Grav:__call in /var/www/vhosts/soutez.ta-pe-ty.cz/system/src/Grav/Common/Grav.php:133 #0 Grav\Common\Grav:process in /var/www/vhosts/soutez.ta-pe-ty.cz/index.php:52
Stack frames (27)
26
Whoops
\
Exception
\
ErrorException
/
vendor
/
rockettheme
/
toolbox
/
Blueprints
/
src
/
BlueprintForm.php
379
25
Whoops
\
Run
handleError
/
vendor
/
rockettheme
/
toolbox
/
Blueprints
/
src
/
BlueprintForm.php
379
24
RocketTheme
\
Toolbox
\
Blueprints
\
BlueprintForm
deepInit
/
vendor
/
rockettheme
/
toolbox
/
Blueprints
/
src
/
BlueprintForm.php
407
23
RocketTheme
\
Toolbox
\
Blueprints
\
BlueprintForm
deepInit
/
vendor
/
rockettheme
/
toolbox
/
Blueprints
/
src
/
BlueprintForm.php
407
22
RocketTheme
\
Toolbox
\
Blueprints
\
BlueprintForm
deepInit
/
vendor
/
rockettheme
/
toolbox
/
Blueprints
/
src
/
BlueprintForm.php
144
21
RocketTheme
\
Toolbox
\
Blueprints
\
BlueprintForm
load
/
user
/
plugins
/
form
/
classes
/
form.php
205
20
Grav
\
Plugin
\
Form
Grav
\
Plugin
\
{closure}
/
system
/
src
/
Grav
/
Common
/
Data
/
Data.php
229
19
Grav
\
Common
\
Data
\
Data
blueprints
/
user
/
plugins
/
form
/
classes
/
form.php
250
18
Grav
\
Plugin
\
Form
fields
/
user
/
plugins
/
form
/
classes
/
form.php
211
17
Grav
\
Plugin
\
Form
reset
/
user
/
plugins
/
form
/
classes
/
form.php
113
16
Grav
\
Plugin
\
Form
__construct
/
user
/
plugins
/
form
/
form.php
113
15
Grav
\
Plugin
\
FormPlugin
onPageProcessed
/
vendor
/
symfony
/
event-dispatcher
/
EventDispatcher.php
184
14
call_user_func
/
vendor
/
symfony
/
event-dispatcher
/
EventDispatcher.php
184
13
Symfony
\
Component
\
EventDispatcher
\
EventDispatcher
doDispatch
/
vendor
/
symfony
/
event-dispatcher
/
EventDispatcher.php
46
12
Symfony
\
Component
\
EventDispatcher
\
EventDispatcher
dispatch
/
vendor
/
rockettheme
/
toolbox
/
Event
/
src
/
EventDispatcher.php
23
11
RocketTheme
\
Toolbox
\
Event
\
EventDispatcher
dispatch
/
system
/
src
/
Grav
/
Common
/
Grav.php
288
10
Grav
\
Common
\
Grav
fireEvent
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
1042
9
Grav
\
Common
\
Page
\
Pages
recurse
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
1079
8
Grav
\
Common
\
Page
\
Pages
recurse
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
936
7
Grav
\
Common
\
Page
\
Pages
buildPages
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
212
6
Grav
\
Common
\
Page
\
Pages
init
/
system
/
src
/
Grav
/
Common
/
Processors
/
PagesProcessor.php
23
5
Grav
\
Common
\
Processors
\
PagesProcessor
process
/
system
/
src
/
Grav
/
Common
/
Grav.php
132
4
Grav
\
Common
\
Grav
Grav
\
Common
\
{closure}
/
system
/
src
/
Grav
/
Common
/
Grav.php
379
3
Grav
\
Common
\
Grav
Grav
\
Common
\
{closure}
/
system
/
src
/
Grav
/
Common
/
Grav.php
355
2
call_user_func_array
/
system
/
src
/
Grav
/
Common
/
Grav.php
355
1
Grav
\
Common
\
Grav
__call
/
system
/
src
/
Grav
/
Common
/
Grav.php
133
0
Grav
\
Common
\
Grav
process
/
index.php
52
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
vendor
/
rockettheme
/
toolbox
/
Blueprints
/
src
/
BlueprintForm.php
 
    /**
     * @param array $items
     * @param array $path
     * @return string
     */
    protected function deepInit(array &$items, $path = [])
    {
        $ordering = '';
        $order = [];
        $field = end($path) === 'fields';
 
        foreach ($items as $key => &$item) {
            // Set name for nested field.
            if ($field && isset($item['type'])) {
                $item['name'] = $key;
            }
 
            // Handle special instructions in the form.
            if (!empty($key) && ($key[0] === '@' || $key[strlen($key) - 1] === '@')) {
                $list = explode('-', trim($key, '@'), 2);
                $action = array_shift($list);
                $property = array_shift($list);
 
                switch ($action) {
                    case 'unset':
                        unset($items[$key]);
                        if (empty($items)) {
                            return null;
                        }
                        break;
                    case 'import':
                        $this->doImport($item, $path);
                        unset($items[$key]);
                        break;
                    case 'ordering':
                        $ordering = $item;
                        unset($items[$key]);
                        break;
                    default:
Arguments
  1. "Trying to access array offset on value of type int"
    
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
vendor
/
rockettheme
/
toolbox
/
Blueprints
/
src
/
BlueprintForm.php
 
    /**
     * @param array $items
     * @param array $path
     * @return string
     */
    protected function deepInit(array &$items, $path = [])
    {
        $ordering = '';
        $order = [];
        $field = end($path) === 'fields';
 
        foreach ($items as $key => &$item) {
            // Set name for nested field.
            if ($field && isset($item['type'])) {
                $item['name'] = $key;
            }
 
            // Handle special instructions in the form.
            if (!empty($key) && ($key[0] === '@' || $key[strlen($key) - 1] === '@')) {
                $list = explode('-', trim($key, '@'), 2);
                $action = array_shift($list);
                $property = array_shift($list);
 
                switch ($action) {
                    case 'unset':
                        unset($items[$key]);
                        if (empty($items)) {
                            return null;
                        }
                        break;
                    case 'import':
                        $this->doImport($item, $path);
                        unset($items[$key]);
                        break;
                    case 'ordering':
                        $ordering = $item;
                        unset($items[$key]);
                        break;
                    default:
Arguments
  1. 8
    
  2. "Trying to access array offset on value of type int"
    
  3. "/var/www/vhosts/soutez.ta-pe-ty.cz/vendor/rockettheme/toolbox/Blueprints/src/BlueprintForm.php"
    
  4. 379
    
  5. array:9 [
      "items" => & array:4 [
        0 => array:1 [
          "email" => array:5 [
            "from" => "info@ta-pe-ty.cz"
            "to" => "tapetyopencall@gmail.com"
            "subject" => "{{ form.value.name|e }} {{ form.value.surname|e }}"
            "body" => "{% include 'forms/data.html.twig' %}"
            "attachments" => array:1 [
              0 => "my-file"
            ]
          ]
        ]
        1 => &2 array:1 [
          "email" => array:4 [
            "from" => "info@ta-pe-ty.cz"
            "to" => "{{ form.value.email }}"
            "subject" => "TA-PE-TY Děkují!"
            "body" => "{% include 'forms/email-reply.html.twig' %}"
          ]
        ]
        2 => array:1 [
          "save" => array:4 [
            "fileprefix" => "{{ form.value.my-file|e }}"
            "dateformat" => "Ymd-His-u"
            "extension" => "txt"
            "body" => "{% include 'forms/dada.txt.twig' %}"
          ]
        ]
        3 => array:1 [
          "display" => "/dekujeme"
        ]
      ]
      "path" => array:2 [
        0 => "form"
        1 => "process"
      ]
      "ordering" => ""
      "order" => []
      "field" => false
      "item" => &2 array:1 [&2]
      "key" => 1
      "newPath" => array:3 [
        0 => "form"
        1 => "process"
        2 => 0
      ]
      "location" => ""
    ]
    
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
vendor
/
rockettheme
/
toolbox
/
Blueprints
/
src
/
BlueprintForm.php
                            return null;
                        }
                        break;
                    case 'import':
                        $this->doImport($item, $path);
                        unset($items[$key]);
                        break;
                    case 'ordering':
                        $ordering = $item;
                        unset($items[$key]);
                        break;
                    default:
                        $this->dynamic[implode('/', $path)][$property] = ['action' => $action, 'params' => $item];
                }
 
            } elseif (is_array($item)) {
                // Recursively initialize form.
                $newPath = array_merge($path, [$key]);
 
                $location = $this->deepInit($item, $newPath);
                if ($location) {
                    $order[$key] = $location;
                } elseif ($location === null) {
                    unset($items[$key]);
                }
            }
        }
 
        if ($order) {
            // Reorder fields if needed.
            $items = $this->doReorder($items, $order);
        }
 
        return $ordering;
    }
 
    /**
     * @param array|string $value
     * @param array $path
     */
Arguments
  1. array:4 [
      0 => array:1 [
        "email" => array:5 [
          "from" => "info@ta-pe-ty.cz"
          "to" => "tapetyopencall@gmail.com"
          "subject" => "{{ form.value.name|e }} {{ form.value.surname|e }}"
          "body" => "{% include 'forms/data.html.twig' %}"
          "attachments" => array:1 [
            0 => "my-file"
          ]
        ]
      ]
      1 => & array:1 [
        "email" => array:4 [
          "from" => "info@ta-pe-ty.cz"
          "to" => "{{ form.value.email }}"
          "subject" => "TA-PE-TY Děkují!"
          "body" => "{% include 'forms/email-reply.html.twig' %}"
        ]
      ]
      2 => array:1 [
        "save" => array:4 [
          "fileprefix" => "{{ form.value.my-file|e }}"
          "dateformat" => "Ymd-His-u"
          "extension" => "txt"
          "body" => "{% include 'forms/dada.txt.twig' %}"
        ]
      ]
      3 => array:1 [
        "display" => "/dekujeme"
      ]
    ]
    
  2. array:2 [
      0 => "form"
      1 => "process"
    ]
    
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
vendor
/
rockettheme
/
toolbox
/
Blueprints
/
src
/
BlueprintForm.php
                            return null;
                        }
                        break;
                    case 'import':
                        $this->doImport($item, $path);
                        unset($items[$key]);
                        break;
                    case 'ordering':
                        $ordering = $item;
                        unset($items[$key]);
                        break;
                    default:
                        $this->dynamic[implode('/', $path)][$property] = ['action' => $action, 'params' => $item];
                }
 
            } elseif (is_array($item)) {
                // Recursively initialize form.
                $newPath = array_merge($path, [$key]);
 
                $location = $this->deepInit($item, $newPath);
                if ($location) {
                    $order[$key] = $location;
                } elseif ($location === null) {
                    unset($items[$key]);
                }
            }
        }
 
        if ($order) {
            // Reorder fields if needed.
            $items = $this->doReorder($items, $order);
        }
 
        return $ordering;
    }
 
    /**
     * @param array|string $value
     * @param array $path
     */
Arguments
  1. array:5 [
      "name" => "contact"
      "id" => "form"
      "fields" => array:9 [
        "name" => array:8 [
          "name" => "name"
          "label" => "Jméno"
          "placeholder" => "Vložte své jméno"
          "classes" => " "
          "autofocus" => "on"
          "autocomplete" => "on"
          "type" => "text"
          "validate" => array:1 [
            "required" => true
          ]
        ]
        "surname" => array:8 [
          "name" => "surname"
          "label" => "Příjmení"
          "placeholder" => "Vložte své příjmení"
          "classes" => " "
          "autofocus" => "on"
          "autocomplete" => "on"
          "type" => "text"
          "validate" => array:1 [
            "required" => true
          ]
        ]
        "email" => array:7 [
          "name" => "email"
          "label" => "E-mail"
          "outerclasses" => "margin"
          "classes" => " "
          "placeholder" => "Vložte svůj e-mail"
          "type" => "email"
          "validate" => array:1 [
            "required" => true
          ]
        ]
        "phonenum" => array:7 [
          "name" => "phonenum"
          "label" => "Telefoní číslo"
          "placeholder" => "Vložte svoje telefoní číslo"
          "autofocus" => "on"
          "autocomplete" => "on"
          "type" => "number"
          "validate" => array:1 [
            "required" => false
          ]
        ]
        "patternname" => array:7 [
          "name" => "patternname"
          "label" => "Název tapety"
          "placeholder" => "Vložte název vašeho návrhu"
          "autofocus" => "on"
          "autocomplete" => "on"
          "type" => "text"
          "validate" => array:1 [
            "required" => true
          ]
        ]
        "category" => array:8 [
          "name" => "category"
          "label" => "Kategorie"
          "placeholder" => "Vyberte kategorii"
          "autofocus" => "on"
          "autocomplete" => "on"
          "type" => "select"
          "options" => array:3 [
            "klasik" => "KLASIK"
            "koncept" => "KONCEPT"
            "kids" => "KIDS"
          ]
          "validate" => array:1 [
            "required" => true
          ]
        ]
        "description" => array:7 [
          "name" => "description"
          "label" => "Popis (max. 500 znaků)"
          "placeholder" => "Popište vaší tapetu."
          "autofocus" => "on"
          "autocomplete" => "on"
          "type" => "textarea"
          "validate" => array:3 [
            "type" => "textarea"
            "max" => 500
            "required" => true
          ]
        ]
        "my-file" => array:8 [
          "name" => "my-file"
          "label" => "Soutěžní návrh (náhled v PDF)"
          "placeholder" => "Nahrajte návrh"
          "outerclasses" => "margin"
          "type" => "file"
          "multiple" => true
          "avoid_overwriting" => true
          "array" => true
        ]
        "agree_to_terms" => array:5 [
          "name" => "agree_to_terms"
          "type" => "checkbox"
          "label" => "Souhlasím s podmínkami soutěže."
          "id" => "agree"
          "validate" => array:1 [
            "required" => true
          ]
        ]
      ]
      "buttons" => array:1 [
        0 => array:2 [
          "type" => "submit"
          "value" => "Přihlásit"
        ]
      ]
      "process" => & array:4 [
        0 => array:1 [
          "email" => array:5 [
            "from" => "info@ta-pe-ty.cz"
            "to" => "tapetyopencall@gmail.com"
            "subject" => "{{ form.value.name|e }} {{ form.value.surname|e }}"
            "body" => "{% include 'forms/data.html.twig' %}"
            "attachments" => array:1 [
              0 => "my-file"
            ]
          ]
        ]
        1 => & array:1 [
          "email" => array:4 [
            "from" => "info@ta-pe-ty.cz"
            "to" => "{{ form.value.email }}"
            "subject" => "TA-PE-TY Děkují!"
            "body" => "{% include 'forms/email-reply.html.twig' %}"
          ]
        ]
        2 => array:1 [
          "save" => array:4 [
            "fileprefix" => "{{ form.value.my-file|e }}"
            "dateformat" => "Ymd-His-u"
            "extension" => "txt"
            "body" => "{% include 'forms/dada.txt.twig' %}"
          ]
        ]
        3 => array:1 [
          "display" => "/dekujeme"
        ]
      ]
    ]
    
  2. array:1 [
      0 => "form"
    ]
    
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
vendor
/
rockettheme
/
toolbox
/
Blueprints
/
src
/
BlueprintForm.php
     */
    public function load()
    {
        // Only load and extend blueprint if it has not yet been loaded.
        if (empty($this->items) && $this->filename) {
            // Get list of files.
            $files = $this->getFiles($this->filename);
 
            // Load and extend blueprints.
            $data = $this->doLoad($files);
 
            $this->items = (array) array_shift($data);
 
            foreach ($data as $content) {
                $this->extend($content, true);
            }
        }
 
        // Import blueprints.
        $this->deepInit($this->items);
 
        return $this;
    }
 
    /**
     * Initialize blueprints with its dynamic fields.
     *
     * @return $this
     */
    public function init()
    {
        foreach ($this->dynamic as $key => $data) {
            // Locate field.
            $path = explode('/', $key);
            $current = &$this->items;
            foreach ($path as $field) {
                if (is_object($current)) {
                    // Handle objects.
                    if (!isset($current->{$field})) {
                        $current->{$field} = array();
Arguments
  1. array:2 [
      "form" => & array:5 [
        "name" => "contact"
        "id" => "form"
        "fields" => array:9 [
          "name" => array:8 [
            "name" => "name"
            "label" => "Jméno"
            "placeholder" => "Vložte své jméno"
            "classes" => " "
            "autofocus" => "on"
            "autocomplete" => "on"
            "type" => "text"
            "validate" => array:1 [
              "required" => true
            ]
          ]
          "surname" => array:8 [
            "name" => "surname"
            "label" => "Příjmení"
            "placeholder" => "Vložte své příjmení"
            "classes" => " "
            "autofocus" => "on"
            "autocomplete" => "on"
            "type" => "text"
            "validate" => array:1 [
              "required" => true
            ]
          ]
          "email" => array:7 [
            "name" => "email"
            "label" => "E-mail"
            "outerclasses" => "margin"
            "classes" => " "
            "placeholder" => "Vložte svůj e-mail"
            "type" => "email"
            "validate" => array:1 [
              "required" => true
            ]
          ]
          "phonenum" => array:7 [
            "name" => "phonenum"
            "label" => "Telefoní číslo"
            "placeholder" => "Vložte svoje telefoní číslo"
            "autofocus" => "on"
            "autocomplete" => "on"
            "type" => "number"
            "validate" => array:1 [
              "required" => false
            ]
          ]
          "patternname" => array:7 [
            "name" => "patternname"
            "label" => "Název tapety"
            "placeholder" => "Vložte název vašeho návrhu"
            "autofocus" => "on"
            "autocomplete" => "on"
            "type" => "text"
            "validate" => array:1 [
              "required" => true
            ]
          ]
          "category" => array:8 [
            "name" => "category"
            "label" => "Kategorie"
            "placeholder" => "Vyberte kategorii"
            "autofocus" => "on"
            "autocomplete" => "on"
            "type" => "select"
            "options" => array:3 [
              "klasik" => "KLASIK"
              "koncept" => "KONCEPT"
              "kids" => "KIDS"
            ]
            "validate" => array:1 [
              "required" => true
            ]
          ]
          "description" => array:7 [
            "name" => "description"
            "label" => "Popis (max. 500 znaků)"
            "placeholder" => "Popište vaší tapetu."
            "autofocus" => "on"
            "autocomplete" => "on"
            "type" => "textarea"
            "validate" => array:3 [
              "type" => "textarea"
              "max" => 500
              "required" => true
            ]
          ]
          "my-file" => array:8 [
            "name" => "my-file"
            "label" => "Soutěžní návrh (náhled v PDF)"
            "placeholder" => "Nahrajte návrh"
            "outerclasses" => "margin"
            "type" => "file"
            "multiple" => true
            "avoid_overwriting" => true
            "array" => true
          ]
          "agree_to_terms" => array:5 [
            "name" => "agree_to_terms"
            "type" => "checkbox"
            "label" => "Souhlasím s podmínkami soutěže."
            "id" => "agree"
            "validate" => array:1 [
              "required" => true
            ]
          ]
        ]
        "buttons" => array:1 [
          0 => array:2 [
            "type" => "submit"
            "value" => "Přihlásit"
          ]
        ]
        "process" => & array:4 [
          0 => array:1 [
            "email" => array:5 [
              "from" => "info@ta-pe-ty.cz"
              "to" => "tapetyopencall@gmail.com"
              "subject" => "{{ form.value.name|e }} {{ form.value.surname|e }}"
              "body" => "{% include 'forms/data.html.twig' %}"
              "attachments" => array:1 [
                0 => "my-file"
              ]
            ]
          ]
          1 => & array:1 [
            "email" => array:4 [
              "from" => "info@ta-pe-ty.cz"
              "to" => "{{ form.value.email }}"
              "subject" => "TA-PE-TY Děkují!"
              "body" => "{% include 'forms/email-reply.html.twig' %}"
            ]
          ]
          2 => array:1 [
            "save" => array:4 [
              "fileprefix" => "{{ form.value.my-file|e }}"
              "dateformat" => "Ymd-His-u"
              "extension" => "txt"
              "body" => "{% include 'forms/dada.txt.twig' %}"
            ]
          ]
          3 => array:1 [
            "display" => "/dekujeme"
          ]
        ]
      ]
      "rules" => []
    ]
    
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
user
/
plugins
/
form
/
classes
/
form.php
 
    /**
     * Reset data.
     */
    public function reset()
    {
        $name = $this->items['name'];
        $grav = Grav::instance();
 
        // Fix naming for fields (supports nested fields now!)
        if (isset($this->items['fields'])) {
            $this->items['fields'] = $this->processFields($this->items['fields']);
        }
 
        $items = $this->items;
        $rules = $this->rules;
 
        $blueprint  = function() use ($name, $items, $rules) {
            $blueprint = new Blueprint($name, ['form' => $items, 'rules' => $rules]);
            return $blueprint->load()->init();
        };
 
        $this->data   = new Data($this->header_data, $blueprint);
        $this->values = new Data();
        $this->fields = null;
        $this->fields = $this->fields();
 
        // Fire event
        $grav->fireEvent('onFormInitialized', new Event(['form' => $this]));
 
    }
 
    protected function processFields($fields)
    {
        $types = Grav::instance()['plugins']->formFieldTypes;
 
        $return = array();
        foreach ($fields as $key => $value) {
 
            // default to text if not set
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
system
/
src
/
Grav
/
Common
/
Data
/
Data.php
     * @return array
     */
    public function extra()
    {
        return $this->blueprints()->extra($this->items);
    }
 
    /**
     * Return blueprints.
     *
     * @return Blueprint
     */
    public function blueprints()
    {
        if (!$this->blueprints){
            $this->blueprints = new Blueprint;
        } elseif (is_callable($this->blueprints)) {
            // Lazy load blueprints.
            $blueprints = $this->blueprints;
            $this->blueprints = $blueprints();
        }
        return $this->blueprints;
    }
 
    /**
     * Save data if storage has been defined.
     */
    public function save()
    {
        $file = $this->file();
        if ($file) {
            $file->save($this->items);
        }
    }
 
    /**
     * Returns whether the data already exists in the storage.
     *
     * NOTE: This method does not check if the data is current.
     *
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
user
/
plugins
/
form
/
classes
/
form.php
            if ($types !== null && key_exists($value['type'], $types)) {
                $value += $types[$value['type']];
            }
 
            // Fix numeric indexes
            if (is_numeric($key) && isset($value['name'])) {
                $key = $value['name'];
            }
            if (isset($value['fields']) && is_array($value['fields'])) {
                $value['fields'] = $this->processFields($value['fields']);
            }
            $return[$key] = $value;
        }
        return $return;
    }
 
    public function fields() {
 
        if (is_null($this->fields)) {
            $blueprint = $this->data->blueprints();
 
            if (method_exists($blueprint, 'load')) {
                // init the form to process directives
                $blueprint->load()->init();
 
                // fields set to processed blueprint fields
                $this->fields = $blueprint->fields();
            }
        }
 
        return $this->fields;
    }
 
    /**
     * Return page object for the form.
     *
     * @return Page
     */
    public function page()
    {
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
user
/
plugins
/
form
/
classes
/
form.php
        $name = $this->items['name'];
        $grav = Grav::instance();
 
        // Fix naming for fields (supports nested fields now!)
        if (isset($this->items['fields'])) {
            $this->items['fields'] = $this->processFields($this->items['fields']);
        }
 
        $items = $this->items;
        $rules = $this->rules;
 
        $blueprint  = function() use ($name, $items, $rules) {
            $blueprint = new Blueprint($name, ['form' => $items, 'rules' => $rules]);
            return $blueprint->load()->init();
        };
 
        $this->data   = new Data($this->header_data, $blueprint);
        $this->values = new Data();
        $this->fields = null;
        $this->fields = $this->fields();
 
        // Fire event
        $grav->fireEvent('onFormInitialized', new Event(['form' => $this]));
 
    }
 
    protected function processFields($fields)
    {
        $types = Grav::instance()['plugins']->formFieldTypes;
 
        $return = array();
        foreach ($fields as $key => $value) {
 
            // default to text if not set
            if (!isset($value['type'])) {
                $value['type'] = 'text';
            }
 
            // manually merging the field types
            if ($types !== null && key_exists($value['type'], $types)) {
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
user
/
plugins
/
form
/
classes
/
form.php
        // Add form specific rules.
        if (!empty($this->items['rules']) && is_array($this->items['rules'])) {
            $this->rules += $this->items['rules'];
        }
 
        // Set form name if not set.
        if ($name && !is_int($name)) {
            $this->items['name'] = $name;
        } elseif (empty($this->items['name'])) {
            $this->items['name'] = $page->slug();
        }
 
        // Set form id if not set.
        if (empty($this->items['id'])) {
            $inflector = new Inflector();
            $this->items['id'] = $inflector->hyphenize($this->items['name']);
        }
 
        // Reset and initialize the form
        $this->reset();
    }
 
    /**
     * Custom serializer for this complex object
     *
     * @return string
     */
    public function serialize()
    {
        $data = [
            'items' => $this->items,
            'message' => $this->message,
            'message_color' => $this->message_color,
            'status' => $this->status,
            'header_data' => $this->header_data,
            'rules' => $this->rules,
            'data' => $this->data->toArray(),
            'values' => $this->values->toArray(),
            'page' => $this->page
        ];
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
user
/
plugins
/
form
/
form.php
        if ((isset($header->forms) && is_array($header->forms)) ||
            (isset($header->form) && is_array($header->form))) {
 
            $page_forms = [];
 
            // Force never_cache_twig if modular form
            if ($page->modular()) {
                $header->never_cache_twig = true;
            }
 
            // Get the forms from the page headers
            if (isset($header->forms)) {
                $page_forms = $header->forms;
            } elseif (isset($header->form)) {
                $page_forms[] = $header->form;
            }
 
            // Store the page forms in the forms instance
            foreach ($page_forms as $name => $page_form) {
                $form = new Form($page, $name, $page_form);
                $form_array = [$form['name'] => $form];
                if (array_key_exists($page_route, $this->forms)) {
                    $this->forms[$page_route] = array_merge($this->forms[$page_route], $form_array);
                } else {
                    $this->forms[$page_route] = $form_array;
                }
 
            }
 
            $this->recache_forms = true;
        }
    }
 
    /**
     * Initialize form if the page has one. Also catches form processing if user posts the form.
     */
    public function onPagesInitialized()
    {
        $submitted = false;
        $this->json_response = [];
Arguments
  1. Page {}
    
  2. 0
    
  3. array:5 [
      "name" => "contact"
      "id" => "form"
      "fields" => array:9 [
        0 => array:8 [
          "name" => "name"
          "label" => "Jméno"
          "placeholder" => "Vložte své jméno"
          "classes" => " "
          "autofocus" => "on"
          "autocomplete" => "on"
          "type" => "text"
          "validate" => array:1 [
            "required" => true
          ]
        ]
        1 => array:8 [
          "name" => "surname"
          "label" => "Příjmení"
          "placeholder" => "Vložte své příjmení"
          "classes" => " "
          "autofocus" => "on"
          "autocomplete" => "on"
          "type" => "text"
          "validate" => array:1 [
            "required" => true
          ]
        ]
        2 => array:7 [
          "name" => "email"
          "label" => "E-mail"
          "outerclasses" => "margin"
          "classes" => " "
          "placeholder" => "Vložte svůj e-mail"
          "type" => "email"
          "validate" => array:1 [
            "required" => true
          ]
        ]
        3 => array:7 [
          "name" => "phonenum"
          "label" => "Telefoní číslo"
          "placeholder" => "Vložte svoje telefoní číslo"
          "autofocus" => "on"
          "autocomplete" => "on"
          "type" => "number"
          "validate" => array:1 [
            "required" => false
          ]
        ]
        4 => array:7 [
          "name" => "patternname"
          "label" => "Název tapety"
          "placeholder" => "Vložte název vašeho návrhu"
          "autofocus" => "on"
          "autocomplete" => "on"
          "type" => "text"
          "validate" => array:1 [
            "required" => true
          ]
        ]
        5 => array:8 [
          "name" => "category"
          "label" => "Kategorie"
          "placeholder" => "Vyberte kategorii"
          "autofocus" => "on"
          "autocomplete" => "on"
          "type" => "select"
          "options" => array:3 [
            "klasik" => "KLASIK"
            "koncept" => "KONCEPT"
            "kids" => "KIDS"
          ]
          "validate" => array:1 [
            "required" => true
          ]
        ]
        6 => array:7 [
          "name" => "description"
          "label" => "Popis (max. 500 znaků)"
          "placeholder" => "Popište vaší tapetu."
          "autofocus" => "on"
          "autocomplete" => "on"
          "type" => "textarea"
          "validate" => array:3 [
            "type" => "textarea"
            "max" => 500
            "required" => true
          ]
        ]
        7 => array:7 [
          "name" => "my-file"
          "label" => "Soutěžní návrh (náhled v PDF)"
          "placeholder" => "Nahrajte návrh"
          "outerclasses" => "margin"
          "type" => "file"
          "multiple" => true
          "avoid_overwriting" => true
        ]
        8 => array:5 [
          "name" => "agree_to_terms"
          "type" => "checkbox"
          "label" => "Souhlasím s podmínkami soutěže."
          "id" => "agree"
          "validate" => array:1 [
            "required" => true
          ]
        ]
      ]
      "buttons" => array:1 [
        0 => array:2 [
          "type" => "submit"
          "value" => "Přihlásit"
        ]
      ]
      "process" => array:4 [
        0 => array:1 [
          "email" => array:5 [
            "from" => "info@ta-pe-ty.cz"
            "to" => "tapetyopencall@gmail.com"
            "subject" => "{{ form.value.name|e }} {{ form.value.surname|e }}"
            "body" => "{% include 'forms/data.html.twig' %}"
            "attachments" => array:1 [
              0 => "my-file"
            ]
          ]
        ]
        1 => array:1 [
          "email" => array:4 [
            "from" => "info@ta-pe-ty.cz"
            "to" => "{{ form.value.email }}"
            "subject" => "TA-PE-TY Děkují!"
            "body" => "{% include 'forms/email-reply.html.twig' %}"
          ]
        ]
        2 => array:1 [
          "save" => array:4 [
            "fileprefix" => "{{ form.value.my-file|e }}"
            "dateformat" => "Ymd-His-u"
            "extension" => "txt"
            "body" => "{% include 'forms/dada.txt.twig' %}"
          ]
        ]
        3 => array:1 [
          "display" => "/dekujeme"
        ]
      ]
    ]
    
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
vendor
/
symfony
/
event-dispatcher
/
EventDispatcher.php
        }
    }
 
    /**
     * Triggers the listeners of an event.
     *
     * This method can be overridden to add functionality that is executed
     * for each listener.
     *
     * @param callable[] $listeners The event listeners
     * @param string     $eventName The name of the event to dispatch
     * @param Event      $event     The event object to pass to the event handlers/listeners
     */
    protected function doDispatch($listeners, $eventName, Event $event)
    {
        foreach ($listeners as $listener) {
            if ($event->isPropagationStopped()) {
                break;
            }
            call_user_func($listener, $event, $eventName, $this);
        }
    }
 
    /**
     * Sorts the internal list of listeners for the given event by priority.
     *
     * @param string $eventName The name of the event
     */
    private function sortListeners($eventName)
    {
        krsort($this->listeners[$eventName]);
        $this->sorted[$eventName] = call_user_func_array('array_merge', $this->listeners[$eventName]);
    }
}
 
Arguments
  1. Event {}
    
  2. "onPageProcessed"
    
  3. EventDispatcher {}
    
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
vendor
/
symfony
/
event-dispatcher
/
EventDispatcher.php
        }
    }
 
    /**
     * Triggers the listeners of an event.
     *
     * This method can be overridden to add functionality that is executed
     * for each listener.
     *
     * @param callable[] $listeners The event listeners
     * @param string     $eventName The name of the event to dispatch
     * @param Event      $event     The event object to pass to the event handlers/listeners
     */
    protected function doDispatch($listeners, $eventName, Event $event)
    {
        foreach ($listeners as $listener) {
            if ($event->isPropagationStopped()) {
                break;
            }
            call_user_func($listener, $event, $eventName, $this);
        }
    }
 
    /**
     * Sorts the internal list of listeners for the given event by priority.
     *
     * @param string $eventName The name of the event
     */
    private function sortListeners($eventName)
    {
        krsort($this->listeners[$eventName]);
        $this->sorted[$eventName] = call_user_func_array('array_merge', $this->listeners[$eventName]);
    }
}
 
Arguments
  1. array:2 [
      0 => FormPlugin {}
      1 => "onPageProcessed"
    ]
    
  2. Event {}
    
  3. "onPageProcessed"
    
  4. EventDispatcher {}
    
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
vendor
/
symfony
/
event-dispatcher
/
EventDispatcher.php
 */
class EventDispatcher implements EventDispatcherInterface
{
    private $listeners = array();
    private $sorted = array();
 
    /**
     * {@inheritdoc}
     */
    public function dispatch($eventName, Event $event = null)
    {
        if (null === $event) {
            $event = new Event();
        }
 
        $event->setDispatcher($this);
        $event->setName($eventName);
 
        if ($listeners = $this->getListeners($eventName)) {
            $this->doDispatch($listeners, $eventName, $event);
        }
 
        return $event;
    }
 
    /**
     * {@inheritdoc}
     */
    public function getListeners($eventName = null)
    {
        if (null !== $eventName) {
            if (!isset($this->listeners[$eventName])) {
                return array();
            }
 
            if (!isset($this->sorted[$eventName])) {
                $this->sortListeners($eventName);
            }
 
            return $this->sorted[$eventName];
Arguments
  1. array:1 [
      0 => array:2 [
        0 => FormPlugin {}
        1 => "onPageProcessed"
      ]
    ]
    
  2. "onPageProcessed"
    
  3. Event {}
    
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
vendor
/
rockettheme
/
toolbox
/
Event
/
src
/
EventDispatcher.php
use Symfony\Component\EventDispatcher\Event as BaseEvent;
use Symfony\Component\EventDispatcher\EventDispatcher as BaseEventDispatcher;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
 
/**
 * Implements Symfony EventDispatcher interface.
 *
 * @package RocketTheme\Toolbox\Event
 * @author RocketTheme
 * @license MIT
 */
class EventDispatcher extends BaseEventDispatcher implements EventDispatcherInterface
{
    public function dispatch($eventName, BaseEvent $event = null)
    {
        if (null === $event) {
            $event = new Event();
        }
 
        return parent::dispatch($eventName, $event);
    }
}
 
Arguments
  1. "onPageProcessed"
    
  2. Event {}
    
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
system
/
src
/
Grav
/
Common
/
Grav.php
        // Vary: Accept-Encoding
        if ($this['config']->get('system.pages.vary_accept_encoding', false)) {
            header('Vary: Accept-Encoding');
        }
    }
 
    /**
     * Fires an event with optional parameters.
     *
     * @param  string $eventName
     * @param  Event  $event
     *
     * @return Event
     */
    public function fireEvent($eventName, Event $event = null)
    {
        /** @var EventDispatcher $events */
        $events = $this['events'];
 
        return $events->dispatch($eventName, $event);
    }
 
    /**
     * Set the final content length for the page and flush the buffer
     *
     */
    public function shutdown()
    {
        // Prevent user abort allowing onShutdown event to run without interruptions.
        if (function_exists('ignore_user_abort')) {
            @ignore_user_abort(true);
        }
 
        // Close the session allowing new requests to be handled.
        if (isset($this['session'])) {
            $this['session']->close();
        }
 
        if ($this['config']->get('system.debugger.shutdown.close_connection', true)) {
            // Flush the response and close the connection to allow time consuming tasks to be performed without leaving
Arguments
  1. "onPageProcessed"
    
  2. Event {}
    
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
                    if ($found->isDir()) {
                        continue;
                    }
                    $regex = '/^[^\.]*' . preg_quote($extension) . '$/';
                    if (preg_match($regex, $found->getFilename())) {
                        $page_found = $found;
                        $page_extension = $extension;
                        break 2;
                    }
                }
            }
        }
 
        if ($parent && !empty($page_found)) {
            $page->init($page_found, $page_extension);
 
            $content_exists = true;
 
            if ($config->get('system.pages.events.page')) {
                $this->grav->fireEvent('onPageProcessed', new Event(['page' => $page]));
            }
        }
 
        // set current modified of page
        $last_modified = $page->modified();
 
        $iterator = new \FilesystemIterator($directory);
 
        /** @var \DirectoryIterator $file */
        foreach ($iterator as $file) {
            $name = $file->getFilename();
 
            // Ignore all hidden files if set.
            if ($this->ignore_hidden) {
                if ($name && $name[0] == '.') {
                    continue;
                }
            }
 
            if ($file->isFile()) {
Arguments
  1. "onPageProcessed"
    
  2. Event {}
    
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
            }
 
            if ($file->isFile()) {
                // Update the last modified if it's newer than already found
                if (!in_array($file->getBasename(), $this->ignore_files) && ($modified = $file->getMTime()) > $last_modified) {
                    $last_modified = $modified;
                }
            } elseif ($file->isDir() && !in_array($file->getFilename(), $this->ignore_folders)) {
 
                // if folder contains separator, continue
                if (Utils::contains($file->getFilename(), $config->get('system.param_sep', ':'))) {
                    continue;
                }
 
                if (!$page->path()) {
                    $page->path($file->getPath());
                }
 
                $path = $directory . DS . $name;
                $child = $this->recurse($path, $page);
 
                if (Utils::startsWith($name, '_')) {
                    $child->routable(false);
                }
 
                $this->children[$page->path()][$child->path()] = ['slug' => $child->slug()];
 
                if ($config->get('system.pages.events.page')) {
                    $this->grav->fireEvent('onFolderProcessed', new Event(['page' => $page]));
                }
            }
        }
 
        // Set routability to false if no page found
        if (!$content_exists) {
            $page->routable(false);
        }
 
        // Override the modified time if modular
        if ($page->template() == 'modular') {
Arguments
  1. "/var/www/vhosts/soutez.ta-pe-ty.cz/user/pages/02.prihlas-se"
    
  2. Page {}
    
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
                default:
                    $hash = Folder::lastModifiedFile($pages_dir);
            }
 
            $this->pages_cache_id = md5($pages_dir . $hash . $language->getActive() . $config->checksum());
 
            list($this->instances, $this->routes, $this->children, $taxonomy_map, $this->sort) = $cache->fetch($this->pages_cache_id);
            if (!$this->instances) {
                $this->grav['debugger']->addMessage('Page cache missed, rebuilding pages..');
 
                // recurse pages and cache result
                $this->resetPages($pages_dir, $this->pages_cache_id);
 
            } else {
                // If pages was found in cache, set the taxonomy
                $this->grav['debugger']->addMessage('Page cache hit.');
                $taxonomy->taxonomy($taxonomy_map);
            }
        } else {
            $this->recurse($pages_dir);
            $this->buildRoutes();
        }
    }
 
    /**
     * Accessible method to manually reset the pages cache
     *
     * @param $pages_dir
     */
    public function resetPages($pages_dir)
    {
        $this->recurse($pages_dir);
        $this->buildRoutes();
 
        // cache if needed
        if ($this->grav['config']->get('system.cache.enabled')) {
            /** @var Cache $cache */
            $cache = $this->grav['cache'];
            /** @var Taxonomy $taxonomy */
            $taxonomy = $this->grav['taxonomy'];
Arguments
  1. "/var/www/vhosts/soutez.ta-pe-ty.cz/user/pages"
    
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
system
/
src
/
Grav
/
Common
/
Page
/
Pages.php
        }
 
        return $this->baseUrl($lang, $absolute) . $route;
    }
 
    /**
     * Class initialization. Must be called before using this class.
     */
    public function init()
    {
        $config = $this->grav['config'];
        $this->ignore_files = $config->get('system.pages.ignore_files');
        $this->ignore_folders = $config->get('system.pages.ignore_folders');
        $this->ignore_hidden = $config->get('system.pages.ignore_hidden');
 
        $this->instances = [];
        $this->children = [];
        $this->routes = [];
 
        $this->buildPages();
    }
 
    /**
     * Get or set last modification time.
     *
     * @param int $modified
     *
     * @return int|null
     */
    public function lastModified($modified = null)
    {
        if ($modified && $modified > $this->last_modified) {
            $this->last_modified = $modified;
        }
 
        return $this->last_modified;
    }
 
    /**
     * Returns a list of all pages.
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
system
/
src
/
Grav
/
Common
/
Processors
/
PagesProcessor.php
 *
 * @copyright  Copyright (C) 2014 - 2017 RocketTheme, LLC. All rights reserved.
 * @license    MIT License; see LICENSE file for details.
 */
 
namespace Grav\Common\Processors;
 
use Grav\Common\Page\Page;
 
class PagesProcessor extends ProcessorBase implements ProcessorInterface
{
    public $id = 'pages';
    public $title = 'Pages';
 
    public function process()
    {
        // Dump Cache state
        $this->container['debugger']->addMessage($this->container['cache']->getCacheStatus());
 
        $this->container['pages']->init();
        $this->container->fireEvent('onPagesInitialized');
        $this->container->fireEvent('onPageInitialized');
 
        /** @var Page $page */
        $page = $this->container['page'];
 
        if (!$page->routable()) {
            // If no page found, fire event
            $event = $this->container->fireEvent('onPageNotFound');
 
            if (isset($event->page)) {
                unset ($this->container['page']);
                $this->container['page'] = $event->page;
            } else {
                throw new \RuntimeException('Page Not Found', 404);
            }
        }
 
    }
}
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
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')) {
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
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()
    {
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
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. "pages"
    
  2. "Pages"
    
  3. Closure {
      class: "Grav\Common\Grav"
      this: Grav { …}
      use: {
        $processor: PagesProcessor {}
      }
      file: "/var/www/vhosts/soutez.ta-pe-ty.cz/system/src/Grav/Common/Grav.php"
      line: "131 to 133"
    }
    
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
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: "/var/www/vhosts/soutez.ta-pe-ty.cz/system/src/Grav/Common/Grav.php"
      line: "377 to 381"
    }
    
  2. array:3 [
      0 => "pages"
      1 => "Pages"
      2 => Closure {
        class: "Grav\Common\Grav"
        this: Grav { …}
        use: {
          $processor: PagesProcessor {}
        }
        file: "/var/www/vhosts/soutez.ta-pe-ty.cz/system/src/Grav/Common/Grav.php"
        line: "131 to 133"
      }
    ]
    
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
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
  1. "measureTime"
    
  2. array:3 [
      0 => "pages"
      1 => "Pages"
      2 => Closure {
        class: "Grav\Common\Grav"
        this: Grav { …}
        use: {
          $processor: PagesProcessor {}
        }
        file: "/var/www/vhosts/soutez.ta-pe-ty.cz/system/src/Grav/Common/Grav.php"
        line: "131 to 133"
      }
    ]
    
/
var
/
www
/
vhosts
/
soutez.ta-pe-ty.cz
/
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
HTTP_ACCEPT
"*/*"
HTTP_USER_AGENT
"claudebot"
HTTP_REFERER
"http://soutez.ta-pe-ty.cz/"
HTTP_HOST
"soutez.ta-pe-ty.cz"
HTTP_X_FORWARDED_PORT
"443"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_X_FORWARDED_FOR
"127.0.0.1"
HTTP_CONNECTION
"close"
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
SERVER_SIGNATURE
"<address>Apache Server at soutez.ta-pe-ty.cz Port 80</address>\n"
SERVER_SOFTWARE
"Apache"
SERVER_NAME
"soutez.ta-pe-ty.cz"
SERVER_ADDR
"240.11.0.74"
SERVER_PORT
"80"
REMOTE_ADDR
"240.11.0.39"
DOCUMENT_ROOT
"/var/www/vhosts/soutez.ta-pe-ty.cz"
REQUEST_SCHEME
"http"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"/var/www/vhosts/soutez.ta-pe-ty.cz"
SERVER_ADMIN
"[no address given]"
SCRIPT_FILENAME
"/var/www/vhosts/soutez.ta-pe-ty.cz/index.php"
REMOTE_PORT
"36678"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.1"
REQUEST_METHOD
"GET"
QUERY_STRING
""
REQUEST_URI
"/"
SCRIPT_NAME
"/index.php"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1711662670.1621
REQUEST_TIME
1711662670
empty
0. Whoops\Handler\PrettyPageHandler
1. Whoops\Handler\CallbackHandler