commit ce48ca4a21330576a76ca6614a5b56d5a48492f3 Author: BarboraFleg Date: Thu Apr 4 18:34:40 2019 +0200 no message diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..47cd1d9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +app/config/local.neon diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..6fbe30a --- /dev/null +++ b/.htaccess @@ -0,0 +1,9 @@ + + RewriteEngine On + RewriteRule ^$ www/ [L] + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_URI} !^www/ + RewriteRule ^(.*)$ www/$1 + + diff --git a/app/bootstrap.php b/app/bootstrap.php new file mode 100644 index 0000000..c18bde8 --- /dev/null +++ b/app/bootstrap.php @@ -0,0 +1,22 @@ +setDebugMode('23.75.345.200'); // enable for your remote IP +$configurator->enableTracy(__DIR__ . '/../log'); + +$configurator->setTimeZone('Europe/Prague'); +$configurator->setTempDirectory(__DIR__ . '/../temp'); + +$configurator->createRobotLoader() + ->addDirectory(__DIR__) + ->register(); + +$configurator->addConfig(__DIR__ . '/config/config.neon'); +$configurator->addConfig(__DIR__ . '/config/config.local.neon'); + +$container = $configurator->createContainer(); + +return $container; diff --git a/app/config/config.local.neon b/app/config/config.local.neon new file mode 100644 index 0000000..44393b4 --- /dev/null +++ b/app/config/config.local.neon @@ -0,0 +1,7 @@ +parameters: + + +database: + dsn: 'mysql:host=127.0.0.1;dbname=test' + user: + password: diff --git a/app/config/config.neon b/app/config/config.neon new file mode 100644 index 0000000..979236e --- /dev/null +++ b/app/config/config.neon @@ -0,0 +1,16 @@ +parameters: + + +application: + errorPresenter: Error + mapping: + *: App\*Module\Presenters\*Presenter + + +session: + expiration: 14 days + + +services: + router: App\RouterFactory::createRouter + - App\Model\CalculatorManager diff --git a/app/model/CalculatorManager.php b/app/model/CalculatorManager.php new file mode 100644 index 0000000..4728f10 --- /dev/null +++ b/app/model/CalculatorManager.php @@ -0,0 +1,128 @@ + 'Sčítání', + self::SUBTRACT => 'Odčítání', + self::MULTIPLY => 'Násobení', + self::DIVIDE => 'Dělení' + ); + } + + /** + * Zavolá zadanou operaci a vrátí její výsledek. + * @param int $operation zadaná operace + * @param int $x první číslo pro operaci + * @param int $y druhé číslo pro operaci + * @return int|null výsledek operace nebo null, pokud zadaná operace neexistuje + */ + public function calculate($operation, $x, $y){ + switch ($operation) { + case self::ADD: + return $this->add($x, $y); + case self::SUBTRACT: + return $this->subtract($x, $y); + case self::MULTIPLY: + return $this->multiply($x, $y); + case self::DIVIDE: + return $this->divide($x, $y); + default: + return null; + } + } + + + /** + * Sečte daná čísla a vrátí výsledek. + * @param int $x první číslo + * @param int $y druhé číslo + * @return int výsledek po sčítání + */ + public function add($x, $y){ + return $x + $y; + } + + /** + * Odečte druhé číslo od prvního a vrátí výsledek. + * @param int $x první číslo + * @param int $y druhé číslo + * @return int výsledek po odčítání + */ + public function subtract($x, $y) + { + return $x - $y; + } + + /** + * Vynásobí daná čísla a vrátí výsledek. + * @param int $x první číslo + * @param int $y druhé číslo + * @return int výsledek po násobení + */ + public function multiply($x, $y) + { + return $x * $y; + } + + /** + * Vydělí první číslo druhým bezezbytku a vrátí výsledek. + * @param int $x první číslo + * @param int $y druhé číslo; nesmí být 0 + * @return int výsledek po dělení bezezbytku + */ + public function divide($x, $y) + { + return round($x / $y); + } +} \ No newline at end of file diff --git a/app/presenters/CalculatorPresenter.php b/app/presenters/CalculatorPresenter.php new file mode 100644 index 0000000..477e5b7 --- /dev/null +++ b/app/presenters/CalculatorPresenter.php @@ -0,0 +1,81 @@ +calculatorManager = $calculatorManager; + } + + /** Výchozí vykreslovací metoda tohoto presenteru. */ + public function renderDefault(){ + // Předání výsledku do šablony. + $this->template->result = $this->result; + } + + /** + * Vrátí formulář kalkulačky. + * @return Form formulář kalkulačky + */ + + protected function createComponentCalculatorForm(){ + + $form = new Form; + // Získáme existující operace kalkulačky a dáme je do výběru operací. + $form->addRadioList('operation', 'Operace:', $this->calculatorManager->getOperations()) + ->setDefaultValue(CalculatorManager::ADD) + ->setRequired(self::FORM_MSG_REQUIRED); + $form->addText('x', 'První číslo:') + ->setType('number') + ->setDefaultValue(0) + ->setRequired(self::FORM_MSG_REQUIRED) + ->addRule(Form::INTEGER, self::FORM_MSG_RULE); + $form->addText('y', 'Druhé číslo:') + ->setType('number') + ->setDefaultValue(0) + ->setRequired(self::FORM_MSG_REQUIRED) + ->addRule(Form::INTEGER, self::FORM_MSG_RULE) + // Ošetříme dělení nulou. + ->addConditionOn($form['operation'], Form::EQUAL, CalculatorManager::DIVIDE) + ->addRule(Form::PATTERN, 'Nelze dělit nulou.', '^[^0].*'); + $form->addSubmit('calculate', 'Spočítej výsledek'); + $form->onSuccess[] = [$this, 'calculatorFormSucceeded']; + return $form; + } + + /** + * Funkce se vykonaná při úspěšném odeslání formuláře kalkulačky a zpracuje odeslané hodnoty. + * @param Form $form formulář kalkulačky + * @param ArrayHash $values odeslané hodnoty formuláře + */ + public function calculatorFormSucceeded($form, $values) { + // Necháme si vypočítat výsledek podle zvolené operace a zadaných hodnot. + $this->result = $this->calculatorManager->calculate($values->operation, $values->x, $values->y); + } +} + + + diff --git a/app/presenters/Error4xxPresenter.php b/app/presenters/Error4xxPresenter.php new file mode 100644 index 0000000..ee2e1b3 --- /dev/null +++ b/app/presenters/Error4xxPresenter.php @@ -0,0 +1,27 @@ +getRequest()->isMethod(Nette\Application\Request::FORWARD)) { + $this->error(); + } + } + + + public function renderDefault(Nette\Application\BadRequestException $exception): void + { + // load template 403.latte or 404.latte or ... 4xx.latte + $file = __DIR__ . "/templates/Error/{$exception->getCode()}.latte"; + $this->template->setFile(is_file($file) ? $file : __DIR__ . '/templates/Error/4xx.latte'); + } +} diff --git a/app/presenters/ErrorPresenter.php b/app/presenters/ErrorPresenter.php new file mode 100644 index 0000000..32b766b --- /dev/null +++ b/app/presenters/ErrorPresenter.php @@ -0,0 +1,43 @@ +logger = $logger; + } + + + public function run(Nette\Application\Request $request): Nette\Application\IResponse + { + $exception = $request->getParameter('exception'); + + if ($exception instanceof Nette\Application\BadRequestException) { + [$module, , $sep] = Nette\Application\Helpers::splitName($request->getPresenterName()); + return new Responses\ForwardResponse($request->setPresenterName($module . $sep . 'Error4xx')); + } + + $this->logger->log($exception, ILogger::EXCEPTION); + return new Responses\CallbackResponse(function (Http\IRequest $httpRequest, Http\IResponse $httpResponse): void { + if (preg_match('#^text/html(?:;|$)#', (string) $httpResponse->getHeader('Content-Type'))) { + require __DIR__ . '/templates/Error/500.phtml'; + } + }); + } +} diff --git a/app/presenters/templates/@layout.latte b/app/presenters/templates/@layout.latte new file mode 100644 index 0000000..0ecbf5e --- /dev/null +++ b/app/presenters/templates/@layout.latte @@ -0,0 +1,19 @@ + + + + + + + {ifset title}{include title|stripHtml} | {/ifset}Nette Web + + + +
{$flash->message}
+ + {include content} + + {block scripts} + + {/block} + + diff --git a/app/presenters/templates/Calculator/default.latte b/app/presenters/templates/Calculator/default.latte new file mode 100644 index 0000000..c0aff8c --- /dev/null +++ b/app/presenters/templates/Calculator/default.latte @@ -0,0 +1,33 @@ + + +{block content} + + +
+

Result is: {$result}

+ {control calculatorForm} +
+ + +{/block} diff --git a/app/presenters/templates/Error/403.latte b/app/presenters/templates/Error/403.latte new file mode 100644 index 0000000..de00328 --- /dev/null +++ b/app/presenters/templates/Error/403.latte @@ -0,0 +1,7 @@ +{block content} +

Access Denied

+ +

You do not have permission to view this page. Please try contact the web +site administrator if you believe you should be able to view this page.

+ +

error 403

diff --git a/app/presenters/templates/Error/404.latte b/app/presenters/templates/Error/404.latte new file mode 100644 index 0000000..022001c --- /dev/null +++ b/app/presenters/templates/Error/404.latte @@ -0,0 +1,8 @@ +{block content} +

Page Not Found

+ +

The page you requested could not be found. It is possible that the address is +incorrect, or that the page no longer exists. Please use a search engine to find +what you are looking for.

+ +

error 404

diff --git a/app/presenters/templates/Error/405.latte b/app/presenters/templates/Error/405.latte new file mode 100644 index 0000000..d424892 --- /dev/null +++ b/app/presenters/templates/Error/405.latte @@ -0,0 +1,6 @@ +{block content} +

Method Not Allowed

+ +

The requested method is not allowed for the URL.

+ +

error 405

diff --git a/app/presenters/templates/Error/410.latte b/app/presenters/templates/Error/410.latte new file mode 100644 index 0000000..99bde92 --- /dev/null +++ b/app/presenters/templates/Error/410.latte @@ -0,0 +1,6 @@ +{block content} +

Page Not Found

+ +

The page you requested has been taken off the site. We apologize for the inconvenience.

+ +

error 410

diff --git a/app/presenters/templates/Error/4xx.latte b/app/presenters/templates/Error/4xx.latte new file mode 100644 index 0000000..d5ce82f --- /dev/null +++ b/app/presenters/templates/Error/4xx.latte @@ -0,0 +1,4 @@ +{block content} +

Oops...

+ +

Your browser sent a request that this server could not understand or process.

diff --git a/app/presenters/templates/Error/500.phtml b/app/presenters/templates/Error/500.phtml new file mode 100644 index 0000000..a2b900c --- /dev/null +++ b/app/presenters/templates/Error/500.phtml @@ -0,0 +1,27 @@ + + + +Server Error + + + +
+
+

Server Error

+ +

We're sorry! The server encountered an internal error and + was unable to complete your request. Please try again later.

+ +

error 500

+
+
+ + diff --git a/app/presenters/templates/Error/503.phtml b/app/presenters/templates/Error/503.phtml new file mode 100644 index 0000000..f123919 --- /dev/null +++ b/app/presenters/templates/Error/503.phtml @@ -0,0 +1,24 @@ + + + + + + + + +Site is temporarily down for maintenance + +

We're Sorry

+ +

The site is temporarily down for maintenance. Please try again in a few minutes.

diff --git a/app/router/RouterFactory.php b/app/router/RouterFactory.php new file mode 100644 index 0000000..68ce929 --- /dev/null +++ b/app/router/RouterFactory.php @@ -0,0 +1,25 @@ +/[/]', 'Calculator:default'); + return $router; + } +} diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..4ce1867 --- /dev/null +++ b/composer.json @@ -0,0 +1,36 @@ +{ + "name": "nette/web-project", + "description": "Nette: Standard Web Project", + "keywords": ["nette"], + "type": "project", + "license": ["MIT", "BSD-3-Clause", "GPL-2.0", "GPL-3.0"], + "require": { + "php": ">= 7.1", + "nette/application": "^3.0", + "nette/bootstrap": "^3.0", + "nette/caching": "^3.0", + "nette/database": "^3.0", + "nette/di": "^3.0", + "nette/finder": "^2.5", + "nette/forms": "^3.0", + "nette/http": "^3.0", + "nette/mail": "^3.0", + "nette/robot-loader": "^3.0", + "nette/security": "^3.0", + "nette/utils": "^3.0", + "latte/latte": "^2.5", + "tracy/tracy": "^2.6" + }, + "require-dev": { + "nette/tester": "^2.0" + }, + "autoload": { + "classmap": ["app/Booting.php"] + }, + "minimum-stability": "stable", + "config": { + "platform": { + "php": "7.1" + } + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..e5fbd65 --- /dev/null +++ b/composer.lock @@ -0,0 +1,1366 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "5e7cc66184e0bf1568dc4cc39fbf7a64", + "packages": [ + { + "name": "latte/latte", + "version": "v2.5.1", + "source": { + "type": "git", + "url": "https://github.com/nette/latte.git", + "reference": "cf714b94f0759198a3c71361d46d5166cabaaf52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/latte/zipball/cf714b94f0759198a3c71361d46d5166cabaaf52", + "reference": "cf714b94f0759198a3c71361d46d5166cabaaf52", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.1" + }, + "conflict": { + "nette/application": "<2.4.1" + }, + "require-dev": { + "nette/tester": "~2.0", + "tracy/tracy": "^2.3" + }, + "suggest": { + "ext-fileinfo": "to use filter |datastream", + "ext-mbstring": "to use filters like lower, upper, capitalize, ...", + "nette/utils": "to use filter |webalize" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "☕ Latte: the intuitive and fast template engine for those who want the most secure PHP sites. Introduces context-sensitive escaping.", + "homepage": "https://latte.nette.org", + "keywords": [ + "context-sensitive", + "engine", + "escaping", + "html", + "nette", + "security", + "template", + "twig" + ], + "time": "2019-02-20T10:51:49+00:00" + }, + { + "name": "nette/application", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/nette/application.git", + "reference": "4f3b250709226c70c8ca0a35f796877bcb72b10d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/application/zipball/4f3b250709226c70c8ca0a35f796877bcb72b10d", + "reference": "4f3b250709226c70c8ca0a35f796877bcb72b10d", + "shasum": "" + }, + "require": { + "nette/component-model": "^3.0", + "nette/http": "^3.0", + "nette/routing": "~3.0.0", + "nette/utils": "^3.0", + "php": ">=7.1" + }, + "conflict": { + "nette/di": "<3.0", + "nette/forms": "<3.0", + "nette/latte": "<3.0" + }, + "require-dev": { + "latte/latte": "^2.5.1", + "mockery/mockery": "^1.0", + "nette/di": "^v3.0", + "nette/forms": "^3.0", + "nette/robot-loader": "^3.2", + "nette/security": "^3.0", + "nette/tester": "^2.0.1", + "tracy/tracy": "^2.6" + }, + "suggest": { + "latte/latte": "Allows using Latte in templates", + "nette/forms": "Allows to use Nette\\Application\\UI\\Form" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ], + "files": [ + "src/compatibility.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🏆 Nette Application: a full-stack component-based MVC kernel for PHP that helps you write powerful and modern web applications. Write less, have cleaner code and your work will bring you joy.", + "homepage": "https://nette.org", + "keywords": [ + "Forms", + "component-based", + "control", + "framework", + "mvc", + "mvp", + "nette", + "presenter", + "routing", + "seo" + ], + "time": "2019-04-03T19:36:15+00:00" + }, + { + "name": "nette/bootstrap", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/nette/bootstrap.git", + "reference": "e1075af05c211915e03e0c86542f3ba5433df4a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/bootstrap/zipball/e1075af05c211915e03e0c86542f3ba5433df4a3", + "reference": "e1075af05c211915e03e0c86542f3ba5433df4a3", + "shasum": "" + }, + "require": { + "nette/di": "^3.0", + "nette/utils": "^3.0", + "php": ">=7.1" + }, + "require-dev": { + "latte/latte": "^2.2", + "nette/application": "^3.0", + "nette/caching": "^3.0", + "nette/database": "^3.0", + "nette/forms": "^3.0", + "nette/http": "^3.0", + "nette/mail": "^3.0", + "nette/robot-loader": "^3.0", + "nette/safe-stream": "^2.2", + "nette/security": "^3.0", + "nette/tester": "^2.0", + "tracy/tracy": "^2.6" + }, + "suggest": { + "nette/robot-loader": "to use Configurator::createRobotLoader()", + "tracy/tracy": "to use Configurator::enableTracy()" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🅱 Nette Bootstrap: the simple way to configure and bootstrap your Nette application.", + "homepage": "https://nette.org", + "keywords": [ + "bootstrapping", + "configurator", + "nette" + ], + "time": "2019-03-26T12:59:07+00:00" + }, + { + "name": "nette/caching", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/nette/caching.git", + "reference": "d1abc4216f1cd42263c266af1907bbcbda4094c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/caching/zipball/d1abc4216f1cd42263c266af1907bbcbda4094c9", + "reference": "d1abc4216f1cd42263c266af1907bbcbda4094c9", + "shasum": "" + }, + "require": { + "nette/finder": "^2.4 || ~3.0.0", + "nette/utils": "^2.4 || ~3.0.0", + "php": ">=7.1" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "latte/latte": "^2.4", + "nette/di": "^v3.0.0-beta2", + "nette/tester": "^2.0", + "tracy/tracy": "^2.4" + }, + "suggest": { + "ext-pdo_sqlite": "to use SQLiteStorage or SQLiteJournal" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "⏱ Nette Caching: library with easy-to-use API and many cache backends.", + "homepage": "https://nette.org", + "keywords": [ + "cache", + "journal", + "memcached", + "nette", + "sqlite" + ], + "time": "2019-02-05T21:28:16+00:00" + }, + { + "name": "nette/component-model", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/nette/component-model.git", + "reference": "3153441f3d64bbdac300e75b8e5dde36590f7e01" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/component-model/zipball/3153441f3d64bbdac300e75b8e5dde36590f7e01", + "reference": "3153441f3d64bbdac300e75b8e5dde36590f7e01", + "shasum": "" + }, + "require": { + "nette/utils": "^2.5 || ^3.0", + "php": ">=7.1" + }, + "conflict": { + "nette/application": "<2.4", + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/tester": "^2.0", + "tracy/tracy": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "⚛ Nette Component Model", + "homepage": "https://nette.org", + "keywords": [ + "components", + "nette" + ], + "time": "2019-02-20T07:13:15+00:00" + }, + { + "name": "nette/database", + "version": "v3.0.1", + "source": { + "type": "git", + "url": "https://github.com/nette/database.git", + "reference": "302586ea4161424e4c85717e20afe611ed1506f0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/database/zipball/302586ea4161424e4c85717e20afe611ed1506f0", + "reference": "302586ea4161424e4c85717e20afe611ed1506f0", + "shasum": "" + }, + "require": { + "ext-pdo": "*", + "nette/caching": "^3.0", + "nette/utils": "^3.0", + "php": ">=7.1" + }, + "conflict": { + "nette/di": "<3.0" + }, + "require-dev": { + "mockery/mockery": "^1.0.0", + "nette/di": "^v3.0", + "nette/tester": "^2.0", + "tracy/tracy": "^2.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "💾 Nette Database: layer with a familiar PDO-like API but much more powerful. Building queries, advanced joins, drivers for MySQL, PostgreSQL, SQLite, MS SQL Server and Oracle.", + "homepage": "https://nette.org", + "keywords": [ + "database", + "mssql", + "mysql", + "nette", + "notorm", + "oracle", + "pdo", + "postgresql", + "queries", + "sqlite" + ], + "time": "2019-04-01T04:56:22+00:00" + }, + { + "name": "nette/di", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/nette/di.git", + "reference": "19d83539245aaacb59470828919182411061841f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/di/zipball/19d83539245aaacb59470828919182411061841f", + "reference": "19d83539245aaacb59470828919182411061841f", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "nette/neon": "^3.0", + "nette/php-generator": "^3.2.2", + "nette/robot-loader": "^3.2", + "nette/schema": "^1.0", + "nette/utils": "^3.0", + "php": ">=7.1" + }, + "conflict": { + "nette/bootstrap": "<3.0" + }, + "require-dev": { + "nette/tester": "^2.2", + "tracy/tracy": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ], + "files": [ + "src/compatibility.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "💎 Nette Dependency Injection Container: Flexible, compiled and full-featured DIC with perfectly usable autowiring and support for all new PHP 7.1 features.", + "homepage": "https://nette.org", + "keywords": [ + "compiled", + "di", + "dic", + "factory", + "ioc", + "nette", + "static" + ], + "time": "2019-04-03T19:35:46+00:00" + }, + { + "name": "nette/finder", + "version": "v2.5.0", + "source": { + "type": "git", + "url": "https://github.com/nette/finder.git", + "reference": "6be1b83ea68ac558aff189d640abe242e0306fe2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/finder/zipball/6be1b83ea68ac558aff189d640abe242e0306fe2", + "reference": "6be1b83ea68ac558aff189d640abe242e0306fe2", + "shasum": "" + }, + "require": { + "nette/utils": "^2.4 || ~3.0.0", + "php": ">=7.1" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/tester": "^2.0", + "tracy/tracy": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "? Nette Finder: find files and directories with an intuitive API.", + "homepage": "https://nette.org", + "keywords": [ + "filesystem", + "glob", + "iterator", + "nette" + ], + "time": "2019-02-28T18:13:25+00:00" + }, + { + "name": "nette/forms", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/nette/forms.git", + "reference": "52e0d4f2fca8ff2ef44fb9d7f10fed59457dc26e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/forms/zipball/52e0d4f2fca8ff2ef44fb9d7f10fed59457dc26e", + "reference": "52e0d4f2fca8ff2ef44fb9d7f10fed59457dc26e", + "shasum": "" + }, + "require": { + "nette/component-model": "^3.0", + "nette/http": "^3.0", + "nette/utils": "^3.0", + "php": ">=7.1" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "latte/latte": "^2.4.1", + "nette/di": "^3.0", + "nette/tester": "^2.0", + "tracy/tracy": "^2.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "?? Nette Forms: generating, validating and processing secure forms in PHP. Handy API, fully customizable, server & client side validation and mature design.", + "homepage": "https://nette.org", + "keywords": [ + "Forms", + "bootstrap", + "csrf", + "javascript", + "nette", + "validation" + ], + "time": "2019-02-28T17:49:02+00:00" + }, + { + "name": "nette/http", + "version": "v3.0.1", + "source": { + "type": "git", + "url": "https://github.com/nette/http.git", + "reference": "2fa91a76583c3cb3e7d1a51c501c5653a6a11f8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/http/zipball/2fa91a76583c3cb3e7d1a51c501c5653a6a11f8a", + "reference": "2fa91a76583c3cb3e7d1a51c501c5653a6a11f8a", + "shasum": "" + }, + "require": { + "nette/utils": "^3.0", + "php": ">=7.1" + }, + "conflict": { + "nette/di": "<3.0" + }, + "require-dev": { + "nette/di": "^3.0", + "nette/tester": "^2.0", + "tracy/tracy": "^2.4" + }, + "suggest": { + "ext-fileinfo": "to detect type of uploaded files", + "nette/security": "allows use Nette\\Http\\UserStorage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🌐 Nette Http: abstraction for HTTP request, response and session. Provides careful data sanitization and utility for URL and cookies manipulation.", + "homepage": "https://nette.org", + "keywords": [ + "cookies", + "http", + "nette", + "proxy", + "request", + "response", + "security", + "session", + "url" + ], + "time": "2019-04-03T11:57:10+00:00" + }, + { + "name": "nette/mail", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/nette/mail.git", + "reference": "ce0064772ab3a6a01658c7368b63978597d60e08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/mail/zipball/ce0064772ab3a6a01658c7368b63978597d60e08", + "reference": "ce0064772ab3a6a01658c7368b63978597d60e08", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "nette/utils": "^2.4 || ^3.0", + "php": ">=7.1" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/di": "^3.0.0", + "nette/tester": "^2.0", + "tracy/tracy": "^2.4" + }, + "suggest": { + "ext-fileinfo": "to detect type of attached files" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "? Nette Mail: handy email creation and transfer library for PHP with both text and MIME-compliant support.", + "homepage": "https://nette.org", + "keywords": [ + "mail", + "mailer", + "mime", + "nette", + "smtp" + ], + "time": "2019-02-20T06:53:15+00:00" + }, + { + "name": "nette/neon", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/nette/neon.git", + "reference": "cbff32059cbdd8720deccf9e9eace6ee516f02eb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/neon/zipball/cbff32059cbdd8720deccf9e9eace6ee516f02eb", + "reference": "cbff32059cbdd8720deccf9e9eace6ee516f02eb", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "ext-json": "*", + "php": ">=7.0" + }, + "require-dev": { + "nette/tester": "^2.0", + "tracy/tracy": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "? Nette NEON: encodes and decodes NEON file format.", + "homepage": "http://ne-on.org", + "keywords": [ + "export", + "import", + "neon", + "nette", + "yaml" + ], + "time": "2019-02-05T21:30:40+00:00" + }, + { + "name": "nette/php-generator", + "version": "v3.2.2", + "source": { + "type": "git", + "url": "https://github.com/nette/php-generator.git", + "reference": "acff8b136fad84b860a626d133e791f95781f9f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/php-generator/zipball/acff8b136fad84b860a626d133e791f95781f9f5", + "reference": "acff8b136fad84b860a626d133e791f95781f9f5", + "shasum": "" + }, + "require": { + "nette/utils": "^2.4.2 || ~3.0.0", + "php": ">=7.1" + }, + "require-dev": { + "nette/tester": "^2.0", + "tracy/tracy": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 7.3 features.", + "homepage": "https://nette.org", + "keywords": [ + "code", + "nette", + "php", + "scaffolding" + ], + "time": "2019-03-15T03:41:13+00:00" + }, + { + "name": "nette/robot-loader", + "version": "v3.2.0", + "source": { + "type": "git", + "url": "https://github.com/nette/robot-loader.git", + "reference": "0712a0e39ae7956d6a94c0ab6ad41aa842544b5c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/robot-loader/zipball/0712a0e39ae7956d6a94c0ab6ad41aa842544b5c", + "reference": "0712a0e39ae7956d6a94c0ab6ad41aa842544b5c", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "nette/finder": "^2.5", + "nette/utils": "^3.0", + "php": ">=7.1" + }, + "require-dev": { + "nette/tester": "^2.0", + "tracy/tracy": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "? Nette RobotLoader: high performance and comfortable autoloader that will search and autoload classes within your application.", + "homepage": "https://nette.org", + "keywords": [ + "autoload", + "class", + "interface", + "nette", + "trait" + ], + "time": "2019-03-08T21:57:24+00:00" + }, + { + "name": "nette/routing", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/nette/routing.git", + "reference": "603c697f3df7ed214795d4e8e8c58fbf981232b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/routing/zipball/603c697f3df7ed214795d4e8e8c58fbf981232b1", + "reference": "603c697f3df7ed214795d4e8e8c58fbf981232b1", + "shasum": "" + }, + "require": { + "nette/http": "^3.0", + "nette/utils": "^3.0", + "php": ">=7.1" + }, + "require-dev": { + "nette/tester": "^2.0", + "tracy/tracy": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "Nette Routing: two-ways URL conversion", + "homepage": "https://nette.org", + "keywords": [ + "nette" + ], + "time": "2019-02-13T15:57:18+00:00" + }, + { + "name": "nette/schema", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/nette/schema.git", + "reference": "6241d8d4da39e825dd6cb5bfbe4242912f4d7e4d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/schema/zipball/6241d8d4da39e825dd6cb5bfbe4242912f4d7e4d", + "reference": "6241d8d4da39e825dd6cb5bfbe4242912f4d7e4d", + "shasum": "" + }, + "require": { + "nette/utils": "^3.0.1", + "php": ">=7.1" + }, + "require-dev": { + "nette/tester": "^2.2", + "tracy/tracy": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "📐 Nette Schema: validating data structures against a given Schema.", + "homepage": "https://nette.org", + "keywords": [ + "config", + "nette" + ], + "time": "2019-04-03T15:53:25+00:00" + }, + { + "name": "nette/security", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/nette/security.git", + "reference": "55b6f3e7e3defc8e4f1f78c947f53185c51d6147" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/security/zipball/55b6f3e7e3defc8e4f1f78c947f53185c51d6147", + "reference": "55b6f3e7e3defc8e4f1f78c947f53185c51d6147", + "shasum": "" + }, + "require": { + "nette/utils": "^2.4 || ^3.0", + "php": ">=7.1" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/di": "^3.0.0", + "nette/http": "^3.0.0", + "nette/tester": "^2.0", + "tracy/tracy": "^2.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "? Nette Security: provides authentication, authorization and a role-based access control management via ACL (Access Control List)", + "homepage": "https://nette.org", + "keywords": [ + "Authentication", + "acl", + "authorization", + "nette" + ], + "time": "2019-02-20T06:38:20+00:00" + }, + { + "name": "nette/utils", + "version": "v3.0.1", + "source": { + "type": "git", + "url": "https://github.com/nette/utils.git", + "reference": "bd961f49b211997202bda1d0fbc410905be370d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/utils/zipball/bd961f49b211997202bda1d0fbc410905be370d4", + "reference": "bd961f49b211997202bda1d0fbc410905be370d4", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "nette/tester": "~2.0", + "tracy/tracy": "^2.3" + }, + "suggest": { + "ext-gd": "to use Image", + "ext-iconv": "to use Strings::webalize() and toAscii()", + "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", + "ext-json": "to use Nette\\Utils\\Json", + "ext-mbstring": "to use Strings::lower() etc...", + "ext-xml": "to use Strings::length() etc. when mbstring is not available" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", + "homepage": "https://nette.org", + "keywords": [ + "array", + "core", + "datetime", + "images", + "json", + "nette", + "paginator", + "password", + "slugify", + "string", + "unicode", + "utf-8", + "utility", + "validation" + ], + "time": "2019-03-22T01:00:30+00:00" + }, + { + "name": "tracy/tracy", + "version": "v2.6.2", + "source": { + "type": "git", + "url": "https://github.com/nette/tracy.git", + "reference": "9a6513089a836744e70af0910ad45f50e603dcf5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/tracy/zipball/9a6513089a836744e70af0910ad45f50e603dcf5", + "reference": "9a6513089a836744e70af0910ad45f50e603dcf5", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-session": "*", + "php": ">=7.1" + }, + "require-dev": { + "nette/di": "^2.4 || ~3.0.0", + "nette/tester": "^2.2", + "nette/utils": "^2.4 || ^3.0", + "psr/log": "^1.0" + }, + "suggest": { + "https://nette.org/donate": "Please support Tracy via a donation" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "autoload": { + "classmap": [ + "src" + ], + "files": [ + "src/Tracy/shortcuts.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "😎 Tracy: the addictive tool to ease debugging PHP code for cool developers. Friendly design, logging, profiler, advanced features like debugging AJAX calls or CLI support. You will love it.", + "homepage": "https://tracy.nette.org", + "keywords": [ + "Xdebug", + "debug", + "debugger", + "nette", + "profiler" + ], + "time": "2019-04-03T20:29:00+00:00" + } + ], + "packages-dev": [ + { + "name": "nette/tester", + "version": "v2.2.0", + "source": { + "type": "git", + "url": "https://github.com/nette/tester.git", + "reference": "899c70c53b40dfe4a214e568babb617a9c454071" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/tester/zipball/899c70c53b40dfe4a214e568babb617a9c454071", + "reference": "899c70c53b40dfe4a214e568babb617a9c454071", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "bin": [ + "src/tester" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "Nette Tester: enjoyable unit testing in PHP with code coverage reporter. ????", + "homepage": "https://tester.nette.org", + "keywords": [ + "Xdebug", + "assertions", + "clover", + "code coverage", + "nette", + "pcov", + "phpdbg", + "phpunit", + "testing", + "unit" + ], + "time": "2019-03-11T08:54:30+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">= 7.1" + }, + "platform-dev": [], + "platform-overrides": { + "php": "7.1" + } +} diff --git a/composer.phar b/composer.phar new file mode 100644 index 0000000..b8ce13f Binary files /dev/null and b/composer.phar differ diff --git a/log/.gitignore b/log/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/log/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..fbbf302 --- /dev/null +++ b/readme.md @@ -0,0 +1,61 @@ +Nette Web Project +================= + +This is a simple, skeleton application using the [Nette](https://nette.org). This is meant to +be used as a starting point for your new projects. + +[Nette](https://nette.org) is a popular tool for PHP web development. +It is designed to be the most usable and friendliest as possible. It focuses +on security and performance and is definitely one of the safest PHP frameworks. + +If you like Nette, **[please make a donation now](https://nette.org/donate)**. Thank you! + + +Requirements +------------ + +- Web Project for Nette 3.0 requires PHP 7.1 + + +Installation +------------ + +The best way to install Web Project is using Composer. If you don't have Composer yet, +download it following [the instructions](https://doc.nette.org/composer). Then use command: + + composer create-project nette/web-project path/to/install + cd path/to/install + + +Make directories `temp/` and `log/` writable. + + +Web Server Setup +---------------- + +The simplest way to get started is to start the built-in PHP server in the root directory of your project: + + php -S localhost:8000 -t www + +Then visit `http://localhost:8000` in your browser to see the welcome page. + +For Apache or Nginx, setup a virtual host to point to the `www/` directory of the project and you +should be ready to go. + +**It is CRITICAL that whole `app/`, `log/` and `temp/` directories are not accessible directly +via a web browser. See [security warning](https://nette.org/security-warning).** + + +Notice: Composer PHP version +---------------------------- + +This project forces PHP 5.6 (eventually 7.1) as your PHP version for Composer packages. If you have newer +version on production server you should change it in `composer.json`: + +```json +"config": { + "platform": { + "php": "7.2" + } +} +``` diff --git a/temp/.gitignore b/temp/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/temp/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/vendor/.htaccess b/vendor/.htaccess new file mode 100644 index 0000000..0a9a047 --- /dev/null +++ b/vendor/.htaccess @@ -0,0 +1,2 @@ +Order Allow,Deny +Deny from all diff --git a/vendor/autoload.php b/vendor/autoload.php new file mode 100644 index 0000000..22b864a --- /dev/null +++ b/vendor/autoload.php @@ -0,0 +1,7 @@ + /dev/null; cd "../nette/tester/src" && pwd) + +if [ -d /proc/cygdrive ]; then + case $(which php) in + $(readlink -n /proc/cygdrive)/*) + # We are in Cygwin using Windows php, so the path must be translated + dir=$(cygpath -m "$dir"); + ;; + esac +fi + +"${dir}/tester" "$@" diff --git a/vendor/bin/tester.bat b/vendor/bin/tester.bat new file mode 100644 index 0000000..368577a --- /dev/null +++ b/vendor/bin/tester.bat @@ -0,0 +1,4 @@ +@ECHO OFF +setlocal DISABLEDELAYEDEXPANSION +SET BIN_TARGET=%~dp0/../nette/tester/src/tester +php "%BIN_TARGET%" %* diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php new file mode 100644 index 0000000..fce8549 --- /dev/null +++ b/vendor/composer/ClassLoader.php @@ -0,0 +1,445 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * 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; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // 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; +} diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE new file mode 100644 index 0000000..f27399a --- /dev/null +++ b/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php new file mode 100644 index 0000000..04d71c1 --- /dev/null +++ b/vendor/composer/autoload_classmap.php @@ -0,0 +1,374 @@ + $vendorDir . '/latte/latte/src/Latte/exceptions.php', + 'Latte\\Compiler' => $vendorDir . '/latte/latte/src/Latte/Compiler/Compiler.php', + 'Latte\\Engine' => $vendorDir . '/latte/latte/src/Latte/Engine.php', + 'Latte\\Helpers' => $vendorDir . '/latte/latte/src/Latte/Helpers.php', + 'Latte\\HtmlNode' => $vendorDir . '/latte/latte/src/Latte/Compiler/HtmlNode.php', + 'Latte\\ILoader' => $vendorDir . '/latte/latte/src/Latte/ILoader.php', + 'Latte\\IMacro' => $vendorDir . '/latte/latte/src/Latte/IMacro.php', + 'Latte\\Loaders\\FileLoader' => $vendorDir . '/latte/latte/src/Latte/Loaders/FileLoader.php', + 'Latte\\Loaders\\StringLoader' => $vendorDir . '/latte/latte/src/Latte/Loaders/StringLoader.php', + 'Latte\\MacroNode' => $vendorDir . '/latte/latte/src/Latte/Compiler/MacroNode.php', + 'Latte\\MacroTokens' => $vendorDir . '/latte/latte/src/Latte/Compiler/MacroTokens.php', + 'Latte\\Macros\\BlockMacros' => $vendorDir . '/latte/latte/src/Latte/Macros/BlockMacros.php', + 'Latte\\Macros\\CoreMacros' => $vendorDir . '/latte/latte/src/Latte/Macros/CoreMacros.php', + 'Latte\\Macros\\MacroSet' => $vendorDir . '/latte/latte/src/Latte/Macros/MacroSet.php', + 'Latte\\Parser' => $vendorDir . '/latte/latte/src/Latte/Compiler/Parser.php', + 'Latte\\PhpHelpers' => $vendorDir . '/latte/latte/src/Latte/Compiler/PhpHelpers.php', + 'Latte\\PhpWriter' => $vendorDir . '/latte/latte/src/Latte/Compiler/PhpWriter.php', + 'Latte\\RegexpException' => $vendorDir . '/latte/latte/src/Latte/exceptions.php', + 'Latte\\RuntimeException' => $vendorDir . '/latte/latte/src/Latte/exceptions.php', + 'Latte\\Runtime\\CachingIterator' => $vendorDir . '/latte/latte/src/Latte/Runtime/CachingIterator.php', + 'Latte\\Runtime\\FilterExecutor' => $vendorDir . '/latte/latte/src/Latte/Runtime/FilterExecutor.php', + 'Latte\\Runtime\\FilterInfo' => $vendorDir . '/latte/latte/src/Latte/Runtime/FilterInfo.php', + 'Latte\\Runtime\\Filters' => $vendorDir . '/latte/latte/src/Latte/Runtime/Filters.php', + 'Latte\\Runtime\\Html' => $vendorDir . '/latte/latte/src/Latte/Runtime/Html.php', + 'Latte\\Runtime\\IHtmlString' => $vendorDir . '/latte/latte/src/Latte/Runtime/IHtmlString.php', + 'Latte\\Runtime\\ISnippetBridge' => $vendorDir . '/latte/latte/src/Latte/Runtime/ISnippetBridge.php', + 'Latte\\Runtime\\SnippetDriver' => $vendorDir . '/latte/latte/src/Latte/Runtime/SnippetDriver.php', + 'Latte\\Runtime\\Template' => $vendorDir . '/latte/latte/src/Latte/Runtime/Template.php', + 'Latte\\Strict' => $vendorDir . '/latte/latte/src/Latte/Strict.php', + 'Latte\\Token' => $vendorDir . '/latte/latte/src/Latte/Compiler/Token.php', + 'Latte\\TokenIterator' => $vendorDir . '/latte/latte/src/Latte/Compiler/TokenIterator.php', + 'Latte\\Tokenizer' => $vendorDir . '/latte/latte/src/Latte/Compiler/Tokenizer.php', + 'NetteModule\\ErrorPresenter' => $vendorDir . '/nette/application/src/Application/ErrorPresenter.php', + 'NetteModule\\MicroPresenter' => $vendorDir . '/nette/application/src/Application/MicroPresenter.php', + 'Nette\\Application\\AbortException' => $vendorDir . '/nette/application/src/Application/exceptions.php', + 'Nette\\Application\\Application' => $vendorDir . '/nette/application/src/Application/Application.php', + 'Nette\\Application\\ApplicationException' => $vendorDir . '/nette/application/src/Application/exceptions.php', + 'Nette\\Application\\BadRequestException' => $vendorDir . '/nette/application/src/Application/exceptions.php', + 'Nette\\Application\\ForbiddenRequestException' => $vendorDir . '/nette/application/src/Application/exceptions.php', + 'Nette\\Application\\Helpers' => $vendorDir . '/nette/application/src/Application/Helpers.php', + 'Nette\\Application\\IPresenter' => $vendorDir . '/nette/application/src/Application/IPresenter.php', + 'Nette\\Application\\IPresenterFactory' => $vendorDir . '/nette/application/src/Application/IPresenterFactory.php', + 'Nette\\Application\\IResponse' => $vendorDir . '/nette/application/src/Application/IResponse.php', + 'Nette\\Application\\IRouter' => $vendorDir . '/nette/application/src/Application/IRouter.php', + 'Nette\\Application\\InvalidPresenterException' => $vendorDir . '/nette/application/src/Application/exceptions.php', + 'Nette\\Application\\LinkGenerator' => $vendorDir . '/nette/application/src/Application/LinkGenerator.php', + 'Nette\\Application\\PresenterFactory' => $vendorDir . '/nette/application/src/Application/PresenterFactory.php', + 'Nette\\Application\\Request' => $vendorDir . '/nette/application/src/Application/Request.php', + 'Nette\\Application\\Responses\\CallbackResponse' => $vendorDir . '/nette/application/src/Application/Responses/CallbackResponse.php', + 'Nette\\Application\\Responses\\FileResponse' => $vendorDir . '/nette/application/src/Application/Responses/FileResponse.php', + 'Nette\\Application\\Responses\\ForwardResponse' => $vendorDir . '/nette/application/src/Application/Responses/ForwardResponse.php', + 'Nette\\Application\\Responses\\JsonResponse' => $vendorDir . '/nette/application/src/Application/Responses/JsonResponse.php', + 'Nette\\Application\\Responses\\RedirectResponse' => $vendorDir . '/nette/application/src/Application/Responses/RedirectResponse.php', + 'Nette\\Application\\Responses\\TextResponse' => $vendorDir . '/nette/application/src/Application/Responses/TextResponse.php', + 'Nette\\Application\\Routers\\CliRouter' => $vendorDir . '/nette/application/src/Application/Routers/CliRouter.php', + 'Nette\\Application\\Routers\\Route' => $vendorDir . '/nette/application/src/Application/Routers/Route.php', + 'Nette\\Application\\Routers\\RouteList' => $vendorDir . '/nette/application/src/Application/Routers/RouteList.php', + 'Nette\\Application\\Routers\\SimpleRouter' => $vendorDir . '/nette/application/src/Application/Routers/SimpleRouter.php', + 'Nette\\Application\\UI\\BadSignalException' => $vendorDir . '/nette/application/src/Application/UI/BadSignalException.php', + 'Nette\\Application\\UI\\Component' => $vendorDir . '/nette/application/src/Application/UI/Component.php', + 'Nette\\Application\\UI\\ComponentReflection' => $vendorDir . '/nette/application/src/Application/UI/ComponentReflection.php', + 'Nette\\Application\\UI\\Control' => $vendorDir . '/nette/application/src/Application/UI/Control.php', + 'Nette\\Application\\UI\\Form' => $vendorDir . '/nette/application/src/Application/UI/Form.php', + 'Nette\\Application\\UI\\IRenderable' => $vendorDir . '/nette/application/src/Application/UI/IRenderable.php', + 'Nette\\Application\\UI\\ISignalReceiver' => $vendorDir . '/nette/application/src/Application/UI/ISignalReceiver.php', + 'Nette\\Application\\UI\\IStatePersistent' => $vendorDir . '/nette/application/src/Application/UI/IStatePersistent.php', + 'Nette\\Application\\UI\\ITemplate' => $vendorDir . '/nette/application/src/Application/UI/ITemplate.php', + 'Nette\\Application\\UI\\ITemplateFactory' => $vendorDir . '/nette/application/src/Application/UI/ITemplateFactory.php', + 'Nette\\Application\\UI\\InvalidLinkException' => $vendorDir . '/nette/application/src/Application/UI/InvalidLinkException.php', + 'Nette\\Application\\UI\\Link' => $vendorDir . '/nette/application/src/Application/UI/Link.php', + 'Nette\\Application\\UI\\MethodReflection' => $vendorDir . '/nette/application/src/Application/UI/MethodReflection.php', + 'Nette\\Application\\UI\\Multiplier' => $vendorDir . '/nette/application/src/Application/UI/Multiplier.php', + 'Nette\\Application\\UI\\Presenter' => $vendorDir . '/nette/application/src/Application/UI/Presenter.php', + 'Nette\\ArgumentOutOfRangeException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\Bridges\\ApplicationDI\\ApplicationExtension' => $vendorDir . '/nette/application/src/Bridges/ApplicationDI/ApplicationExtension.php', + 'Nette\\Bridges\\ApplicationDI\\LatteExtension' => $vendorDir . '/nette/application/src/Bridges/ApplicationDI/LatteExtension.php', + 'Nette\\Bridges\\ApplicationDI\\PresenterFactoryCallback' => $vendorDir . '/nette/application/src/Bridges/ApplicationDI/PresenterFactoryCallback.php', + 'Nette\\Bridges\\ApplicationDI\\RoutingExtension' => $vendorDir . '/nette/application/src/Bridges/ApplicationDI/RoutingExtension.php', + 'Nette\\Bridges\\ApplicationLatte\\ILatteFactory' => $vendorDir . '/nette/application/src/Bridges/ApplicationLatte/ILatteFactory.php', + 'Nette\\Bridges\\ApplicationLatte\\Loader' => $vendorDir . '/nette/application/src/Bridges/ApplicationLatte/Loader.php', + 'Nette\\Bridges\\ApplicationLatte\\SnippetBridge' => $vendorDir . '/nette/application/src/Bridges/ApplicationLatte/SnippetBridge.php', + 'Nette\\Bridges\\ApplicationLatte\\Template' => $vendorDir . '/nette/application/src/Bridges/ApplicationLatte/Template.php', + 'Nette\\Bridges\\ApplicationLatte\\TemplateFactory' => $vendorDir . '/nette/application/src/Bridges/ApplicationLatte/TemplateFactory.php', + 'Nette\\Bridges\\ApplicationLatte\\UIMacros' => $vendorDir . '/nette/application/src/Bridges/ApplicationLatte/UIMacros.php', + 'Nette\\Bridges\\ApplicationLatte\\UIRuntime' => $vendorDir . '/nette/application/src/Bridges/ApplicationLatte/UIRuntime.php', + 'Nette\\Bridges\\ApplicationTracy\\RoutingPanel' => $vendorDir . '/nette/application/src/Bridges/ApplicationTracy/RoutingPanel.php', + 'Nette\\Bridges\\CacheDI\\CacheExtension' => $vendorDir . '/nette/caching/src/Bridges/CacheDI/CacheExtension.php', + 'Nette\\Bridges\\CacheLatte\\CacheMacro' => $vendorDir . '/nette/caching/src/Bridges/CacheLatte/CacheMacro.php', + 'Nette\\Bridges\\DITracy\\ContainerPanel' => $vendorDir . '/nette/di/src/Bridges/DITracy/ContainerPanel.php', + 'Nette\\Bridges\\DatabaseDI\\DatabaseExtension' => $vendorDir . '/nette/database/src/Bridges/DatabaseDI/DatabaseExtension.php', + 'Nette\\Bridges\\DatabaseTracy\\ConnectionPanel' => $vendorDir . '/nette/database/src/Bridges/DatabaseTracy/ConnectionPanel.php', + 'Nette\\Bridges\\FormsDI\\FormsExtension' => $vendorDir . '/nette/forms/src/Bridges/FormsDI/FormsExtension.php', + 'Nette\\Bridges\\FormsLatte\\FormMacros' => $vendorDir . '/nette/forms/src/Bridges/FormsLatte/FormMacros.php', + 'Nette\\Bridges\\FormsLatte\\Runtime' => $vendorDir . '/nette/forms/src/Bridges/FormsLatte/Runtime.php', + 'Nette\\Bridges\\Framework\\TracyBridge' => $vendorDir . '/nette/bootstrap/src/Bridges/Framework/TracyBridge.php', + 'Nette\\Bridges\\HttpDI\\HttpExtension' => $vendorDir . '/nette/http/src/Bridges/HttpDI/HttpExtension.php', + 'Nette\\Bridges\\HttpDI\\SessionExtension' => $vendorDir . '/nette/http/src/Bridges/HttpDI/SessionExtension.php', + 'Nette\\Bridges\\HttpTracy\\SessionPanel' => $vendorDir . '/nette/http/src/Bridges/HttpTracy/SessionPanel.php', + 'Nette\\Bridges\\MailDI\\MailExtension' => $vendorDir . '/nette/mail/src/Bridges/MailDI/MailExtension.php', + 'Nette\\Bridges\\ReflectionDI\\ReflectionExtension' => $vendorDir . '/nette/reflection/src/Bridges/ReflectionDI/ReflectionExtension.php', + 'Nette\\Bridges\\SecurityDI\\SecurityExtension' => $vendorDir . '/nette/security/src/Bridges/SecurityDI/SecurityExtension.php', + 'Nette\\Bridges\\SecurityTracy\\UserPanel' => $vendorDir . '/nette/security/src/Bridges/SecurityTracy/UserPanel.php', + 'Nette\\Caching\\Cache' => $vendorDir . '/nette/caching/src/Caching/Cache.php', + 'Nette\\Caching\\IBulkReader' => $vendorDir . '/nette/caching/src/Caching/IBulkReader.php', + 'Nette\\Caching\\IStorage' => $vendorDir . '/nette/caching/src/Caching/IStorage.php', + 'Nette\\Caching\\OutputHelper' => $vendorDir . '/nette/caching/src/Caching/OutputHelper.php', + 'Nette\\Caching\\Storages\\DevNullStorage' => $vendorDir . '/nette/caching/src/Caching/Storages/DevNullStorage.php', + 'Nette\\Caching\\Storages\\FileStorage' => $vendorDir . '/nette/caching/src/Caching/Storages/FileStorage.php', + 'Nette\\Caching\\Storages\\IJournal' => $vendorDir . '/nette/caching/src/Caching/Storages/IJournal.php', + 'Nette\\Caching\\Storages\\MemcachedStorage' => $vendorDir . '/nette/caching/src/Caching/Storages/MemcachedStorage.php', + 'Nette\\Caching\\Storages\\MemoryStorage' => $vendorDir . '/nette/caching/src/Caching/Storages/MemoryStorage.php', + 'Nette\\Caching\\Storages\\NewMemcachedStorage' => $vendorDir . '/nette/caching/src/Caching/Storages/NewMemcachedStorage.php', + 'Nette\\Caching\\Storages\\SQLiteJournal' => $vendorDir . '/nette/caching/src/Caching/Storages/SQLiteJournal.php', + 'Nette\\Caching\\Storages\\SQLiteStorage' => $vendorDir . '/nette/caching/src/Caching/Storages/SQLiteStorage.php', + 'Nette\\ComponentModel\\ArrayAccess' => $vendorDir . '/nette/component-model/src/ComponentModel/ArrayAccess.php', + 'Nette\\ComponentModel\\Component' => $vendorDir . '/nette/component-model/src/ComponentModel/Component.php', + 'Nette\\ComponentModel\\Container' => $vendorDir . '/nette/component-model/src/ComponentModel/Container.php', + 'Nette\\ComponentModel\\IComponent' => $vendorDir . '/nette/component-model/src/ComponentModel/IComponent.php', + 'Nette\\ComponentModel\\IContainer' => $vendorDir . '/nette/component-model/src/ComponentModel/IContainer.php', + 'Nette\\ComponentModel\\RecursiveComponentIterator' => $vendorDir . '/nette/component-model/src/ComponentModel/RecursiveComponentIterator.php', + 'Nette\\Configurator' => $vendorDir . '/nette/bootstrap/src/Bootstrap/Configurator.php', + 'Nette\\DI\\Compiler' => $vendorDir . '/nette/di/src/DI/Compiler.php', + 'Nette\\DI\\CompilerExtension' => $vendorDir . '/nette/di/src/DI/CompilerExtension.php', + 'Nette\\DI\\Config\\Adapters\\IniAdapter' => $vendorDir . '/nette/di/src/DI/Config/Adapters/IniAdapter.php', + 'Nette\\DI\\Config\\Adapters\\NeonAdapter' => $vendorDir . '/nette/di/src/DI/Config/Adapters/NeonAdapter.php', + 'Nette\\DI\\Config\\Adapters\\PhpAdapter' => $vendorDir . '/nette/di/src/DI/Config/Adapters/PhpAdapter.php', + 'Nette\\DI\\Config\\Helpers' => $vendorDir . '/nette/di/src/DI/Config/Helpers.php', + 'Nette\\DI\\Config\\IAdapter' => $vendorDir . '/nette/di/src/DI/Config/IAdapter.php', + 'Nette\\DI\\Config\\Loader' => $vendorDir . '/nette/di/src/DI/Config/Loader.php', + 'Nette\\DI\\Container' => $vendorDir . '/nette/di/src/DI/Container.php', + 'Nette\\DI\\ContainerBuilder' => $vendorDir . '/nette/di/src/DI/ContainerBuilder.php', + 'Nette\\DI\\ContainerLoader' => $vendorDir . '/nette/di/src/DI/ContainerLoader.php', + 'Nette\\DI\\DependencyChecker' => $vendorDir . '/nette/di/src/DI/DependencyChecker.php', + 'Nette\\DI\\Extensions\\ConstantsExtension' => $vendorDir . '/nette/di/src/DI/Extensions/ConstantsExtension.php', + 'Nette\\DI\\Extensions\\DIExtension' => $vendorDir . '/nette/di/src/DI/Extensions/DIExtension.php', + 'Nette\\DI\\Extensions\\DecoratorExtension' => $vendorDir . '/nette/di/src/DI/Extensions/DecoratorExtension.php', + 'Nette\\DI\\Extensions\\ExtensionsExtension' => $vendorDir . '/nette/di/src/DI/Extensions/ExtensionsExtension.php', + 'Nette\\DI\\Extensions\\InjectExtension' => $vendorDir . '/nette/di/src/DI/Extensions/InjectExtension.php', + 'Nette\\DI\\Extensions\\PhpExtension' => $vendorDir . '/nette/di/src/DI/Extensions/PhpExtension.php', + 'Nette\\DI\\Helpers' => $vendorDir . '/nette/di/src/DI/Helpers.php', + 'Nette\\DI\\MissingServiceException' => $vendorDir . '/nette/di/src/DI/exceptions.php', + 'Nette\\DI\\PhpGenerator' => $vendorDir . '/nette/di/src/DI/PhpGenerator.php', + 'Nette\\DI\\PhpReflection' => $vendorDir . '/nette/di/src/DI/PhpReflection.php', + 'Nette\\DI\\ServiceCreationException' => $vendorDir . '/nette/di/src/DI/exceptions.php', + 'Nette\\DI\\ServiceDefinition' => $vendorDir . '/nette/di/src/DI/ServiceDefinition.php', + 'Nette\\DI\\Statement' => $vendorDir . '/nette/di/src/DI/Statement.php', + 'Nette\\Database\\Connection' => $vendorDir . '/nette/database/src/Database/Connection.php', + 'Nette\\Database\\ConnectionException' => $vendorDir . '/nette/database/src/Database/exceptions.php', + 'Nette\\Database\\ConstraintViolationException' => $vendorDir . '/nette/database/src/Database/exceptions.php', + 'Nette\\Database\\Context' => $vendorDir . '/nette/database/src/Database/Context.php', + 'Nette\\Database\\Conventions\\AmbiguousReferenceKeyException' => $vendorDir . '/nette/database/src/Database/Conventions/AmbiguousReferenceKeyException.php', + 'Nette\\Database\\Conventions\\DiscoveredConventions' => $vendorDir . '/nette/database/src/Database/Conventions/DiscoveredConventions.php', + 'Nette\\Database\\Conventions\\StaticConventions' => $vendorDir . '/nette/database/src/Database/Conventions/StaticConventions.php', + 'Nette\\Database\\DriverException' => $vendorDir . '/nette/database/src/Database/DriverException.php', + 'Nette\\Database\\Drivers\\MsSqlDriver' => $vendorDir . '/nette/database/src/Database/Drivers/MsSqlDriver.php', + 'Nette\\Database\\Drivers\\MySqlDriver' => $vendorDir . '/nette/database/src/Database/Drivers/MySqlDriver.php', + 'Nette\\Database\\Drivers\\OciDriver' => $vendorDir . '/nette/database/src/Database/Drivers/OciDriver.php', + 'Nette\\Database\\Drivers\\OdbcDriver' => $vendorDir . '/nette/database/src/Database/Drivers/OdbcDriver.php', + 'Nette\\Database\\Drivers\\PgSqlDriver' => $vendorDir . '/nette/database/src/Database/Drivers/PgSqlDriver.php', + 'Nette\\Database\\Drivers\\Sqlite2Driver' => $vendorDir . '/nette/database/src/Database/Drivers/Sqlite2Driver.php', + 'Nette\\Database\\Drivers\\SqliteDriver' => $vendorDir . '/nette/database/src/Database/Drivers/SqliteDriver.php', + 'Nette\\Database\\Drivers\\SqlsrvDriver' => $vendorDir . '/nette/database/src/Database/Drivers/SqlsrvDriver.php', + 'Nette\\Database\\ForeignKeyConstraintViolationException' => $vendorDir . '/nette/database/src/Database/exceptions.php', + 'Nette\\Database\\Helpers' => $vendorDir . '/nette/database/src/Database/Helpers.php', + 'Nette\\Database\\IConventions' => $vendorDir . '/nette/database/src/Database/IConventions.php', + 'Nette\\Database\\IRow' => $vendorDir . '/nette/database/src/Database/IRow.php', + 'Nette\\Database\\IRowContainer' => $vendorDir . '/nette/database/src/Database/IRowContainer.php', + 'Nette\\Database\\IStructure' => $vendorDir . '/nette/database/src/Database/IStructure.php', + 'Nette\\Database\\ISupplementalDriver' => $vendorDir . '/nette/database/src/Database/ISupplementalDriver.php', + 'Nette\\Database\\NotNullConstraintViolationException' => $vendorDir . '/nette/database/src/Database/exceptions.php', + 'Nette\\Database\\ResultSet' => $vendorDir . '/nette/database/src/Database/ResultSet.php', + 'Nette\\Database\\Row' => $vendorDir . '/nette/database/src/Database/Row.php', + 'Nette\\Database\\SqlLiteral' => $vendorDir . '/nette/database/src/Database/SqlLiteral.php', + 'Nette\\Database\\SqlPreprocessor' => $vendorDir . '/nette/database/src/Database/SqlPreprocessor.php', + 'Nette\\Database\\Structure' => $vendorDir . '/nette/database/src/Database/Structure.php', + 'Nette\\Database\\Table\\ActiveRow' => $vendorDir . '/nette/database/src/Database/Table/ActiveRow.php', + 'Nette\\Database\\Table\\GroupedSelection' => $vendorDir . '/nette/database/src/Database/Table/GroupedSelection.php', + 'Nette\\Database\\Table\\IRow' => $vendorDir . '/nette/database/src/Database/Table/IRow.php', + 'Nette\\Database\\Table\\IRowContainer' => $vendorDir . '/nette/database/src/Database/Table/IRowContainer.php', + 'Nette\\Database\\Table\\Selection' => $vendorDir . '/nette/database/src/Database/Table/Selection.php', + 'Nette\\Database\\Table\\SqlBuilder' => $vendorDir . '/nette/database/src/Database/Table/SqlBuilder.php', + 'Nette\\Database\\UniqueConstraintViolationException' => $vendorDir . '/nette/database/src/Database/exceptions.php', + 'Nette\\DeprecatedException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\DirectoryNotFoundException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\FileNotFoundException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\Forms\\Container' => $vendorDir . '/nette/forms/src/Forms/Container.php', + 'Nette\\Forms\\ControlGroup' => $vendorDir . '/nette/forms/src/Forms/ControlGroup.php', + 'Nette\\Forms\\Controls\\BaseControl' => $vendorDir . '/nette/forms/src/Forms/Controls/BaseControl.php', + 'Nette\\Forms\\Controls\\Button' => $vendorDir . '/nette/forms/src/Forms/Controls/Button.php', + 'Nette\\Forms\\Controls\\Checkbox' => $vendorDir . '/nette/forms/src/Forms/Controls/Checkbox.php', + 'Nette\\Forms\\Controls\\CheckboxList' => $vendorDir . '/nette/forms/src/Forms/Controls/CheckboxList.php', + 'Nette\\Forms\\Controls\\ChoiceControl' => $vendorDir . '/nette/forms/src/Forms/Controls/ChoiceControl.php', + 'Nette\\Forms\\Controls\\CsrfProtection' => $vendorDir . '/nette/forms/src/Forms/Controls/CsrfProtection.php', + 'Nette\\Forms\\Controls\\HiddenField' => $vendorDir . '/nette/forms/src/Forms/Controls/HiddenField.php', + 'Nette\\Forms\\Controls\\ImageButton' => $vendorDir . '/nette/forms/src/Forms/Controls/ImageButton.php', + 'Nette\\Forms\\Controls\\MultiChoiceControl' => $vendorDir . '/nette/forms/src/Forms/Controls/MultiChoiceControl.php', + 'Nette\\Forms\\Controls\\MultiSelectBox' => $vendorDir . '/nette/forms/src/Forms/Controls/MultiSelectBox.php', + 'Nette\\Forms\\Controls\\RadioList' => $vendorDir . '/nette/forms/src/Forms/Controls/RadioList.php', + 'Nette\\Forms\\Controls\\SelectBox' => $vendorDir . '/nette/forms/src/Forms/Controls/SelectBox.php', + 'Nette\\Forms\\Controls\\SubmitButton' => $vendorDir . '/nette/forms/src/Forms/Controls/SubmitButton.php', + 'Nette\\Forms\\Controls\\TextArea' => $vendorDir . '/nette/forms/src/Forms/Controls/TextArea.php', + 'Nette\\Forms\\Controls\\TextBase' => $vendorDir . '/nette/forms/src/Forms/Controls/TextBase.php', + 'Nette\\Forms\\Controls\\TextInput' => $vendorDir . '/nette/forms/src/Forms/Controls/TextInput.php', + 'Nette\\Forms\\Controls\\UploadControl' => $vendorDir . '/nette/forms/src/Forms/Controls/UploadControl.php', + 'Nette\\Forms\\Form' => $vendorDir . '/nette/forms/src/Forms/Form.php', + 'Nette\\Forms\\Helpers' => $vendorDir . '/nette/forms/src/Forms/Helpers.php', + 'Nette\\Forms\\IControl' => $vendorDir . '/nette/forms/src/Forms/IControl.php', + 'Nette\\Forms\\IFormRenderer' => $vendorDir . '/nette/forms/src/Forms/IFormRenderer.php', + 'Nette\\Forms\\ISubmitterControl' => $vendorDir . '/nette/forms/src/Forms/ISubmitterControl.php', + 'Nette\\Forms\\Rendering\\DefaultFormRenderer' => $vendorDir . '/nette/forms/src/Forms/Rendering/DefaultFormRenderer.php', + 'Nette\\Forms\\Rule' => $vendorDir . '/nette/forms/src/Forms/Rule.php', + 'Nette\\Forms\\Rules' => $vendorDir . '/nette/forms/src/Forms/Rules.php', + 'Nette\\Forms\\Validator' => $vendorDir . '/nette/forms/src/Forms/Validator.php', + 'Nette\\Http\\Context' => $vendorDir . '/nette/http/src/Http/Context.php', + 'Nette\\Http\\FileUpload' => $vendorDir . '/nette/http/src/Http/FileUpload.php', + 'Nette\\Http\\Helpers' => $vendorDir . '/nette/http/src/Http/Helpers.php', + 'Nette\\Http\\IRequest' => $vendorDir . '/nette/http/src/Http/IRequest.php', + 'Nette\\Http\\IResponse' => $vendorDir . '/nette/http/src/Http/IResponse.php', + 'Nette\\Http\\ISessionStorage' => $vendorDir . '/nette/http/src/Http/ISessionStorage.php', + 'Nette\\Http\\Request' => $vendorDir . '/nette/http/src/Http/Request.php', + 'Nette\\Http\\RequestFactory' => $vendorDir . '/nette/http/src/Http/RequestFactory.php', + 'Nette\\Http\\Response' => $vendorDir . '/nette/http/src/Http/Response.php', + 'Nette\\Http\\Session' => $vendorDir . '/nette/http/src/Http/Session.php', + 'Nette\\Http\\SessionSection' => $vendorDir . '/nette/http/src/Http/SessionSection.php', + 'Nette\\Http\\Url' => $vendorDir . '/nette/http/src/Http/Url.php', + 'Nette\\Http\\UrlScript' => $vendorDir . '/nette/http/src/Http/UrlScript.php', + 'Nette\\Http\\UserStorage' => $vendorDir . '/nette/http/src/Http/UserStorage.php', + 'Nette\\IOException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\InvalidArgumentException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\InvalidStateException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\Iterators\\CachingIterator' => $vendorDir . '/nette/utils/src/Iterators/CachingIterator.php', + 'Nette\\Iterators\\Mapper' => $vendorDir . '/nette/utils/src/Iterators/Mapper.php', + 'Nette\\LegacyObject' => $vendorDir . '/nette/utils/src/Utils/LegacyObject.php', + 'Nette\\Loaders\\RobotLoader' => $vendorDir . '/nette/robot-loader/src/RobotLoader/RobotLoader.php', + 'Nette\\Localization\\ITranslator' => $vendorDir . '/nette/utils/src/Utils/ITranslator.php', + 'Nette\\Mail\\FallbackMailer' => $vendorDir . '/nette/mail/src/Mail/FallbackMailer.php', + 'Nette\\Mail\\FallbackMailerException' => $vendorDir . '/nette/mail/src/Mail/exceptions.php', + 'Nette\\Mail\\IMailer' => $vendorDir . '/nette/mail/src/Mail/IMailer.php', + 'Nette\\Mail\\Message' => $vendorDir . '/nette/mail/src/Mail/Message.php', + 'Nette\\Mail\\MimePart' => $vendorDir . '/nette/mail/src/Mail/MimePart.php', + 'Nette\\Mail\\SendException' => $vendorDir . '/nette/mail/src/Mail/exceptions.php', + 'Nette\\Mail\\SendmailMailer' => $vendorDir . '/nette/mail/src/Mail/SendmailMailer.php', + 'Nette\\Mail\\SmtpException' => $vendorDir . '/nette/mail/src/Mail/exceptions.php', + 'Nette\\Mail\\SmtpMailer' => $vendorDir . '/nette/mail/src/Mail/SmtpMailer.php', + 'Nette\\MemberAccessException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\Neon\\Decoder' => $vendorDir . '/nette/neon/src/Neon/Decoder.php', + 'Nette\\Neon\\Encoder' => $vendorDir . '/nette/neon/src/Neon/Encoder.php', + 'Nette\\Neon\\Entity' => $vendorDir . '/nette/neon/src/Neon/Entity.php', + 'Nette\\Neon\\Exception' => $vendorDir . '/nette/neon/src/Neon/Exception.php', + 'Nette\\Neon\\Neon' => $vendorDir . '/nette/neon/src/Neon/Neon.php', + 'Nette\\NotImplementedException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\NotSupportedException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\OutOfRangeException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\PhpGenerator\\ClassType' => $vendorDir . '/nette/php-generator/src/PhpGenerator/ClassType.php', + 'Nette\\PhpGenerator\\Closure' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Closure.php', + 'Nette\\PhpGenerator\\Constant' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Constant.php', + 'Nette\\PhpGenerator\\Factory' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Factory.php', + 'Nette\\PhpGenerator\\GlobalFunction' => $vendorDir . '/nette/php-generator/src/PhpGenerator/GlobalFunction.php', + 'Nette\\PhpGenerator\\Helpers' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Helpers.php', + 'Nette\\PhpGenerator\\Method' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Method.php', + 'Nette\\PhpGenerator\\Parameter' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Parameter.php', + 'Nette\\PhpGenerator\\PhpFile' => $vendorDir . '/nette/php-generator/src/PhpGenerator/PhpFile.php', + 'Nette\\PhpGenerator\\PhpLiteral' => $vendorDir . '/nette/php-generator/src/PhpGenerator/PhpLiteral.php', + 'Nette\\PhpGenerator\\PhpNamespace' => $vendorDir . '/nette/php-generator/src/PhpGenerator/PhpNamespace.php', + 'Nette\\PhpGenerator\\Printer' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Printer.php', + 'Nette\\PhpGenerator\\Property' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Property.php', + 'Nette\\PhpGenerator\\PsrPrinter' => $vendorDir . '/nette/php-generator/src/PhpGenerator/PsrPrinter.php', + 'Nette\\PhpGenerator\\Traits\\CommentAware' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Traits/CommentAware.php', + 'Nette\\PhpGenerator\\Traits\\FunctionLike' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Traits/FunctionLike.php', + 'Nette\\PhpGenerator\\Traits\\NameAware' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Traits/NameAware.php', + 'Nette\\PhpGenerator\\Traits\\VisibilityAware' => $vendorDir . '/nette/php-generator/src/PhpGenerator/Traits/VisibilityAware.php', + 'Nette\\Reflection\\Annotation' => $vendorDir . '/nette/reflection/src/Reflection/Annotation.php', + 'Nette\\Reflection\\AnnotationsParser' => $vendorDir . '/nette/reflection/src/Reflection/AnnotationsParser.php', + 'Nette\\Reflection\\ClassType' => $vendorDir . '/nette/reflection/src/Reflection/ClassType.php', + 'Nette\\Reflection\\Extension' => $vendorDir . '/nette/reflection/src/Reflection/Extension.php', + 'Nette\\Reflection\\GlobalFunction' => $vendorDir . '/nette/reflection/src/Reflection/GlobalFunction.php', + 'Nette\\Reflection\\Helpers' => $vendorDir . '/nette/reflection/src/Reflection/Helpers.php', + 'Nette\\Reflection\\IAnnotation' => $vendorDir . '/nette/reflection/src/Reflection/IAnnotation.php', + 'Nette\\Reflection\\Method' => $vendorDir . '/nette/reflection/src/Reflection/Method.php', + 'Nette\\Reflection\\Parameter' => $vendorDir . '/nette/reflection/src/Reflection/Parameter.php', + 'Nette\\Reflection\\Property' => $vendorDir . '/nette/reflection/src/Reflection/Property.php', + 'Nette\\Security\\AuthenticationException' => $vendorDir . '/nette/security/src/Security/AuthenticationException.php', + 'Nette\\Security\\IAuthenticator' => $vendorDir . '/nette/security/src/Security/IAuthenticator.php', + 'Nette\\Security\\IAuthorizator' => $vendorDir . '/nette/security/src/Security/IAuthorizator.php', + 'Nette\\Security\\IIdentity' => $vendorDir . '/nette/security/src/Security/IIdentity.php', + 'Nette\\Security\\IResource' => $vendorDir . '/nette/security/src/Security/IResource.php', + 'Nette\\Security\\IRole' => $vendorDir . '/nette/security/src/Security/IRole.php', + 'Nette\\Security\\IUserStorage' => $vendorDir . '/nette/security/src/Security/IUserStorage.php', + 'Nette\\Security\\Identity' => $vendorDir . '/nette/security/src/Security/Identity.php', + 'Nette\\Security\\Passwords' => $vendorDir . '/nette/security/src/Security/Passwords.php', + 'Nette\\Security\\Permission' => $vendorDir . '/nette/security/src/Security/Permission.php', + 'Nette\\Security\\SimpleAuthenticator' => $vendorDir . '/nette/security/src/Security/SimpleAuthenticator.php', + 'Nette\\Security\\User' => $vendorDir . '/nette/security/src/Security/User.php', + 'Nette\\SmartObject' => $vendorDir . '/nette/utils/src/Utils/SmartObject.php', + 'Nette\\StaticClass' => $vendorDir . '/nette/utils/src/Utils/StaticClass.php', + 'Nette\\StaticClassException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\UnexpectedValueException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\Utils\\ArrayHash' => $vendorDir . '/nette/utils/src/Utils/ArrayHash.php', + 'Nette\\Utils\\ArrayList' => $vendorDir . '/nette/utils/src/Utils/ArrayList.php', + 'Nette\\Utils\\Arrays' => $vendorDir . '/nette/utils/src/Utils/Arrays.php', + 'Nette\\Utils\\AssertionException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\Utils\\Callback' => $vendorDir . '/nette/utils/src/Utils/Callback.php', + 'Nette\\Utils\\DateTime' => $vendorDir . '/nette/utils/src/Utils/DateTime.php', + 'Nette\\Utils\\FileSystem' => $vendorDir . '/nette/utils/src/Utils/FileSystem.php', + 'Nette\\Utils\\Finder' => $vendorDir . '/nette/finder/src/Utils/Finder.php', + 'Nette\\Utils\\Html' => $vendorDir . '/nette/utils/src/Utils/Html.php', + 'Nette\\Utils\\IHtmlString' => $vendorDir . '/nette/utils/src/Utils/IHtmlString.php', + 'Nette\\Utils\\Image' => $vendorDir . '/nette/utils/src/Utils/Image.php', + 'Nette\\Utils\\ImageException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\Utils\\Json' => $vendorDir . '/nette/utils/src/Utils/Json.php', + 'Nette\\Utils\\JsonException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\Utils\\ObjectHelpers' => $vendorDir . '/nette/utils/src/Utils/ObjectHelpers.php', + 'Nette\\Utils\\ObjectMixin' => $vendorDir . '/nette/utils/src/Utils/ObjectMixin.php', + 'Nette\\Utils\\Paginator' => $vendorDir . '/nette/utils/src/Utils/Paginator.php', + 'Nette\\Utils\\Random' => $vendorDir . '/nette/utils/src/Utils/Random.php', + 'Nette\\Utils\\Reflection' => $vendorDir . '/nette/utils/src/Utils/Reflection.php', + 'Nette\\Utils\\RegexpException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\Utils\\Strings' => $vendorDir . '/nette/utils/src/Utils/Strings.php', + 'Nette\\Utils\\UnknownImageFileException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\Utils\\Validators' => $vendorDir . '/nette/utils/src/Utils/Validators.php', + 'Tester\\Assert' => $vendorDir . '/nette/tester/src/Framework/Assert.php', + 'Tester\\AssertException' => $vendorDir . '/nette/tester/src/Framework/AssertException.php', + 'Tester\\CodeCoverage\\Collector' => $vendorDir . '/nette/tester/src/CodeCoverage/Collector.php', + 'Tester\\CodeCoverage\\Generators\\AbstractGenerator' => $vendorDir . '/nette/tester/src/CodeCoverage/Generators/AbstractGenerator.php', + 'Tester\\CodeCoverage\\Generators\\CloverXMLGenerator' => $vendorDir . '/nette/tester/src/CodeCoverage/Generators/CloverXMLGenerator.php', + 'Tester\\CodeCoverage\\Generators\\HtmlGenerator' => $vendorDir . '/nette/tester/src/CodeCoverage/Generators/HtmlGenerator.php', + 'Tester\\CodeCoverage\\PhpParser' => $vendorDir . '/nette/tester/src/CodeCoverage/PhpParser.php', + 'Tester\\DataProvider' => $vendorDir . '/nette/tester/src/Framework/DataProvider.php', + 'Tester\\DomQuery' => $vendorDir . '/nette/tester/src/Framework/DomQuery.php', + 'Tester\\Dumper' => $vendorDir . '/nette/tester/src/Framework/Dumper.php', + 'Tester\\Environment' => $vendorDir . '/nette/tester/src/Framework/Environment.php', + 'Tester\\Expect' => $vendorDir . '/nette/tester/src/Framework/Expect.php', + 'Tester\\FileMock' => $vendorDir . '/nette/tester/src/Framework/FileMock.php', + 'Tester\\FileMutator' => $vendorDir . '/nette/tester/src/Framework/FileMutator.php', + 'Tester\\Helpers' => $vendorDir . '/nette/tester/src/Framework/Helpers.php', + 'Tester\\Runner\\CliTester' => $vendorDir . '/nette/tester/src/Runner/CliTester.php', + 'Tester\\Runner\\CommandLine' => $vendorDir . '/nette/tester/src/Runner/CommandLine.php', + 'Tester\\Runner\\Job' => $vendorDir . '/nette/tester/src/Runner/Job.php', + 'Tester\\Runner\\OutputHandler' => $vendorDir . '/nette/tester/src/Runner/OutputHandler.php', + 'Tester\\Runner\\Output\\ConsolePrinter' => $vendorDir . '/nette/tester/src/Runner/Output/ConsolePrinter.php', + 'Tester\\Runner\\Output\\JUnitPrinter' => $vendorDir . '/nette/tester/src/Runner/Output/JUnitPrinter.php', + 'Tester\\Runner\\Output\\Logger' => $vendorDir . '/nette/tester/src/Runner/Output/Logger.php', + 'Tester\\Runner\\Output\\TapPrinter' => $vendorDir . '/nette/tester/src/Runner/Output/TapPrinter.php', + 'Tester\\Runner\\PhpInterpreter' => $vendorDir . '/nette/tester/src/Runner/PhpInterpreter.php', + 'Tester\\Runner\\Runner' => $vendorDir . '/nette/tester/src/Runner/Runner.php', + 'Tester\\Runner\\Test' => $vendorDir . '/nette/tester/src/Runner/Test.php', + 'Tester\\Runner\\TestHandler' => $vendorDir . '/nette/tester/src/Runner/TestHandler.php', + 'Tester\\TestCase' => $vendorDir . '/nette/tester/src/Framework/TestCase.php', + 'Tester\\TestCaseException' => $vendorDir . '/nette/tester/src/Framework/TestCase.php', + 'Tracy\\Bar' => $vendorDir . '/tracy/tracy/src/Tracy/Bar/Bar.php', + 'Tracy\\BlueScreen' => $vendorDir . '/tracy/tracy/src/Tracy/BlueScreen/BlueScreen.php', + 'Tracy\\Bridges\\Nette\\Bridge' => $vendorDir . '/tracy/tracy/src/Bridges/Nette/Bridge.php', + 'Tracy\\Bridges\\Nette\\MailSender' => $vendorDir . '/tracy/tracy/src/Bridges/Nette/MailSender.php', + 'Tracy\\Bridges\\Nette\\TracyExtension' => $vendorDir . '/tracy/tracy/src/Bridges/Nette/TracyExtension.php', + 'Tracy\\Bridges\\Psr\\PsrToTracyLoggerAdapter' => $vendorDir . '/tracy/tracy/src/Bridges/Psr/PsrToTracyLoggerAdapter.php', + 'Tracy\\Bridges\\Psr\\TracyToPsrLoggerAdapter' => $vendorDir . '/tracy/tracy/src/Bridges/Psr/TracyToPsrLoggerAdapter.php', + 'Tracy\\Debugger' => $vendorDir . '/tracy/tracy/src/Tracy/Debugger/Debugger.php', + 'Tracy\\DefaultBarPanel' => $vendorDir . '/tracy/tracy/src/Tracy/Bar/DefaultBarPanel.php', + 'Tracy\\Dumper' => $vendorDir . '/tracy/tracy/src/Tracy/Dumper/Dumper.php', + 'Tracy\\FireLogger' => $vendorDir . '/tracy/tracy/src/Tracy/Logger/FireLogger.php', + 'Tracy\\Helpers' => $vendorDir . '/tracy/tracy/src/Tracy/Helpers.php', + 'Tracy\\IBarPanel' => $vendorDir . '/tracy/tracy/src/Tracy/Bar/IBarPanel.php', + 'Tracy\\ILogger' => $vendorDir . '/tracy/tracy/src/Tracy/Logger/ILogger.php', + 'Tracy\\Logger' => $vendorDir . '/tracy/tracy/src/Tracy/Logger/Logger.php', + 'Tracy\\OutputDebugger' => $vendorDir . '/tracy/tracy/src/Tracy/OutputDebugger/OutputDebugger.php', +); diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php new file mode 100644 index 0000000..c04a51f --- /dev/null +++ b/vendor/composer/autoload_files.php @@ -0,0 +1,12 @@ + $vendorDir . '/tracy/tracy/src/Tracy/shortcuts.php', + 'a12da592622097d2b593a430e32e13fd' => $vendorDir . '/nette/utils/src/loader.php', + 'e7a6fd2e7a869bb207158e9416bdd9b0' => $vendorDir . '/nette/application/src/compatibility.php', +); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php new file mode 100644 index 0000000..b7fc012 --- /dev/null +++ b/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit1e4e7be4b54097efddcd9fd472eda330::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInit1e4e7be4b54097efddcd9fd472eda330::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequire1e4e7be4b54097efddcd9fd472eda330($fileIdentifier, $file); + } + + return $loader; + } +} + +function composerRequire1e4e7be4b54097efddcd9fd472eda330($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + } +} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php new file mode 100644 index 0000000..a8d70d5 --- /dev/null +++ b/vendor/composer/autoload_static.php @@ -0,0 +1,390 @@ + __DIR__ . '/..' . '/tracy/tracy/src/Tracy/shortcuts.php', + 'a12da592622097d2b593a430e32e13fd' => __DIR__ . '/..' . '/nette/utils/src/loader.php', + 'e7a6fd2e7a869bb207158e9416bdd9b0' => __DIR__ . '/..' . '/nette/application/src/compatibility.php', + ); + + public static $classMap = array ( + 'Latte\\CompileException' => __DIR__ . '/..' . '/latte/latte/src/Latte/exceptions.php', + 'Latte\\Compiler' => __DIR__ . '/..' . '/latte/latte/src/Latte/Compiler/Compiler.php', + 'Latte\\Engine' => __DIR__ . '/..' . '/latte/latte/src/Latte/Engine.php', + 'Latte\\Helpers' => __DIR__ . '/..' . '/latte/latte/src/Latte/Helpers.php', + 'Latte\\HtmlNode' => __DIR__ . '/..' . '/latte/latte/src/Latte/Compiler/HtmlNode.php', + 'Latte\\ILoader' => __DIR__ . '/..' . '/latte/latte/src/Latte/ILoader.php', + 'Latte\\IMacro' => __DIR__ . '/..' . '/latte/latte/src/Latte/IMacro.php', + 'Latte\\Loaders\\FileLoader' => __DIR__ . '/..' . '/latte/latte/src/Latte/Loaders/FileLoader.php', + 'Latte\\Loaders\\StringLoader' => __DIR__ . '/..' . '/latte/latte/src/Latte/Loaders/StringLoader.php', + 'Latte\\MacroNode' => __DIR__ . '/..' . '/latte/latte/src/Latte/Compiler/MacroNode.php', + 'Latte\\MacroTokens' => __DIR__ . '/..' . '/latte/latte/src/Latte/Compiler/MacroTokens.php', + 'Latte\\Macros\\BlockMacros' => __DIR__ . '/..' . '/latte/latte/src/Latte/Macros/BlockMacros.php', + 'Latte\\Macros\\CoreMacros' => __DIR__ . '/..' . '/latte/latte/src/Latte/Macros/CoreMacros.php', + 'Latte\\Macros\\MacroSet' => __DIR__ . '/..' . '/latte/latte/src/Latte/Macros/MacroSet.php', + 'Latte\\Parser' => __DIR__ . '/..' . '/latte/latte/src/Latte/Compiler/Parser.php', + 'Latte\\PhpHelpers' => __DIR__ . '/..' . '/latte/latte/src/Latte/Compiler/PhpHelpers.php', + 'Latte\\PhpWriter' => __DIR__ . '/..' . '/latte/latte/src/Latte/Compiler/PhpWriter.php', + 'Latte\\RegexpException' => __DIR__ . '/..' . '/latte/latte/src/Latte/exceptions.php', + 'Latte\\RuntimeException' => __DIR__ . '/..' . '/latte/latte/src/Latte/exceptions.php', + 'Latte\\Runtime\\CachingIterator' => __DIR__ . '/..' . '/latte/latte/src/Latte/Runtime/CachingIterator.php', + 'Latte\\Runtime\\FilterExecutor' => __DIR__ . '/..' . '/latte/latte/src/Latte/Runtime/FilterExecutor.php', + 'Latte\\Runtime\\FilterInfo' => __DIR__ . '/..' . '/latte/latte/src/Latte/Runtime/FilterInfo.php', + 'Latte\\Runtime\\Filters' => __DIR__ . '/..' . '/latte/latte/src/Latte/Runtime/Filters.php', + 'Latte\\Runtime\\Html' => __DIR__ . '/..' . '/latte/latte/src/Latte/Runtime/Html.php', + 'Latte\\Runtime\\IHtmlString' => __DIR__ . '/..' . '/latte/latte/src/Latte/Runtime/IHtmlString.php', + 'Latte\\Runtime\\ISnippetBridge' => __DIR__ . '/..' . '/latte/latte/src/Latte/Runtime/ISnippetBridge.php', + 'Latte\\Runtime\\SnippetDriver' => __DIR__ . '/..' . '/latte/latte/src/Latte/Runtime/SnippetDriver.php', + 'Latte\\Runtime\\Template' => __DIR__ . '/..' . '/latte/latte/src/Latte/Runtime/Template.php', + 'Latte\\Strict' => __DIR__ . '/..' . '/latte/latte/src/Latte/Strict.php', + 'Latte\\Token' => __DIR__ . '/..' . '/latte/latte/src/Latte/Compiler/Token.php', + 'Latte\\TokenIterator' => __DIR__ . '/..' . '/latte/latte/src/Latte/Compiler/TokenIterator.php', + 'Latte\\Tokenizer' => __DIR__ . '/..' . '/latte/latte/src/Latte/Compiler/Tokenizer.php', + 'NetteModule\\ErrorPresenter' => __DIR__ . '/..' . '/nette/application/src/Application/ErrorPresenter.php', + 'NetteModule\\MicroPresenter' => __DIR__ . '/..' . '/nette/application/src/Application/MicroPresenter.php', + 'Nette\\Application\\AbortException' => __DIR__ . '/..' . '/nette/application/src/Application/exceptions.php', + 'Nette\\Application\\Application' => __DIR__ . '/..' . '/nette/application/src/Application/Application.php', + 'Nette\\Application\\ApplicationException' => __DIR__ . '/..' . '/nette/application/src/Application/exceptions.php', + 'Nette\\Application\\BadRequestException' => __DIR__ . '/..' . '/nette/application/src/Application/exceptions.php', + 'Nette\\Application\\ForbiddenRequestException' => __DIR__ . '/..' . '/nette/application/src/Application/exceptions.php', + 'Nette\\Application\\Helpers' => __DIR__ . '/..' . '/nette/application/src/Application/Helpers.php', + 'Nette\\Application\\IPresenter' => __DIR__ . '/..' . '/nette/application/src/Application/IPresenter.php', + 'Nette\\Application\\IPresenterFactory' => __DIR__ . '/..' . '/nette/application/src/Application/IPresenterFactory.php', + 'Nette\\Application\\IResponse' => __DIR__ . '/..' . '/nette/application/src/Application/IResponse.php', + 'Nette\\Application\\IRouter' => __DIR__ . '/..' . '/nette/application/src/Application/IRouter.php', + 'Nette\\Application\\InvalidPresenterException' => __DIR__ . '/..' . '/nette/application/src/Application/exceptions.php', + 'Nette\\Application\\LinkGenerator' => __DIR__ . '/..' . '/nette/application/src/Application/LinkGenerator.php', + 'Nette\\Application\\PresenterFactory' => __DIR__ . '/..' . '/nette/application/src/Application/PresenterFactory.php', + 'Nette\\Application\\Request' => __DIR__ . '/..' . '/nette/application/src/Application/Request.php', + 'Nette\\Application\\Responses\\CallbackResponse' => __DIR__ . '/..' . '/nette/application/src/Application/Responses/CallbackResponse.php', + 'Nette\\Application\\Responses\\FileResponse' => __DIR__ . '/..' . '/nette/application/src/Application/Responses/FileResponse.php', + 'Nette\\Application\\Responses\\ForwardResponse' => __DIR__ . '/..' . '/nette/application/src/Application/Responses/ForwardResponse.php', + 'Nette\\Application\\Responses\\JsonResponse' => __DIR__ . '/..' . '/nette/application/src/Application/Responses/JsonResponse.php', + 'Nette\\Application\\Responses\\RedirectResponse' => __DIR__ . '/..' . '/nette/application/src/Application/Responses/RedirectResponse.php', + 'Nette\\Application\\Responses\\TextResponse' => __DIR__ . '/..' . '/nette/application/src/Application/Responses/TextResponse.php', + 'Nette\\Application\\Routers\\CliRouter' => __DIR__ . '/..' . '/nette/application/src/Application/Routers/CliRouter.php', + 'Nette\\Application\\Routers\\Route' => __DIR__ . '/..' . '/nette/application/src/Application/Routers/Route.php', + 'Nette\\Application\\Routers\\RouteList' => __DIR__ . '/..' . '/nette/application/src/Application/Routers/RouteList.php', + 'Nette\\Application\\Routers\\SimpleRouter' => __DIR__ . '/..' . '/nette/application/src/Application/Routers/SimpleRouter.php', + 'Nette\\Application\\UI\\BadSignalException' => __DIR__ . '/..' . '/nette/application/src/Application/UI/BadSignalException.php', + 'Nette\\Application\\UI\\Component' => __DIR__ . '/..' . '/nette/application/src/Application/UI/Component.php', + 'Nette\\Application\\UI\\ComponentReflection' => __DIR__ . '/..' . '/nette/application/src/Application/UI/ComponentReflection.php', + 'Nette\\Application\\UI\\Control' => __DIR__ . '/..' . '/nette/application/src/Application/UI/Control.php', + 'Nette\\Application\\UI\\Form' => __DIR__ . '/..' . '/nette/application/src/Application/UI/Form.php', + 'Nette\\Application\\UI\\IRenderable' => __DIR__ . '/..' . '/nette/application/src/Application/UI/IRenderable.php', + 'Nette\\Application\\UI\\ISignalReceiver' => __DIR__ . '/..' . '/nette/application/src/Application/UI/ISignalReceiver.php', + 'Nette\\Application\\UI\\IStatePersistent' => __DIR__ . '/..' . '/nette/application/src/Application/UI/IStatePersistent.php', + 'Nette\\Application\\UI\\ITemplate' => __DIR__ . '/..' . '/nette/application/src/Application/UI/ITemplate.php', + 'Nette\\Application\\UI\\ITemplateFactory' => __DIR__ . '/..' . '/nette/application/src/Application/UI/ITemplateFactory.php', + 'Nette\\Application\\UI\\InvalidLinkException' => __DIR__ . '/..' . '/nette/application/src/Application/UI/InvalidLinkException.php', + 'Nette\\Application\\UI\\Link' => __DIR__ . '/..' . '/nette/application/src/Application/UI/Link.php', + 'Nette\\Application\\UI\\MethodReflection' => __DIR__ . '/..' . '/nette/application/src/Application/UI/MethodReflection.php', + 'Nette\\Application\\UI\\Multiplier' => __DIR__ . '/..' . '/nette/application/src/Application/UI/Multiplier.php', + 'Nette\\Application\\UI\\Presenter' => __DIR__ . '/..' . '/nette/application/src/Application/UI/Presenter.php', + 'Nette\\ArgumentOutOfRangeException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\Bridges\\ApplicationDI\\ApplicationExtension' => __DIR__ . '/..' . '/nette/application/src/Bridges/ApplicationDI/ApplicationExtension.php', + 'Nette\\Bridges\\ApplicationDI\\LatteExtension' => __DIR__ . '/..' . '/nette/application/src/Bridges/ApplicationDI/LatteExtension.php', + 'Nette\\Bridges\\ApplicationDI\\PresenterFactoryCallback' => __DIR__ . '/..' . '/nette/application/src/Bridges/ApplicationDI/PresenterFactoryCallback.php', + 'Nette\\Bridges\\ApplicationDI\\RoutingExtension' => __DIR__ . '/..' . '/nette/application/src/Bridges/ApplicationDI/RoutingExtension.php', + 'Nette\\Bridges\\ApplicationLatte\\ILatteFactory' => __DIR__ . '/..' . '/nette/application/src/Bridges/ApplicationLatte/ILatteFactory.php', + 'Nette\\Bridges\\ApplicationLatte\\Loader' => __DIR__ . '/..' . '/nette/application/src/Bridges/ApplicationLatte/Loader.php', + 'Nette\\Bridges\\ApplicationLatte\\SnippetBridge' => __DIR__ . '/..' . '/nette/application/src/Bridges/ApplicationLatte/SnippetBridge.php', + 'Nette\\Bridges\\ApplicationLatte\\Template' => __DIR__ . '/..' . '/nette/application/src/Bridges/ApplicationLatte/Template.php', + 'Nette\\Bridges\\ApplicationLatte\\TemplateFactory' => __DIR__ . '/..' . '/nette/application/src/Bridges/ApplicationLatte/TemplateFactory.php', + 'Nette\\Bridges\\ApplicationLatte\\UIMacros' => __DIR__ . '/..' . '/nette/application/src/Bridges/ApplicationLatte/UIMacros.php', + 'Nette\\Bridges\\ApplicationLatte\\UIRuntime' => __DIR__ . '/..' . '/nette/application/src/Bridges/ApplicationLatte/UIRuntime.php', + 'Nette\\Bridges\\ApplicationTracy\\RoutingPanel' => __DIR__ . '/..' . '/nette/application/src/Bridges/ApplicationTracy/RoutingPanel.php', + 'Nette\\Bridges\\CacheDI\\CacheExtension' => __DIR__ . '/..' . '/nette/caching/src/Bridges/CacheDI/CacheExtension.php', + 'Nette\\Bridges\\CacheLatte\\CacheMacro' => __DIR__ . '/..' . '/nette/caching/src/Bridges/CacheLatte/CacheMacro.php', + 'Nette\\Bridges\\DITracy\\ContainerPanel' => __DIR__ . '/..' . '/nette/di/src/Bridges/DITracy/ContainerPanel.php', + 'Nette\\Bridges\\DatabaseDI\\DatabaseExtension' => __DIR__ . '/..' . '/nette/database/src/Bridges/DatabaseDI/DatabaseExtension.php', + 'Nette\\Bridges\\DatabaseTracy\\ConnectionPanel' => __DIR__ . '/..' . '/nette/database/src/Bridges/DatabaseTracy/ConnectionPanel.php', + 'Nette\\Bridges\\FormsDI\\FormsExtension' => __DIR__ . '/..' . '/nette/forms/src/Bridges/FormsDI/FormsExtension.php', + 'Nette\\Bridges\\FormsLatte\\FormMacros' => __DIR__ . '/..' . '/nette/forms/src/Bridges/FormsLatte/FormMacros.php', + 'Nette\\Bridges\\FormsLatte\\Runtime' => __DIR__ . '/..' . '/nette/forms/src/Bridges/FormsLatte/Runtime.php', + 'Nette\\Bridges\\Framework\\TracyBridge' => __DIR__ . '/..' . '/nette/bootstrap/src/Bridges/Framework/TracyBridge.php', + 'Nette\\Bridges\\HttpDI\\HttpExtension' => __DIR__ . '/..' . '/nette/http/src/Bridges/HttpDI/HttpExtension.php', + 'Nette\\Bridges\\HttpDI\\SessionExtension' => __DIR__ . '/..' . '/nette/http/src/Bridges/HttpDI/SessionExtension.php', + 'Nette\\Bridges\\HttpTracy\\SessionPanel' => __DIR__ . '/..' . '/nette/http/src/Bridges/HttpTracy/SessionPanel.php', + 'Nette\\Bridges\\MailDI\\MailExtension' => __DIR__ . '/..' . '/nette/mail/src/Bridges/MailDI/MailExtension.php', + 'Nette\\Bridges\\ReflectionDI\\ReflectionExtension' => __DIR__ . '/..' . '/nette/reflection/src/Bridges/ReflectionDI/ReflectionExtension.php', + 'Nette\\Bridges\\SecurityDI\\SecurityExtension' => __DIR__ . '/..' . '/nette/security/src/Bridges/SecurityDI/SecurityExtension.php', + 'Nette\\Bridges\\SecurityTracy\\UserPanel' => __DIR__ . '/..' . '/nette/security/src/Bridges/SecurityTracy/UserPanel.php', + 'Nette\\Caching\\Cache' => __DIR__ . '/..' . '/nette/caching/src/Caching/Cache.php', + 'Nette\\Caching\\IBulkReader' => __DIR__ . '/..' . '/nette/caching/src/Caching/IBulkReader.php', + 'Nette\\Caching\\IStorage' => __DIR__ . '/..' . '/nette/caching/src/Caching/IStorage.php', + 'Nette\\Caching\\OutputHelper' => __DIR__ . '/..' . '/nette/caching/src/Caching/OutputHelper.php', + 'Nette\\Caching\\Storages\\DevNullStorage' => __DIR__ . '/..' . '/nette/caching/src/Caching/Storages/DevNullStorage.php', + 'Nette\\Caching\\Storages\\FileStorage' => __DIR__ . '/..' . '/nette/caching/src/Caching/Storages/FileStorage.php', + 'Nette\\Caching\\Storages\\IJournal' => __DIR__ . '/..' . '/nette/caching/src/Caching/Storages/IJournal.php', + 'Nette\\Caching\\Storages\\MemcachedStorage' => __DIR__ . '/..' . '/nette/caching/src/Caching/Storages/MemcachedStorage.php', + 'Nette\\Caching\\Storages\\MemoryStorage' => __DIR__ . '/..' . '/nette/caching/src/Caching/Storages/MemoryStorage.php', + 'Nette\\Caching\\Storages\\NewMemcachedStorage' => __DIR__ . '/..' . '/nette/caching/src/Caching/Storages/NewMemcachedStorage.php', + 'Nette\\Caching\\Storages\\SQLiteJournal' => __DIR__ . '/..' . '/nette/caching/src/Caching/Storages/SQLiteJournal.php', + 'Nette\\Caching\\Storages\\SQLiteStorage' => __DIR__ . '/..' . '/nette/caching/src/Caching/Storages/SQLiteStorage.php', + 'Nette\\ComponentModel\\ArrayAccess' => __DIR__ . '/..' . '/nette/component-model/src/ComponentModel/ArrayAccess.php', + 'Nette\\ComponentModel\\Component' => __DIR__ . '/..' . '/nette/component-model/src/ComponentModel/Component.php', + 'Nette\\ComponentModel\\Container' => __DIR__ . '/..' . '/nette/component-model/src/ComponentModel/Container.php', + 'Nette\\ComponentModel\\IComponent' => __DIR__ . '/..' . '/nette/component-model/src/ComponentModel/IComponent.php', + 'Nette\\ComponentModel\\IContainer' => __DIR__ . '/..' . '/nette/component-model/src/ComponentModel/IContainer.php', + 'Nette\\ComponentModel\\RecursiveComponentIterator' => __DIR__ . '/..' . '/nette/component-model/src/ComponentModel/RecursiveComponentIterator.php', + 'Nette\\Configurator' => __DIR__ . '/..' . '/nette/bootstrap/src/Bootstrap/Configurator.php', + 'Nette\\DI\\Compiler' => __DIR__ . '/..' . '/nette/di/src/DI/Compiler.php', + 'Nette\\DI\\CompilerExtension' => __DIR__ . '/..' . '/nette/di/src/DI/CompilerExtension.php', + 'Nette\\DI\\Config\\Adapters\\IniAdapter' => __DIR__ . '/..' . '/nette/di/src/DI/Config/Adapters/IniAdapter.php', + 'Nette\\DI\\Config\\Adapters\\NeonAdapter' => __DIR__ . '/..' . '/nette/di/src/DI/Config/Adapters/NeonAdapter.php', + 'Nette\\DI\\Config\\Adapters\\PhpAdapter' => __DIR__ . '/..' . '/nette/di/src/DI/Config/Adapters/PhpAdapter.php', + 'Nette\\DI\\Config\\Helpers' => __DIR__ . '/..' . '/nette/di/src/DI/Config/Helpers.php', + 'Nette\\DI\\Config\\IAdapter' => __DIR__ . '/..' . '/nette/di/src/DI/Config/IAdapter.php', + 'Nette\\DI\\Config\\Loader' => __DIR__ . '/..' . '/nette/di/src/DI/Config/Loader.php', + 'Nette\\DI\\Container' => __DIR__ . '/..' . '/nette/di/src/DI/Container.php', + 'Nette\\DI\\ContainerBuilder' => __DIR__ . '/..' . '/nette/di/src/DI/ContainerBuilder.php', + 'Nette\\DI\\ContainerLoader' => __DIR__ . '/..' . '/nette/di/src/DI/ContainerLoader.php', + 'Nette\\DI\\DependencyChecker' => __DIR__ . '/..' . '/nette/di/src/DI/DependencyChecker.php', + 'Nette\\DI\\Extensions\\ConstantsExtension' => __DIR__ . '/..' . '/nette/di/src/DI/Extensions/ConstantsExtension.php', + 'Nette\\DI\\Extensions\\DIExtension' => __DIR__ . '/..' . '/nette/di/src/DI/Extensions/DIExtension.php', + 'Nette\\DI\\Extensions\\DecoratorExtension' => __DIR__ . '/..' . '/nette/di/src/DI/Extensions/DecoratorExtension.php', + 'Nette\\DI\\Extensions\\ExtensionsExtension' => __DIR__ . '/..' . '/nette/di/src/DI/Extensions/ExtensionsExtension.php', + 'Nette\\DI\\Extensions\\InjectExtension' => __DIR__ . '/..' . '/nette/di/src/DI/Extensions/InjectExtension.php', + 'Nette\\DI\\Extensions\\PhpExtension' => __DIR__ . '/..' . '/nette/di/src/DI/Extensions/PhpExtension.php', + 'Nette\\DI\\Helpers' => __DIR__ . '/..' . '/nette/di/src/DI/Helpers.php', + 'Nette\\DI\\MissingServiceException' => __DIR__ . '/..' . '/nette/di/src/DI/exceptions.php', + 'Nette\\DI\\PhpGenerator' => __DIR__ . '/..' . '/nette/di/src/DI/PhpGenerator.php', + 'Nette\\DI\\PhpReflection' => __DIR__ . '/..' . '/nette/di/src/DI/PhpReflection.php', + 'Nette\\DI\\ServiceCreationException' => __DIR__ . '/..' . '/nette/di/src/DI/exceptions.php', + 'Nette\\DI\\ServiceDefinition' => __DIR__ . '/..' . '/nette/di/src/DI/ServiceDefinition.php', + 'Nette\\DI\\Statement' => __DIR__ . '/..' . '/nette/di/src/DI/Statement.php', + 'Nette\\Database\\Connection' => __DIR__ . '/..' . '/nette/database/src/Database/Connection.php', + 'Nette\\Database\\ConnectionException' => __DIR__ . '/..' . '/nette/database/src/Database/exceptions.php', + 'Nette\\Database\\ConstraintViolationException' => __DIR__ . '/..' . '/nette/database/src/Database/exceptions.php', + 'Nette\\Database\\Context' => __DIR__ . '/..' . '/nette/database/src/Database/Context.php', + 'Nette\\Database\\Conventions\\AmbiguousReferenceKeyException' => __DIR__ . '/..' . '/nette/database/src/Database/Conventions/AmbiguousReferenceKeyException.php', + 'Nette\\Database\\Conventions\\DiscoveredConventions' => __DIR__ . '/..' . '/nette/database/src/Database/Conventions/DiscoveredConventions.php', + 'Nette\\Database\\Conventions\\StaticConventions' => __DIR__ . '/..' . '/nette/database/src/Database/Conventions/StaticConventions.php', + 'Nette\\Database\\DriverException' => __DIR__ . '/..' . '/nette/database/src/Database/DriverException.php', + 'Nette\\Database\\Drivers\\MsSqlDriver' => __DIR__ . '/..' . '/nette/database/src/Database/Drivers/MsSqlDriver.php', + 'Nette\\Database\\Drivers\\MySqlDriver' => __DIR__ . '/..' . '/nette/database/src/Database/Drivers/MySqlDriver.php', + 'Nette\\Database\\Drivers\\OciDriver' => __DIR__ . '/..' . '/nette/database/src/Database/Drivers/OciDriver.php', + 'Nette\\Database\\Drivers\\OdbcDriver' => __DIR__ . '/..' . '/nette/database/src/Database/Drivers/OdbcDriver.php', + 'Nette\\Database\\Drivers\\PgSqlDriver' => __DIR__ . '/..' . '/nette/database/src/Database/Drivers/PgSqlDriver.php', + 'Nette\\Database\\Drivers\\Sqlite2Driver' => __DIR__ . '/..' . '/nette/database/src/Database/Drivers/Sqlite2Driver.php', + 'Nette\\Database\\Drivers\\SqliteDriver' => __DIR__ . '/..' . '/nette/database/src/Database/Drivers/SqliteDriver.php', + 'Nette\\Database\\Drivers\\SqlsrvDriver' => __DIR__ . '/..' . '/nette/database/src/Database/Drivers/SqlsrvDriver.php', + 'Nette\\Database\\ForeignKeyConstraintViolationException' => __DIR__ . '/..' . '/nette/database/src/Database/exceptions.php', + 'Nette\\Database\\Helpers' => __DIR__ . '/..' . '/nette/database/src/Database/Helpers.php', + 'Nette\\Database\\IConventions' => __DIR__ . '/..' . '/nette/database/src/Database/IConventions.php', + 'Nette\\Database\\IRow' => __DIR__ . '/..' . '/nette/database/src/Database/IRow.php', + 'Nette\\Database\\IRowContainer' => __DIR__ . '/..' . '/nette/database/src/Database/IRowContainer.php', + 'Nette\\Database\\IStructure' => __DIR__ . '/..' . '/nette/database/src/Database/IStructure.php', + 'Nette\\Database\\ISupplementalDriver' => __DIR__ . '/..' . '/nette/database/src/Database/ISupplementalDriver.php', + 'Nette\\Database\\NotNullConstraintViolationException' => __DIR__ . '/..' . '/nette/database/src/Database/exceptions.php', + 'Nette\\Database\\ResultSet' => __DIR__ . '/..' . '/nette/database/src/Database/ResultSet.php', + 'Nette\\Database\\Row' => __DIR__ . '/..' . '/nette/database/src/Database/Row.php', + 'Nette\\Database\\SqlLiteral' => __DIR__ . '/..' . '/nette/database/src/Database/SqlLiteral.php', + 'Nette\\Database\\SqlPreprocessor' => __DIR__ . '/..' . '/nette/database/src/Database/SqlPreprocessor.php', + 'Nette\\Database\\Structure' => __DIR__ . '/..' . '/nette/database/src/Database/Structure.php', + 'Nette\\Database\\Table\\ActiveRow' => __DIR__ . '/..' . '/nette/database/src/Database/Table/ActiveRow.php', + 'Nette\\Database\\Table\\GroupedSelection' => __DIR__ . '/..' . '/nette/database/src/Database/Table/GroupedSelection.php', + 'Nette\\Database\\Table\\IRow' => __DIR__ . '/..' . '/nette/database/src/Database/Table/IRow.php', + 'Nette\\Database\\Table\\IRowContainer' => __DIR__ . '/..' . '/nette/database/src/Database/Table/IRowContainer.php', + 'Nette\\Database\\Table\\Selection' => __DIR__ . '/..' . '/nette/database/src/Database/Table/Selection.php', + 'Nette\\Database\\Table\\SqlBuilder' => __DIR__ . '/..' . '/nette/database/src/Database/Table/SqlBuilder.php', + 'Nette\\Database\\UniqueConstraintViolationException' => __DIR__ . '/..' . '/nette/database/src/Database/exceptions.php', + 'Nette\\DeprecatedException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\DirectoryNotFoundException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\FileNotFoundException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\Forms\\Container' => __DIR__ . '/..' . '/nette/forms/src/Forms/Container.php', + 'Nette\\Forms\\ControlGroup' => __DIR__ . '/..' . '/nette/forms/src/Forms/ControlGroup.php', + 'Nette\\Forms\\Controls\\BaseControl' => __DIR__ . '/..' . '/nette/forms/src/Forms/Controls/BaseControl.php', + 'Nette\\Forms\\Controls\\Button' => __DIR__ . '/..' . '/nette/forms/src/Forms/Controls/Button.php', + 'Nette\\Forms\\Controls\\Checkbox' => __DIR__ . '/..' . '/nette/forms/src/Forms/Controls/Checkbox.php', + 'Nette\\Forms\\Controls\\CheckboxList' => __DIR__ . '/..' . '/nette/forms/src/Forms/Controls/CheckboxList.php', + 'Nette\\Forms\\Controls\\ChoiceControl' => __DIR__ . '/..' . '/nette/forms/src/Forms/Controls/ChoiceControl.php', + 'Nette\\Forms\\Controls\\CsrfProtection' => __DIR__ . '/..' . '/nette/forms/src/Forms/Controls/CsrfProtection.php', + 'Nette\\Forms\\Controls\\HiddenField' => __DIR__ . '/..' . '/nette/forms/src/Forms/Controls/HiddenField.php', + 'Nette\\Forms\\Controls\\ImageButton' => __DIR__ . '/..' . '/nette/forms/src/Forms/Controls/ImageButton.php', + 'Nette\\Forms\\Controls\\MultiChoiceControl' => __DIR__ . '/..' . '/nette/forms/src/Forms/Controls/MultiChoiceControl.php', + 'Nette\\Forms\\Controls\\MultiSelectBox' => __DIR__ . '/..' . '/nette/forms/src/Forms/Controls/MultiSelectBox.php', + 'Nette\\Forms\\Controls\\RadioList' => __DIR__ . '/..' . '/nette/forms/src/Forms/Controls/RadioList.php', + 'Nette\\Forms\\Controls\\SelectBox' => __DIR__ . '/..' . '/nette/forms/src/Forms/Controls/SelectBox.php', + 'Nette\\Forms\\Controls\\SubmitButton' => __DIR__ . '/..' . '/nette/forms/src/Forms/Controls/SubmitButton.php', + 'Nette\\Forms\\Controls\\TextArea' => __DIR__ . '/..' . '/nette/forms/src/Forms/Controls/TextArea.php', + 'Nette\\Forms\\Controls\\TextBase' => __DIR__ . '/..' . '/nette/forms/src/Forms/Controls/TextBase.php', + 'Nette\\Forms\\Controls\\TextInput' => __DIR__ . '/..' . '/nette/forms/src/Forms/Controls/TextInput.php', + 'Nette\\Forms\\Controls\\UploadControl' => __DIR__ . '/..' . '/nette/forms/src/Forms/Controls/UploadControl.php', + 'Nette\\Forms\\Form' => __DIR__ . '/..' . '/nette/forms/src/Forms/Form.php', + 'Nette\\Forms\\Helpers' => __DIR__ . '/..' . '/nette/forms/src/Forms/Helpers.php', + 'Nette\\Forms\\IControl' => __DIR__ . '/..' . '/nette/forms/src/Forms/IControl.php', + 'Nette\\Forms\\IFormRenderer' => __DIR__ . '/..' . '/nette/forms/src/Forms/IFormRenderer.php', + 'Nette\\Forms\\ISubmitterControl' => __DIR__ . '/..' . '/nette/forms/src/Forms/ISubmitterControl.php', + 'Nette\\Forms\\Rendering\\DefaultFormRenderer' => __DIR__ . '/..' . '/nette/forms/src/Forms/Rendering/DefaultFormRenderer.php', + 'Nette\\Forms\\Rule' => __DIR__ . '/..' . '/nette/forms/src/Forms/Rule.php', + 'Nette\\Forms\\Rules' => __DIR__ . '/..' . '/nette/forms/src/Forms/Rules.php', + 'Nette\\Forms\\Validator' => __DIR__ . '/..' . '/nette/forms/src/Forms/Validator.php', + 'Nette\\Http\\Context' => __DIR__ . '/..' . '/nette/http/src/Http/Context.php', + 'Nette\\Http\\FileUpload' => __DIR__ . '/..' . '/nette/http/src/Http/FileUpload.php', + 'Nette\\Http\\Helpers' => __DIR__ . '/..' . '/nette/http/src/Http/Helpers.php', + 'Nette\\Http\\IRequest' => __DIR__ . '/..' . '/nette/http/src/Http/IRequest.php', + 'Nette\\Http\\IResponse' => __DIR__ . '/..' . '/nette/http/src/Http/IResponse.php', + 'Nette\\Http\\ISessionStorage' => __DIR__ . '/..' . '/nette/http/src/Http/ISessionStorage.php', + 'Nette\\Http\\Request' => __DIR__ . '/..' . '/nette/http/src/Http/Request.php', + 'Nette\\Http\\RequestFactory' => __DIR__ . '/..' . '/nette/http/src/Http/RequestFactory.php', + 'Nette\\Http\\Response' => __DIR__ . '/..' . '/nette/http/src/Http/Response.php', + 'Nette\\Http\\Session' => __DIR__ . '/..' . '/nette/http/src/Http/Session.php', + 'Nette\\Http\\SessionSection' => __DIR__ . '/..' . '/nette/http/src/Http/SessionSection.php', + 'Nette\\Http\\Url' => __DIR__ . '/..' . '/nette/http/src/Http/Url.php', + 'Nette\\Http\\UrlScript' => __DIR__ . '/..' . '/nette/http/src/Http/UrlScript.php', + 'Nette\\Http\\UserStorage' => __DIR__ . '/..' . '/nette/http/src/Http/UserStorage.php', + 'Nette\\IOException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\InvalidArgumentException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\InvalidStateException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\Iterators\\CachingIterator' => __DIR__ . '/..' . '/nette/utils/src/Iterators/CachingIterator.php', + 'Nette\\Iterators\\Mapper' => __DIR__ . '/..' . '/nette/utils/src/Iterators/Mapper.php', + 'Nette\\LegacyObject' => __DIR__ . '/..' . '/nette/utils/src/Utils/LegacyObject.php', + 'Nette\\Loaders\\RobotLoader' => __DIR__ . '/..' . '/nette/robot-loader/src/RobotLoader/RobotLoader.php', + 'Nette\\Localization\\ITranslator' => __DIR__ . '/..' . '/nette/utils/src/Utils/ITranslator.php', + 'Nette\\Mail\\FallbackMailer' => __DIR__ . '/..' . '/nette/mail/src/Mail/FallbackMailer.php', + 'Nette\\Mail\\FallbackMailerException' => __DIR__ . '/..' . '/nette/mail/src/Mail/exceptions.php', + 'Nette\\Mail\\IMailer' => __DIR__ . '/..' . '/nette/mail/src/Mail/IMailer.php', + 'Nette\\Mail\\Message' => __DIR__ . '/..' . '/nette/mail/src/Mail/Message.php', + 'Nette\\Mail\\MimePart' => __DIR__ . '/..' . '/nette/mail/src/Mail/MimePart.php', + 'Nette\\Mail\\SendException' => __DIR__ . '/..' . '/nette/mail/src/Mail/exceptions.php', + 'Nette\\Mail\\SendmailMailer' => __DIR__ . '/..' . '/nette/mail/src/Mail/SendmailMailer.php', + 'Nette\\Mail\\SmtpException' => __DIR__ . '/..' . '/nette/mail/src/Mail/exceptions.php', + 'Nette\\Mail\\SmtpMailer' => __DIR__ . '/..' . '/nette/mail/src/Mail/SmtpMailer.php', + 'Nette\\MemberAccessException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\Neon\\Decoder' => __DIR__ . '/..' . '/nette/neon/src/Neon/Decoder.php', + 'Nette\\Neon\\Encoder' => __DIR__ . '/..' . '/nette/neon/src/Neon/Encoder.php', + 'Nette\\Neon\\Entity' => __DIR__ . '/..' . '/nette/neon/src/Neon/Entity.php', + 'Nette\\Neon\\Exception' => __DIR__ . '/..' . '/nette/neon/src/Neon/Exception.php', + 'Nette\\Neon\\Neon' => __DIR__ . '/..' . '/nette/neon/src/Neon/Neon.php', + 'Nette\\NotImplementedException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\NotSupportedException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\OutOfRangeException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\PhpGenerator\\ClassType' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/ClassType.php', + 'Nette\\PhpGenerator\\Closure' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Closure.php', + 'Nette\\PhpGenerator\\Constant' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Constant.php', + 'Nette\\PhpGenerator\\Factory' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Factory.php', + 'Nette\\PhpGenerator\\GlobalFunction' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/GlobalFunction.php', + 'Nette\\PhpGenerator\\Helpers' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Helpers.php', + 'Nette\\PhpGenerator\\Method' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Method.php', + 'Nette\\PhpGenerator\\Parameter' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Parameter.php', + 'Nette\\PhpGenerator\\PhpFile' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/PhpFile.php', + 'Nette\\PhpGenerator\\PhpLiteral' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/PhpLiteral.php', + 'Nette\\PhpGenerator\\PhpNamespace' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/PhpNamespace.php', + 'Nette\\PhpGenerator\\Printer' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Printer.php', + 'Nette\\PhpGenerator\\Property' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Property.php', + 'Nette\\PhpGenerator\\PsrPrinter' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/PsrPrinter.php', + 'Nette\\PhpGenerator\\Traits\\CommentAware' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Traits/CommentAware.php', + 'Nette\\PhpGenerator\\Traits\\FunctionLike' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Traits/FunctionLike.php', + 'Nette\\PhpGenerator\\Traits\\NameAware' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Traits/NameAware.php', + 'Nette\\PhpGenerator\\Traits\\VisibilityAware' => __DIR__ . '/..' . '/nette/php-generator/src/PhpGenerator/Traits/VisibilityAware.php', + 'Nette\\Reflection\\Annotation' => __DIR__ . '/..' . '/nette/reflection/src/Reflection/Annotation.php', + 'Nette\\Reflection\\AnnotationsParser' => __DIR__ . '/..' . '/nette/reflection/src/Reflection/AnnotationsParser.php', + 'Nette\\Reflection\\ClassType' => __DIR__ . '/..' . '/nette/reflection/src/Reflection/ClassType.php', + 'Nette\\Reflection\\Extension' => __DIR__ . '/..' . '/nette/reflection/src/Reflection/Extension.php', + 'Nette\\Reflection\\GlobalFunction' => __DIR__ . '/..' . '/nette/reflection/src/Reflection/GlobalFunction.php', + 'Nette\\Reflection\\Helpers' => __DIR__ . '/..' . '/nette/reflection/src/Reflection/Helpers.php', + 'Nette\\Reflection\\IAnnotation' => __DIR__ . '/..' . '/nette/reflection/src/Reflection/IAnnotation.php', + 'Nette\\Reflection\\Method' => __DIR__ . '/..' . '/nette/reflection/src/Reflection/Method.php', + 'Nette\\Reflection\\Parameter' => __DIR__ . '/..' . '/nette/reflection/src/Reflection/Parameter.php', + 'Nette\\Reflection\\Property' => __DIR__ . '/..' . '/nette/reflection/src/Reflection/Property.php', + 'Nette\\Security\\AuthenticationException' => __DIR__ . '/..' . '/nette/security/src/Security/AuthenticationException.php', + 'Nette\\Security\\IAuthenticator' => __DIR__ . '/..' . '/nette/security/src/Security/IAuthenticator.php', + 'Nette\\Security\\IAuthorizator' => __DIR__ . '/..' . '/nette/security/src/Security/IAuthorizator.php', + 'Nette\\Security\\IIdentity' => __DIR__ . '/..' . '/nette/security/src/Security/IIdentity.php', + 'Nette\\Security\\IResource' => __DIR__ . '/..' . '/nette/security/src/Security/IResource.php', + 'Nette\\Security\\IRole' => __DIR__ . '/..' . '/nette/security/src/Security/IRole.php', + 'Nette\\Security\\IUserStorage' => __DIR__ . '/..' . '/nette/security/src/Security/IUserStorage.php', + 'Nette\\Security\\Identity' => __DIR__ . '/..' . '/nette/security/src/Security/Identity.php', + 'Nette\\Security\\Passwords' => __DIR__ . '/..' . '/nette/security/src/Security/Passwords.php', + 'Nette\\Security\\Permission' => __DIR__ . '/..' . '/nette/security/src/Security/Permission.php', + 'Nette\\Security\\SimpleAuthenticator' => __DIR__ . '/..' . '/nette/security/src/Security/SimpleAuthenticator.php', + 'Nette\\Security\\User' => __DIR__ . '/..' . '/nette/security/src/Security/User.php', + 'Nette\\SmartObject' => __DIR__ . '/..' . '/nette/utils/src/Utils/SmartObject.php', + 'Nette\\StaticClass' => __DIR__ . '/..' . '/nette/utils/src/Utils/StaticClass.php', + 'Nette\\StaticClassException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\UnexpectedValueException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\Utils\\ArrayHash' => __DIR__ . '/..' . '/nette/utils/src/Utils/ArrayHash.php', + 'Nette\\Utils\\ArrayList' => __DIR__ . '/..' . '/nette/utils/src/Utils/ArrayList.php', + 'Nette\\Utils\\Arrays' => __DIR__ . '/..' . '/nette/utils/src/Utils/Arrays.php', + 'Nette\\Utils\\AssertionException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\Utils\\Callback' => __DIR__ . '/..' . '/nette/utils/src/Utils/Callback.php', + 'Nette\\Utils\\DateTime' => __DIR__ . '/..' . '/nette/utils/src/Utils/DateTime.php', + 'Nette\\Utils\\FileSystem' => __DIR__ . '/..' . '/nette/utils/src/Utils/FileSystem.php', + 'Nette\\Utils\\Finder' => __DIR__ . '/..' . '/nette/finder/src/Utils/Finder.php', + 'Nette\\Utils\\Html' => __DIR__ . '/..' . '/nette/utils/src/Utils/Html.php', + 'Nette\\Utils\\IHtmlString' => __DIR__ . '/..' . '/nette/utils/src/Utils/IHtmlString.php', + 'Nette\\Utils\\Image' => __DIR__ . '/..' . '/nette/utils/src/Utils/Image.php', + 'Nette\\Utils\\ImageException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\Utils\\Json' => __DIR__ . '/..' . '/nette/utils/src/Utils/Json.php', + 'Nette\\Utils\\JsonException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\Utils\\ObjectHelpers' => __DIR__ . '/..' . '/nette/utils/src/Utils/ObjectHelpers.php', + 'Nette\\Utils\\ObjectMixin' => __DIR__ . '/..' . '/nette/utils/src/Utils/ObjectMixin.php', + 'Nette\\Utils\\Paginator' => __DIR__ . '/..' . '/nette/utils/src/Utils/Paginator.php', + 'Nette\\Utils\\Random' => __DIR__ . '/..' . '/nette/utils/src/Utils/Random.php', + 'Nette\\Utils\\Reflection' => __DIR__ . '/..' . '/nette/utils/src/Utils/Reflection.php', + 'Nette\\Utils\\RegexpException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\Utils\\Strings' => __DIR__ . '/..' . '/nette/utils/src/Utils/Strings.php', + 'Nette\\Utils\\UnknownImageFileException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php', + 'Nette\\Utils\\Validators' => __DIR__ . '/..' . '/nette/utils/src/Utils/Validators.php', + 'Tester\\Assert' => __DIR__ . '/..' . '/nette/tester/src/Framework/Assert.php', + 'Tester\\AssertException' => __DIR__ . '/..' . '/nette/tester/src/Framework/AssertException.php', + 'Tester\\CodeCoverage\\Collector' => __DIR__ . '/..' . '/nette/tester/src/CodeCoverage/Collector.php', + 'Tester\\CodeCoverage\\Generators\\AbstractGenerator' => __DIR__ . '/..' . '/nette/tester/src/CodeCoverage/Generators/AbstractGenerator.php', + 'Tester\\CodeCoverage\\Generators\\CloverXMLGenerator' => __DIR__ . '/..' . '/nette/tester/src/CodeCoverage/Generators/CloverXMLGenerator.php', + 'Tester\\CodeCoverage\\Generators\\HtmlGenerator' => __DIR__ . '/..' . '/nette/tester/src/CodeCoverage/Generators/HtmlGenerator.php', + 'Tester\\CodeCoverage\\PhpParser' => __DIR__ . '/..' . '/nette/tester/src/CodeCoverage/PhpParser.php', + 'Tester\\DataProvider' => __DIR__ . '/..' . '/nette/tester/src/Framework/DataProvider.php', + 'Tester\\DomQuery' => __DIR__ . '/..' . '/nette/tester/src/Framework/DomQuery.php', + 'Tester\\Dumper' => __DIR__ . '/..' . '/nette/tester/src/Framework/Dumper.php', + 'Tester\\Environment' => __DIR__ . '/..' . '/nette/tester/src/Framework/Environment.php', + 'Tester\\Expect' => __DIR__ . '/..' . '/nette/tester/src/Framework/Expect.php', + 'Tester\\FileMock' => __DIR__ . '/..' . '/nette/tester/src/Framework/FileMock.php', + 'Tester\\FileMutator' => __DIR__ . '/..' . '/nette/tester/src/Framework/FileMutator.php', + 'Tester\\Helpers' => __DIR__ . '/..' . '/nette/tester/src/Framework/Helpers.php', + 'Tester\\Runner\\CliTester' => __DIR__ . '/..' . '/nette/tester/src/Runner/CliTester.php', + 'Tester\\Runner\\CommandLine' => __DIR__ . '/..' . '/nette/tester/src/Runner/CommandLine.php', + 'Tester\\Runner\\Job' => __DIR__ . '/..' . '/nette/tester/src/Runner/Job.php', + 'Tester\\Runner\\OutputHandler' => __DIR__ . '/..' . '/nette/tester/src/Runner/OutputHandler.php', + 'Tester\\Runner\\Output\\ConsolePrinter' => __DIR__ . '/..' . '/nette/tester/src/Runner/Output/ConsolePrinter.php', + 'Tester\\Runner\\Output\\JUnitPrinter' => __DIR__ . '/..' . '/nette/tester/src/Runner/Output/JUnitPrinter.php', + 'Tester\\Runner\\Output\\Logger' => __DIR__ . '/..' . '/nette/tester/src/Runner/Output/Logger.php', + 'Tester\\Runner\\Output\\TapPrinter' => __DIR__ . '/..' . '/nette/tester/src/Runner/Output/TapPrinter.php', + 'Tester\\Runner\\PhpInterpreter' => __DIR__ . '/..' . '/nette/tester/src/Runner/PhpInterpreter.php', + 'Tester\\Runner\\Runner' => __DIR__ . '/..' . '/nette/tester/src/Runner/Runner.php', + 'Tester\\Runner\\Test' => __DIR__ . '/..' . '/nette/tester/src/Runner/Test.php', + 'Tester\\Runner\\TestHandler' => __DIR__ . '/..' . '/nette/tester/src/Runner/TestHandler.php', + 'Tester\\TestCase' => __DIR__ . '/..' . '/nette/tester/src/Framework/TestCase.php', + 'Tester\\TestCaseException' => __DIR__ . '/..' . '/nette/tester/src/Framework/TestCase.php', + 'Tracy\\Bar' => __DIR__ . '/..' . '/tracy/tracy/src/Tracy/Bar/Bar.php', + 'Tracy\\BlueScreen' => __DIR__ . '/..' . '/tracy/tracy/src/Tracy/BlueScreen/BlueScreen.php', + 'Tracy\\Bridges\\Nette\\Bridge' => __DIR__ . '/..' . '/tracy/tracy/src/Bridges/Nette/Bridge.php', + 'Tracy\\Bridges\\Nette\\MailSender' => __DIR__ . '/..' . '/tracy/tracy/src/Bridges/Nette/MailSender.php', + 'Tracy\\Bridges\\Nette\\TracyExtension' => __DIR__ . '/..' . '/tracy/tracy/src/Bridges/Nette/TracyExtension.php', + 'Tracy\\Bridges\\Psr\\PsrToTracyLoggerAdapter' => __DIR__ . '/..' . '/tracy/tracy/src/Bridges/Psr/PsrToTracyLoggerAdapter.php', + 'Tracy\\Bridges\\Psr\\TracyToPsrLoggerAdapter' => __DIR__ . '/..' . '/tracy/tracy/src/Bridges/Psr/TracyToPsrLoggerAdapter.php', + 'Tracy\\Debugger' => __DIR__ . '/..' . '/tracy/tracy/src/Tracy/Debugger/Debugger.php', + 'Tracy\\DefaultBarPanel' => __DIR__ . '/..' . '/tracy/tracy/src/Tracy/Bar/DefaultBarPanel.php', + 'Tracy\\Dumper' => __DIR__ . '/..' . '/tracy/tracy/src/Tracy/Dumper/Dumper.php', + 'Tracy\\FireLogger' => __DIR__ . '/..' . '/tracy/tracy/src/Tracy/Logger/FireLogger.php', + 'Tracy\\Helpers' => __DIR__ . '/..' . '/tracy/tracy/src/Tracy/Helpers.php', + 'Tracy\\IBarPanel' => __DIR__ . '/..' . '/tracy/tracy/src/Tracy/Bar/IBarPanel.php', + 'Tracy\\ILogger' => __DIR__ . '/..' . '/tracy/tracy/src/Tracy/Logger/ILogger.php', + 'Tracy\\Logger' => __DIR__ . '/..' . '/tracy/tracy/src/Tracy/Logger/Logger.php', + 'Tracy\\OutputDebugger' => __DIR__ . '/..' . '/tracy/tracy/src/Tracy/OutputDebugger/OutputDebugger.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->classMap = ComposerStaticInit1e4e7be4b54097efddcd9fd472eda330::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json new file mode 100644 index 0000000..af1891a --- /dev/null +++ b/vendor/composer/installed.json @@ -0,0 +1,1344 @@ +[ + { + "name": "latte/latte", + "version": "v2.5.1", + "version_normalized": "2.5.1.0", + "source": { + "type": "git", + "url": "https://github.com/nette/latte.git", + "reference": "cf714b94f0759198a3c71361d46d5166cabaaf52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/latte/zipball/cf714b94f0759198a3c71361d46d5166cabaaf52", + "reference": "cf714b94f0759198a3c71361d46d5166cabaaf52", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.1" + }, + "conflict": { + "nette/application": "<2.4.1" + }, + "require-dev": { + "nette/tester": "~2.0", + "tracy/tracy": "^2.3" + }, + "suggest": { + "ext-fileinfo": "to use filter |datastream", + "ext-mbstring": "to use filters like lower, upper, capitalize, ...", + "nette/utils": "to use filter |webalize" + }, + "time": "2019-02-20T10:51:49+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "☕ Latte: the intuitive and fast template engine for those who want the most secure PHP sites. Introduces context-sensitive escaping.", + "homepage": "https://latte.nette.org", + "keywords": [ + "context-sensitive", + "engine", + "escaping", + "html", + "nette", + "security", + "template", + "twig" + ] + }, + { + "name": "nette/application", + "version": "v2.4.13", + "version_normalized": "2.4.13.0", + "source": { + "type": "git", + "url": "https://github.com/nette/application.git", + "reference": "023acd964383de11fbc32cae8f4dfd8043643a0f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/application/zipball/023acd964383de11fbc32cae8f4dfd8043643a0f", + "reference": "023acd964383de11fbc32cae8f4dfd8043643a0f", + "shasum": "" + }, + "require": { + "nette/component-model": "^2.3", + "nette/http": "^2.2", + "nette/reflection": "^2.2", + "nette/utils": "^2.4 || ~3.0.0", + "php": ">=5.6.0" + }, + "conflict": { + "nette/di": "<2.4", + "nette/forms": "<2.4", + "nette/latte": "<2.4", + "nette/nette": "<2.2" + }, + "require-dev": { + "latte/latte": "^2.4.3", + "mockery/mockery": "^0.9.5", + "nette/di": "^2.4", + "nette/forms": "^2.4", + "nette/robot-loader": "^2.4.2 || ^3.0", + "nette/security": "^2.4", + "nette/tester": "^2.0", + "tracy/tracy": "^2.4" + }, + "suggest": { + "latte/latte": "Allows using Latte in templates", + "nette/forms": "Allows to use Nette\\Application\\UI\\Form" + }, + "time": "2018-11-23T22:28:11+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ], + "files": [ + "src/compatibility.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🏆 Nette Application: a full-stack component-based MVC kernel for PHP that helps you write powerful and modern web applications. Write less, have cleaner code and your work will bring you joy.", + "homepage": "https://nette.org", + "keywords": [ + "Forms", + "component-based", + "control", + "framework", + "mvc", + "mvp", + "nette", + "presenter", + "routing", + "seo" + ] + }, + { + "name": "nette/bootstrap", + "version": "v2.4.6", + "version_normalized": "2.4.6.0", + "source": { + "type": "git", + "url": "https://github.com/nette/bootstrap.git", + "reference": "268816e3f1bb7426c3a4ceec2bd38a036b532543" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/bootstrap/zipball/268816e3f1bb7426c3a4ceec2bd38a036b532543", + "reference": "268816e3f1bb7426c3a4ceec2bd38a036b532543", + "shasum": "" + }, + "require": { + "nette/di": "~2.4.7", + "nette/utils": "~2.4", + "php": ">=5.6.0" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "latte/latte": "~2.2", + "nette/application": "~2.3", + "nette/caching": "~2.3", + "nette/database": "~2.3", + "nette/forms": "~2.3", + "nette/http": "~2.4.0", + "nette/mail": "~2.3", + "nette/robot-loader": "^2.4.2 || ^3.0", + "nette/safe-stream": "~2.2", + "nette/security": "~2.3", + "nette/tester": "~2.0", + "tracy/tracy": "^2.4.1" + }, + "suggest": { + "nette/robot-loader": "to use Configurator::createRobotLoader()", + "tracy/tracy": "to use Configurator::enableTracy()" + }, + "time": "2018-05-17T12:52:20+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🅱 Nette Bootstrap: the simple way to configure and bootstrap your Nette application.", + "homepage": "https://nette.org", + "keywords": [ + "bootstrapping", + "configurator", + "nette" + ] + }, + { + "name": "nette/caching", + "version": "v2.5.8", + "version_normalized": "2.5.8.0", + "source": { + "type": "git", + "url": "https://github.com/nette/caching.git", + "reference": "7fba7c7ab2585fafb7b31152f2595e1551120555" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/caching/zipball/7fba7c7ab2585fafb7b31152f2595e1551120555", + "reference": "7fba7c7ab2585fafb7b31152f2595e1551120555", + "shasum": "" + }, + "require": { + "nette/finder": "^2.2 || ~3.0.0", + "nette/utils": "^2.4 || ~3.0.0", + "php": ">=5.6.0" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "latte/latte": "^2.4", + "nette/di": "^2.4 || ~3.0.0", + "nette/tester": "^2.0", + "tracy/tracy": "^2.4" + }, + "suggest": { + "ext-pdo_sqlite": "to use SQLiteStorage or SQLiteJournal" + }, + "time": "2018-03-21T11:04:32+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "⏱ Nette Caching: library with easy-to-use API and many cache backends.", + "homepage": "https://nette.org", + "keywords": [ + "cache", + "journal", + "memcached", + "nette", + "sqlite" + ] + }, + { + "name": "nette/component-model", + "version": "v2.4.0", + "version_normalized": "2.4.0.0", + "source": { + "type": "git", + "url": "https://github.com/nette/component-model.git", + "reference": "6e7980f5ddec31f68a39e767799b1b0be9dd1014" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/component-model/zipball/6e7980f5ddec31f68a39e767799b1b0be9dd1014", + "reference": "6e7980f5ddec31f68a39e767799b1b0be9dd1014", + "shasum": "" + }, + "require": { + "nette/utils": "^2.5 || ~3.0.0", + "php": ">=5.6.0" + }, + "conflict": { + "nette/application": "<2.4", + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/tester": "^2.0", + "tracy/tracy": "^2.3" + }, + "time": "2018-03-20T16:32:50+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "⚛ Nette Component Model", + "homepage": "https://nette.org", + "keywords": [ + "components", + "nette" + ] + }, + { + "name": "nette/database", + "version": "v2.4.8", + "version_normalized": "2.4.8.0", + "source": { + "type": "git", + "url": "https://github.com/nette/database.git", + "reference": "388b172536f49e93c4b775c0adb1db2233a42c9f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/database/zipball/388b172536f49e93c4b775c0adb1db2233a42c9f", + "reference": "388b172536f49e93c4b775c0adb1db2233a42c9f", + "shasum": "" + }, + "require": { + "ext-pdo": "*", + "nette/caching": "^2.2", + "nette/utils": "^2.4", + "php": ">=5.6.0" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "mockery/mockery": "^1.0.0", + "nette/di": "^2.4 || ~3.0.0", + "nette/tester": "^2.0", + "tracy/tracy": "^2.4" + }, + "time": "2018-11-26T15:09:27+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "💾 Nette Database: layer with a familiar PDO-like API but much more powerful. Building queries, advanced joins, drivers for MySQL, PostgreSQL, SQLite, MS SQL Server and Oracle.", + "homepage": "https://nette.org", + "keywords": [ + "database", + "mssql", + "mysql", + "nette", + "notorm", + "oracle", + "pdo", + "postgresql", + "queries", + "sqlite" + ] + }, + { + "name": "nette/di", + "version": "v2.4.15", + "version_normalized": "2.4.15.0", + "source": { + "type": "git", + "url": "https://github.com/nette/di.git", + "reference": "d0561b8f77e8ef2ed6d83328860e16c81a5a8649" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/di/zipball/d0561b8f77e8ef2ed6d83328860e16c81a5a8649", + "reference": "d0561b8f77e8ef2ed6d83328860e16c81a5a8649", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "nette/neon": "^2.3.3 || ~3.0.0", + "nette/php-generator": "^2.6.1 || ^3.0.0", + "nette/utils": "^2.5.0 || ~3.0.0", + "php": ">=5.6.0" + }, + "conflict": { + "nette/bootstrap": "<2.4", + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/tester": "^2.0", + "tracy/tracy": "^2.3" + }, + "time": "2019-01-30T13:26:05+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "💎 Nette Dependency Injection Container: Flexible, compiled and full-featured DIC with perfectly usable autowiring and support for all new PHP 7.1 features.", + "homepage": "https://nette.org", + "keywords": [ + "compiled", + "di", + "dic", + "factory", + "ioc", + "nette", + "static" + ] + }, + { + "name": "nette/finder", + "version": "v2.5.0", + "version_normalized": "2.5.0.0", + "source": { + "type": "git", + "url": "https://github.com/nette/finder.git", + "reference": "6be1b83ea68ac558aff189d640abe242e0306fe2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/finder/zipball/6be1b83ea68ac558aff189d640abe242e0306fe2", + "reference": "6be1b83ea68ac558aff189d640abe242e0306fe2", + "shasum": "" + }, + "require": { + "nette/utils": "^2.4 || ~3.0.0", + "php": ">=7.1" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/tester": "^2.0", + "tracy/tracy": "^2.3" + }, + "time": "2019-02-28T18:13:25+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🔍 Nette Finder: find files and directories with an intuitive API.", + "homepage": "https://nette.org", + "keywords": [ + "filesystem", + "glob", + "iterator", + "nette" + ] + }, + { + "name": "nette/forms", + "version": "v2.4.9", + "version_normalized": "2.4.9.0", + "source": { + "type": "git", + "url": "https://github.com/nette/forms.git", + "reference": "787a924d09f507c44ead60f3822c31d61d909b65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/forms/zipball/787a924d09f507c44ead60f3822c31d61d909b65", + "reference": "787a924d09f507c44ead60f3822c31d61d909b65", + "shasum": "" + }, + "require": { + "nette/component-model": "~2.3", + "nette/http": "^2.3.8", + "nette/utils": "^2.4.6", + "php": ">=5.6.0" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "latte/latte": "~2.4", + "nette/di": "~2.4", + "nette/tester": "~2.0", + "tracy/tracy": "^2.4" + }, + "time": "2018-09-16T18:32:29+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "?? Nette Forms: generating, validating and processing secure forms in PHP. Handy API, fully customizable, server & client side validation and mature design.", + "homepage": "https://nette.org", + "keywords": [ + "Forms", + "bootstrap", + "csrf", + "javascript", + "nette", + "validation" + ] + }, + { + "name": "nette/http", + "version": "v2.4.11", + "version_normalized": "2.4.11.0", + "source": { + "type": "git", + "url": "https://github.com/nette/http.git", + "reference": "3d75d11a880fe223bfa6bc7ca9822bdfe789e5a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/http/zipball/3d75d11a880fe223bfa6bc7ca9822bdfe789e5a6", + "reference": "3d75d11a880fe223bfa6bc7ca9822bdfe789e5a6", + "shasum": "" + }, + "require": { + "nette/utils": "^2.4 || ~3.0.0", + "php": ">=5.6.0" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/di": "^2.4.8 || ~3.0.0", + "nette/tester": "^2.0", + "tracy/tracy": "^2.4" + }, + "suggest": { + "ext-fileinfo": "to detect type of uploaded files", + "nette/security": "allows use Nette\\Http\\UserStorage" + }, + "time": "2019-03-13T19:04:45+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🌐 Nette Http: abstraction for HTTP request, response and session. Provides careful data sanitization and utility for URL and cookies manipulation.", + "homepage": "https://nette.org", + "keywords": [ + "cookies", + "http", + "nette", + "proxy", + "request", + "response", + "security", + "session", + "url" + ] + }, + { + "name": "nette/mail", + "version": "v2.4.6", + "version_normalized": "2.4.6.0", + "source": { + "type": "git", + "url": "https://github.com/nette/mail.git", + "reference": "431f1774034cc14ee6a795b6514fe6343f75a68e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/mail/zipball/431f1774034cc14ee6a795b6514fe6343f75a68e", + "reference": "431f1774034cc14ee6a795b6514fe6343f75a68e", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "nette/utils": "^2.4 || ~3.0.0", + "php": ">=5.6.0" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/di": "^2.4 || ~3.0.0", + "nette/tester": "^2.0", + "tracy/tracy": "^2.4" + }, + "suggest": { + "ext-fileinfo": "to detect type of attached files" + }, + "time": "2018-11-21T22:35:13+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "📧 Nette Mail: handy email creation and transfer library for PHP with both text and MIME-compliant support.", + "homepage": "https://nette.org", + "keywords": [ + "mail", + "mailer", + "mime", + "nette", + "smtp" + ] + }, + { + "name": "nette/neon", + "version": "v3.0.0", + "version_normalized": "3.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/nette/neon.git", + "reference": "cbff32059cbdd8720deccf9e9eace6ee516f02eb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/neon/zipball/cbff32059cbdd8720deccf9e9eace6ee516f02eb", + "reference": "cbff32059cbdd8720deccf9e9eace6ee516f02eb", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "ext-json": "*", + "php": ">=7.0" + }, + "require-dev": { + "nette/tester": "^2.0", + "tracy/tracy": "^2.3" + }, + "time": "2019-02-05T21:30:40+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🍸 Nette NEON: encodes and decodes NEON file format.", + "homepage": "http://ne-on.org", + "keywords": [ + "export", + "import", + "neon", + "nette", + "yaml" + ] + }, + { + "name": "nette/php-generator", + "version": "v3.2.1", + "version_normalized": "3.2.1.0", + "source": { + "type": "git", + "url": "https://github.com/nette/php-generator.git", + "reference": "9de4e093a130f7a1bd175198799ebc0efbac6924" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/php-generator/zipball/9de4e093a130f7a1bd175198799ebc0efbac6924", + "reference": "9de4e093a130f7a1bd175198799ebc0efbac6924", + "shasum": "" + }, + "require": { + "nette/utils": "^2.4.2 || ~3.0.0", + "php": ">=7.1" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/tester": "^2.0", + "tracy/tracy": "^2.3" + }, + "time": "2018-11-27T19:00:14+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 7.3 features.", + "homepage": "https://nette.org", + "keywords": [ + "code", + "nette", + "php", + "scaffolding" + ] + }, + { + "name": "nette/reflection", + "version": "v2.4.2", + "version_normalized": "2.4.2.0", + "source": { + "type": "git", + "url": "https://github.com/nette/reflection.git", + "reference": "b12327e98ead74e87a1315e0d48182a702adf901" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/reflection/zipball/b12327e98ead74e87a1315e0d48182a702adf901", + "reference": "b12327e98ead74e87a1315e0d48182a702adf901", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "nette/caching": "^2.2 || ^3.0", + "nette/utils": "^2.4 || ^3.0", + "php": ">=5.6.0" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/di": "^2.4 || ^3.0", + "nette/tester": "^2.0", + "tracy/tracy": "^2.4" + }, + "time": "2017-07-11T19:28:57+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "Nette Reflection: docblock annotations parser and common reflection classes", + "homepage": "https://nette.org", + "keywords": [ + "annotation", + "nette", + "reflection" + ] + }, + { + "name": "nette/robot-loader", + "version": "v3.1.1", + "version_normalized": "3.1.1.0", + "source": { + "type": "git", + "url": "https://github.com/nette/robot-loader.git", + "reference": "3e8d75d6d976e191bdf46752ca40a286671219d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/robot-loader/zipball/3e8d75d6d976e191bdf46752ca40a286671219d2", + "reference": "3e8d75d6d976e191bdf46752ca40a286671219d2", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "nette/finder": "^2.3 || ^3.0", + "nette/utils": "^2.4 || ^3.0", + "php": ">=5.6.0" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/tester": "^2.0", + "tracy/tracy": "^2.3" + }, + "time": "2019-03-01T20:23:02+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🍀 Nette RobotLoader: high performance and comfortable autoloader that will search and autoload classes within your application.", + "homepage": "https://nette.org", + "keywords": [ + "autoload", + "class", + "interface", + "nette", + "trait" + ] + }, + { + "name": "nette/security", + "version": "v2.4.4", + "version_normalized": "2.4.4.0", + "source": { + "type": "git", + "url": "https://github.com/nette/security.git", + "reference": "7b8ac90c9ec405bb3b4dab9214bf122d3620fc65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/security/zipball/7b8ac90c9ec405bb3b4dab9214bf122d3620fc65", + "reference": "7b8ac90c9ec405bb3b4dab9214bf122d3620fc65", + "shasum": "" + }, + "require": { + "nette/utils": "~2.4", + "php": ">=5.6.0" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/di": "~2.4", + "nette/http": "~2.4", + "nette/tester": "~2.0", + "tracy/tracy": "^2.4" + }, + "time": "2018-10-17T15:50:54+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🔑 Nette Security: provides authentication, authorization and a role-based access control management via ACL (Access Control List)", + "homepage": "https://nette.org", + "keywords": [ + "Authentication", + "acl", + "authorization", + "nette" + ] + }, + { + "name": "nette/tester", + "version": "v2.2.0", + "version_normalized": "2.2.0.0", + "source": { + "type": "git", + "url": "https://github.com/nette/tester.git", + "reference": "899c70c53b40dfe4a214e568babb617a9c454071" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/tester/zipball/899c70c53b40dfe4a214e568babb617a9c454071", + "reference": "899c70c53b40dfe4a214e568babb617a9c454071", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "time": "2019-03-11T08:54:30+00:00", + "bin": [ + "src/tester" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "Nette Tester: enjoyable unit testing in PHP with code coverage reporter. 🍏🍏🍎🍏", + "homepage": "https://tester.nette.org", + "keywords": [ + "Xdebug", + "assertions", + "clover", + "code coverage", + "nette", + "pcov", + "phpdbg", + "phpunit", + "testing", + "unit" + ] + }, + { + "name": "nette/utils", + "version": "v2.5.3", + "version_normalized": "2.5.3.0", + "source": { + "type": "git", + "url": "https://github.com/nette/utils.git", + "reference": "17b9f76f2abd0c943adfb556e56f2165460b15ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/utils/zipball/17b9f76f2abd0c943adfb556e56f2165460b15ce", + "reference": "17b9f76f2abd0c943adfb556e56f2165460b15ce", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "conflict": { + "nette/nette": "<2.2" + }, + "require-dev": { + "nette/tester": "~2.0", + "tracy/tracy": "^2.3" + }, + "suggest": { + "ext-gd": "to use Image", + "ext-iconv": "to use Strings::webalize() and toAscii()", + "ext-intl": "for script transliteration in Strings::webalize() and toAscii()", + "ext-json": "to use Nette\\Utils\\Json", + "ext-mbstring": "to use Strings::lower() etc...", + "ext-xml": "to use Strings::length() etc. when mbstring is not available" + }, + "time": "2018-09-18T10:22:16+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ], + "files": [ + "src/loader.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", + "homepage": "https://nette.org", + "keywords": [ + "array", + "core", + "datetime", + "images", + "json", + "nette", + "paginator", + "password", + "slugify", + "string", + "unicode", + "utf-8", + "utility", + "validation" + ] + }, + { + "name": "tracy/tracy", + "version": "v2.6.1", + "version_normalized": "2.6.1.0", + "source": { + "type": "git", + "url": "https://github.com/nette/tracy.git", + "reference": "e179856e5dcc3ced99df1596cd299246fb1c3ac2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/tracy/zipball/e179856e5dcc3ced99df1596cd299246fb1c3ac2", + "reference": "e179856e5dcc3ced99df1596cd299246fb1c3ac2", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-session": "*", + "php": ">=7.1" + }, + "require-dev": { + "nette/di": "^2.4 || ~3.0.0", + "nette/tester": "^2.1", + "nette/utils": "^2.4 || ^3.0", + "psr/log": "^1.0" + }, + "suggest": { + "https://nette.org/donate": "Please support Tracy via a donation" + }, + "time": "2019-03-01T02:12:13+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src" + ], + "files": [ + "src/Tracy/shortcuts.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "😎 Tracy: the addictive tool to ease debugging PHP code for cool developers. Friendly design, logging, profiler, advanced features like debugging AJAX calls or CLI support. You will love it.", + "homepage": "https://tracy.nette.org", + "keywords": [ + "Xdebug", + "debug", + "debugger", + "nette", + "profiler" + ] + } +] diff --git a/vendor/latte/composer.json b/vendor/latte/composer.json new file mode 100644 index 0000000..7d8ae3b --- /dev/null +++ b/vendor/latte/composer.json @@ -0,0 +1,43 @@ +{ + "name": "latte/latte", + "description": "☕ Latte: the intuitive and fast template engine for those who want the most secure PHP sites. Introduces context-sensitive escaping.", + "keywords": ["template", "nette", "security", "engine", "html", "twig", "context-sensitive", "escaping"], + "homepage": "https://latte.nette.org", + "license": ["BSD-3-Clause", "GPL-2.0", "GPL-3.0"], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "require": { + "php": ">=7.1", + "ext-json": "*", + "ext-tokenizer": "*" + }, + "require-dev": { + "nette/tester": "~2.0", + "tracy/tracy": "^2.3" + }, + "suggest": { + "ext-mbstring": "to use filters like lower, upper, capitalize, ...", + "ext-fileinfo": "to use filter |datastream", + "nette/utils": "to use filter |webalize" + }, + "conflict": { + "nette/application": "<2.4.1" + }, + "autoload": { + "classmap": ["src/"] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + } +} diff --git a/vendor/latte/latte/composer.json b/vendor/latte/latte/composer.json new file mode 100644 index 0000000..7d8ae3b --- /dev/null +++ b/vendor/latte/latte/composer.json @@ -0,0 +1,43 @@ +{ + "name": "latte/latte", + "description": "☕ Latte: the intuitive and fast template engine for those who want the most secure PHP sites. Introduces context-sensitive escaping.", + "keywords": ["template", "nette", "security", "engine", "html", "twig", "context-sensitive", "escaping"], + "homepage": "https://latte.nette.org", + "license": ["BSD-3-Clause", "GPL-2.0", "GPL-3.0"], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "require": { + "php": ">=7.1", + "ext-json": "*", + "ext-tokenizer": "*" + }, + "require-dev": { + "nette/tester": "~2.0", + "tracy/tracy": "^2.3" + }, + "suggest": { + "ext-mbstring": "to use filters like lower, upper, capitalize, ...", + "ext-fileinfo": "to use filter |datastream", + "nette/utils": "to use filter |webalize" + }, + "conflict": { + "nette/application": "<2.4.1" + }, + "autoload": { + "classmap": ["src/"] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + } +} diff --git a/vendor/latte/latte/contributing.md b/vendor/latte/latte/contributing.md new file mode 100644 index 0000000..184152c --- /dev/null +++ b/vendor/latte/latte/contributing.md @@ -0,0 +1,33 @@ +How to contribute & use the issue tracker +========================================= + +Nette welcomes your contributions. There are several ways to help out: + +* Create an issue on GitHub, if you have found a bug +* Write test cases for open bug issues +* Write fixes for open bug/feature issues, preferably with test cases included +* Contribute to the [documentation](https://nette.org/en/writing) + +Issues +------ + +Please **do not use the issue tracker to ask questions**. We will be happy to help you +on [Nette forum](https://forum.nette.org) or chat with us on [Gitter](https://gitter.im/nette/nette). + +A good bug report shouldn't leave others needing to chase you up for more +information. Please try to be as detailed as possible in your report. + +**Feature requests** are welcome. But take a moment to find out whether your idea +fits with the scope and aims of the project. It's up to *you* to make a strong +case to convince the project's developers of the merits of this feature. + +Contributing +------------ + +If you'd like to contribute, please take a moment to read [the contributing guide](https://nette.org/en/contributing). + +The best way to propose a feature is to discuss your ideas on [Nette forum](https://forum.nette.org) before implementing them. + +Please do not fix whitespace, format code, or make a purely cosmetic patch. + +Thanks! :heart: diff --git a/vendor/latte/latte/license.md b/vendor/latte/latte/license.md new file mode 100644 index 0000000..cf741bd --- /dev/null +++ b/vendor/latte/latte/license.md @@ -0,0 +1,60 @@ +Licenses +======== + +Good news! You may use Nette Framework under the terms of either +the New BSD License or the GNU General Public License (GPL) version 2 or 3. + +The BSD License is recommended for most projects. It is easy to understand and it +places almost no restrictions on what you can do with the framework. If the GPL +fits better to your project, you can use the framework under this license. + +You don't have to notify anyone which license you are using. You can freely +use Nette Framework in commercial projects as long as the copyright header +remains intact. + +Please be advised that the name "Nette Framework" is a protected trademark and its +usage has some limitations. So please do not use word "Nette" in the name of your +project or top-level domain, and choose a name that stands on its own merits. +If your stuff is good, it will not take long to establish a reputation for yourselves. + + +New BSD License +--------------- + +Copyright (c) 2004, 2014 David Grudl (https://davidgrudl.com) +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of "Nette Framework" nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +This software is provided by the copyright holders and contributors "as is" and +any express or implied warranties, including, but not limited to, the implied +warranties of merchantability and fitness for a particular purpose are +disclaimed. In no event shall the copyright owner or contributors be liable for +any direct, indirect, incidental, special, exemplary, or consequential damages +(including, but not limited to, procurement of substitute goods or services; +loss of use, data, or profits; or business interruption) however caused and on +any theory of liability, whether in contract, strict liability, or tort +(including negligence or otherwise) arising in any way out of the use of this +software, even if advised of the possibility of such damage. + + +GNU General Public License +-------------------------- + +GPL licenses are very very long, so instead of including them here we offer +you URLs with full text: + +- [GPL version 2](http://www.gnu.org/licenses/gpl-2.0.html) +- [GPL version 3](http://www.gnu.org/licenses/gpl-3.0.html) diff --git a/vendor/latte/latte/readme.md b/vendor/latte/latte/readme.md new file mode 100644 index 0000000..344fd20 --- /dev/null +++ b/vendor/latte/latte/readme.md @@ -0,0 +1,314 @@ +[Latte](https://latte.nette.org): amazing template engine for PHP +================================================================= + +[![Downloads this Month](https://img.shields.io/packagist/dm/latte/latte.svg)](https://packagist.org/packages/latte/latte) +[![Build Status](https://travis-ci.org/nette/latte.svg?branch=master)](https://travis-ci.org/nette/latte) +[![Coverage Status](https://coveralls.io/repos/github/nette/latte/badge.svg?branch=master)](https://coveralls.io/github/nette/latte?branch=master) +[![Latest Stable Version](https://poser.pugx.org/latte/latte/v/stable)](https://github.com/nette/latte/releases) +[![License](https://img.shields.io/badge/license-New%20BSD-blue.svg)](https://github.com/nette/latte/blob/master/license.md) +[![Join the chat at https://gitter.im/nette/latte](https://badges.gitter.im/nette/latte.svg)](https://gitter.im/nette/latte) + + +Introduction +============ + +Latte is a template engine for PHP which eases your work and +ensures the output is protected against vulnerabilities, such as XSS. + +- **Latte is fast:** it compiles templates to plain optimized PHP code. +- **Latte is secure:** it is the first PHP engine introducing content-aware escaping. +- **Latte speaks your language:** it has intuitive syntax and helps you to build better websites easily. + +Documentation can be found on the [website](https://latte.nette.org). + +If you like Latte, **[please make a donation now](https://nette.org/make-donation?to=latte)**. Thank you! + + +Getting Started +=============== + +Although PHP is originally a templating language, it is not particularly suited for writing templates. Let's have a look at an example of a PHP template that prints an array `$items` as a list: + +```php + + +
    + +
  • +
  • + +
+ +``` + +The code is rather confusing. Moreover, we must not forget to call `htmlSpecialChars` function. That's why there are so many different template engines for PHP. One of the best template engines is part of Nette Framework and it is called **Latte**. You'll love it! + +The same template as the one above can be written easily in Latte: + +```html +
    +{foreach $items as $item} +
  • {$item|capitalize}
  • +{/foreach} +
+``` + +As you can see there are two types of macros: + +- **macro** in braces, for example `{foreach …}` +- **n:macro**, for example `n:if="…"` + +How to render template? Just install Latte (see below) and run this code: + +```php +$latte = new Latte\Engine; +$latte->setTempDirectory('/path/to/tempdir'); +$parameters['items'] = array('one', 'two', 'three'); +$latte->render('template.latte', $parameters); +``` + + +Installation +============ + +The recommended way to install Latte is via Composer (alternatively you can [download package](https://github.com/nette/latte/releases)): + +``` +composer require latte/latte +``` + +Latte requires PHP version 5.4.4 and supports PHP up to 7.3. The dev-master version requires PHP 7.1. + + +Usage +===== + +You can find detailed description of all the default macros on the [extra page](https://doc.nette.org/en/default-macros). Furthermore, you can make your own macros. + +Each pair macro, such as `{if} … {/if}`, operating upon single HTML element can be written in `n:macro` notation. So, it is possible to write the `{foreach}` macro in the same manner: + +```html +
    +
  • {$item|capitalize}
  • +
+``` + +With n:macros you can do much more interesting tricks as you will see in a moment. + +`{$item|capitalize}` macro which prints the `$item` variable contains so called filter, in this case the `capitalize` filter which makes the first letter of each word uppercase. + +Very important feature of Latte is that it **escapes variables by default**. Escaping is needed when printing a variable because we have to convert all the characters which have a special meaning in HTML to other sequences. In case we forget it can lead to a serious security hole called Cross Site Scripting (XSS). + +Because of different escaping functions that are needed in different documents and different parts of a page, Latte features a unique technology of Context-Aware Escaping which recognizes the context in which the macro is placed and **chooses the right escaping mode.** You don't have to worry that your coder forgets about it causing you goose bumps because of a security hole. Which is great! + +If the `$item` variable stores an HTML code and you want to print it without any alteration you just add the modifier noescape: `{$item|noescape}`. Forgetting the modifier mark won't cause any security holes in spirit of „less code, more security“ principle. + +You can still use PHP inside the macros normally, including comments as well. But Latte also extends the PHP syntax with three pleasant features: + +1. array can be written as `[1, 2, 3]`, which is the same as `array(1, 2, 3)` in PHP +3. we can omit quotes around the strings consisting of letters, numbers and dashes +2. short condition notation `$a ? 'b'` which is the same as `$a ? 'b' : null` in PHP + +For example: + +```html +{foreach [a, b, c] as $id} ... {/foreach} + +{$cond ? hello} // prints 'hello' if $cond equals true +``` + +Latte also has a `{* comment macro *}` which doesn't get printed to the output. + + +n:macros +======== + +We showed that n:macros are supposed to be written directly into HTML tags as their special attributes. We also said that every pair macro (e.g. `{if} … {/if}`) can be written in n:macro notation. The macro then corresponds to the HTML element in which it is written: + +```html +{var $items = ['I', '♥', 'Nette Framework']} + +

{$item}

+``` + +Prints: + +```html +

I

+

♥

+

Nette Framework

+``` + +By using `inner-` prefix we can alter the behavior so that the macro applies only to the body of the element: + +```html +
+

{$item}

+
+
+``` + +Prints: + +```html +
+

I

+
+

♥

+
+

Nette Framework

+
+
+``` + +Or by using `tag-` prefix the macro is applied on the HTML tags only: + +```html +

Title

+``` + +Depending on the value of `$url` variable this will print: + +```html +// when $url is empty +

Title

+ +// when $url equals 'https://nette.org' +

Title

+``` + +However, n:macros are not only a shortcut for pair macros, there are some pure n:macros as well, for example the coder's best friend [n:class](https://doc.nette.org/en/default-macros#toc-n-class) macro. + + +Filters +======= + +Latte allows calling filters by using the pipe sign notation (preceding space is allowed): + +```html +

{$heading|upper}

+``` + +Filters (or modifiers) can be chained, in that case they apply in order from left to right: + +```html +

{$heading|lower|capitalize}

+``` + +Parameters are put after the filter name separated by colon or comma: + +```html +

{$heading|truncate:20,''}

+``` + +See the summary of [standard filters](https://doc.nette.org/en/default-filters) and how to make user-defined filters. + + +In templates we can use functions which change or format the data to a form we want. They are called *filters*. See the summary of the default filters. + + +Filter can be registered by any callback or lambda function: + +```php +$latte = new Latte\Engine; +$latte->addFilter('shortify', function ($s) { + return mb_substr($s, 0, 10); // shortens the text to 10 characters +}); +``` + +In this case it would be better for the filter to get an extra parameter: + +```php +$latte->addFilter('shortify', function ($s, $len = 10) { + return mb_substr($s, 0, $len); +}); +``` + +We call it in a template like this: + +```php +

shortify($text, 100); ?>

+``` + +Latte simplifies the notation - filters are denoted by the pipe sign, they can be chained (they apply in order from left to right). Parameters are separated by colon or comma: + +```html +

{$text|shortify:100}

+``` + + +Performance +=========== + +Latte is fast. It compiles the templates to native PHP code and stores them in cache on the disk. So they are as fast as if they would have been written in pure PHP. + +The template is automatically recompiled each time we change the source file. While developing you just need to edit the templates in Latte and changes are visible in your browser instantly. + + +Debugging +========= + +With each error or typo you will be informed by the Debugger with all the luxury. The template source code is displayed and the red line marks the error showing error message as well. With just a single click you can open the template in your favorite editor and fix the error at once. Easy peasy! + +If you are using an IDE with code stepping you can go through the generated PHP code of the template. + + + +Usability +========= + +Latte syntax wasn't invented by engineers but came up from webdesigner's practical requests. We were looking for the friendliest syntax with which you can write even the most problematic constructions comfortably enough. You will be surprised how much help Latte can be. + +You can find macros for advanced [layout](https://doc.nette.org/en/default-macros#toc-template-expanding-inheritance) managing, for **template inheritance**, nested blocks and so on. Syntax comes from PHP itself so you don't have to learn anything new and you can leverage your know-how. + + + +Context-Aware Escaping +====================== + +Although the Cross Site Scripting (XSS) is one of the trivial ways of exploiting a web page it is the most common vulnerability but very serious. It can lead to identity theft and so on. The best defense is consistent escaping of printed data, ie. converting the characters which have a special meaning in the given context. + +If the coder omits the escaping a security hole is made. That's why template engines implement automated escaping. The problem is that the web page has different contexts and each has different rules for escaping printed data. A security hole then shows up if the wrong escaping functions are used. + +But Latte is sophisticated. It features unique technology of *Context-Aware Escaping* which recognizes the context in which the macro is placed and chooses the right escaping mode. What does that mean? + +Latte doesn't need any manual work. **All is done automatically, consistently and correctly.** You don't have to worry about security holes. + +Lets see how it works: + +```html +

{$movie}

+ + +``` + +If `$movie` variable stores `'Amarcord & 8 1/2'` string it generates the following output. Notice different escaping used in HTML and JavaScript and also in `onclick` attribute: + + +```html +

Amarcord & 8 1/2

+ + +``` + +Thanks to Context-Aware Escaping the template is simple and your application perfectly secured against Cross Site Scripting. You can use PHP variables natively inside the JavaScript! + + +JavaScript +---------- + +Strings in JavaScript are escaped including quotes. If you want to put variable into another string, simply concatenate them: + +```html + +``` + + +A pretty output +=============== + +Sticklers will enjoy the look of the HTML output which Latte generates. All tags are indented as they are supposed to. The code looks like it has been processed with some kind of *HTML code beautifier* :-) diff --git a/vendor/latte/latte/src/Latte/Compiler/Compiler.php b/vendor/latte/latte/src/Latte/Compiler/Compiler.php new file mode 100644 index 0000000..749bddd --- /dev/null +++ b/vendor/latte/latte/src/Latte/Compiler/Compiler.php @@ -0,0 +1,738 @@ + IMacro[]] */ + private $macros = []; + + /** @var int[] IMacro flags */ + private $flags; + + /** @var HtmlNode */ + private $htmlNode; + + /** @var MacroNode */ + private $macroNode; + + /** @var string[] */ + private $placeholders = []; + + /** @var string */ + private $contentType = self::CONTENT_HTML; + + /** @var string|null */ + private $context; + + /** @var mixed */ + private $lastAttrValue; + + /** @var int */ + private $tagOffset; + + /** @var bool */ + private $inHead; + + /** @var array of [name => [body, arguments]] */ + private $methods = []; + + /** @var array of [name => serialized value] */ + private $properties = []; + + + /** + * Adds new macro with IMacro flags. + * @return static + */ + public function addMacro(string $name, IMacro $macro, int $flags = null) + { + if (!isset($this->flags[$name])) { + $this->flags[$name] = $flags ?: IMacro::DEFAULT_FLAGS; + } elseif ($flags && $this->flags[$name] !== $flags) { + throw new \LogicException("Incompatible flags for macro $name."); + } + $this->macros[$name][] = $macro; + return $this; + } + + + /** + * Compiles tokens to PHP code. + * @param Token[] $tokens + */ + public function compile(array $tokens, string $className): string + { + $this->tokens = $tokens; + $output = ''; + $this->output = &$output; + $this->inHead = true; + $this->htmlNode = $this->macroNode = $this->context = null; + $this->placeholders = $this->properties = []; + $this->methods = ['main' => null, 'prepare' => null]; + + $macroHandlers = new \SplObjectStorage; + + if ($this->macros) { + array_map([$macroHandlers, 'attach'], array_merge(...array_values($this->macros))); + } + + foreach ($macroHandlers as $handler) { + $handler->initialize($this); + } + + foreach ($tokens as $this->position => $token) { + if ($this->inHead && !($token->type === $token::COMMENT + || $token->type === $token::MACRO_TAG && ($this->flags[$token->name] ?? null) & IMacro::ALLOWED_IN_HEAD + || $token->type === $token::TEXT && trim($token->text) === '' + )) { + $this->inHead = false; + } + $this->{"process$token->type"}($token); + } + + while ($this->htmlNode) { + if (!empty($this->htmlNode->macroAttrs)) { + throw new CompileException('Missing ' . self::printEndTag($this->htmlNode)); + } + $this->htmlNode = $this->htmlNode->parentNode; + } + + while ($this->macroNode) { + if (~$this->flags[$this->macroNode->name] & IMacro::AUTO_CLOSE) { + throw new CompileException('Missing ' . self::printEndTag($this->macroNode)); + } + $this->closeMacro($this->macroNode->name); + } + + $prepare = $epilogs = ''; + foreach ($macroHandlers as $handler) { + $res = $handler->finalize(); + $prepare .= empty($res[0]) ? '' : ""; + $epilogs = (empty($res[1]) ? '' : "") . $epilogs; + } + + $this->addMethod('main', $this->expandTokens("extract(\$this->params);?>\n$output$epilogsaddMethod('prepare', "extract(\$this->params);?>$preparecontentType !== self::CONTENT_HTML) { + $this->addProperty('contentType', $this->contentType); + } + + foreach ($this->properties as $name => $value) { + $members[] = "\tpublic $$name = " . PhpHelpers::dump($value) . ';'; + } + foreach (array_filter($this->methods) as $name => $method) { + $members[] = "\n\tfunction $name($method[arguments])\n\t{\n" . ($method['body'] ? "\t\t$method[body]\n" : '') . "\t}"; + } + + return "contentType = $type; + $this->context = null; + return $this; + } + + + public function getMacroNode(): ?MacroNode + { + return $this->macroNode; + } + + + /** + * Returns current line number. + */ + public function getLine(): ?int + { + return isset($this->tokens[$this->position]) ? $this->tokens[$this->position]->line : null; + } + + + public function isInHead(): bool + { + return $this->inHead; + } + + + /** + * Adds custom method to template. + * @internal + */ + public function addMethod(string $name, string $body, string $arguments = ''): void + { + $this->methods[$name] = ['body' => trim($body), 'arguments' => $arguments]; + } + + + /** + * Returns custom methods. + * @internal + */ + public function getMethods(): array + { + return $this->methods; + } + + + /** + * Adds custom property to template. + * @internal + */ + public function addProperty(string $name, $value): void + { + $this->properties[$name] = $value; + } + + + /** + * Returns custom properites. + * @internal + */ + public function getProperties(): array + { + return $this->properties; + } + + + /** @internal */ + public function expandTokens(string $s): string + { + return strtr($s, $this->placeholders); + } + + + private function processText(Token $token): void + { + if ($this->lastAttrValue === '' && $this->context && Helpers::startsWith($this->context, self::CONTEXT_HTML_ATTRIBUTE)) { + $this->lastAttrValue = $token->text; + } + $this->output .= $this->escape($token->text); + } + + + private function processMacroTag(Token $token): void + { + if ($this->context === self::CONTEXT_HTML_TAG || $this->context && Helpers::startsWith($this->context, self::CONTEXT_HTML_ATTRIBUTE)) { + $this->lastAttrValue = true; + } + + $isRightmost = !isset($this->tokens[$this->position + 1]) + || substr($this->tokens[$this->position + 1]->text, 0, 1) === "\n"; + + if ($token->closing) { + $this->closeMacro($token->name, $token->value, $token->modifiers, $isRightmost); + } else { + if (!$token->empty && ($this->flags[$token->name] ?? null) & IMacro::AUTO_EMPTY) { + $pos = $this->position; + while (($t = $this->tokens[++$pos] ?? null) + && ($t->type !== Token::MACRO_TAG || $t->name !== $token->name) + && ($t->type !== Token::HTML_ATTRIBUTE_BEGIN || $t->name !== Parser::N_PREFIX . $token->name)); + $token->empty = $t ? !$t->closing : true; + } + $node = $this->openMacro($token->name, $token->value, $token->modifiers, $isRightmost); + if ($token->empty) { + if ($node->empty) { + throw new CompileException("Unexpected /} in tag {$token->text}"); + } + $this->closeMacro($token->name, null, null, $isRightmost); + } + } + } + + + private function processHtmlTagBegin(Token $token): void + { + if ($token->closing) { + while ($this->htmlNode) { + if (strcasecmp($this->htmlNode->name, $token->name) === 0) { + break; + } + if ($this->htmlNode->macroAttrs) { + throw new CompileException("Unexpected name>, expecting " . self::printEndTag($this->htmlNode)); + } + $this->htmlNode = $this->htmlNode->parentNode; + } + if (!$this->htmlNode) { + $this->htmlNode = new HtmlNode($token->name); + } + $this->htmlNode->closing = true; + $this->htmlNode->endLine = $this->getLine(); + $this->context = self::CONTEXT_HTML_TEXT; + + } elseif ($token->text === ' + $this->addToken(Token::HTML_TAG_END, $matches[0]); + $this->setContext(self::CONTEXT_HTML_TEXT); + } else { + return $this->processMacro($matches); + } + } + + + /** + * Handles CONTEXT_NONE. + */ + private function contextNone() + { + $matches = $this->match('~ + (?P' . $this->delimiters[0] . ') + ~xsi'); + return $this->processMacro($matches); + } + + + /** + * Handles CONTEXT_MACRO. + */ + private function contextMacro(): void + { + $matches = $this->match('~ + (?P\\*.*?\\*' . $this->delimiters[1] . '\n{0,2})| + (?P(?> + ' . self::RE_STRING . '| + \{(?>' . self::RE_STRING . '|[^\'"{}])*+\}| + [^\'"{}]+ + )++) + ' . $this->delimiters[1] . ' + (?P[ \t]*(?=\n))? + ~xsiA'); + + if (!empty($matches['macro'])) { + $token = $this->addToken(Token::MACRO_TAG, $this->context[1][1] . $matches[0]); + [$token->name, $token->value, $token->modifiers, $token->empty, $token->closing] = $this->parseMacroTag($matches['macro']); + $this->context = $this->context[1][0]; + + } elseif (!empty($matches['comment'])) { + $this->addToken(Token::COMMENT, $this->context[1][1] . $matches[0]); + $this->context = $this->context[1][0]; + + } else { + throw new CompileException('Malformed macro'); + } + } + + + private function processMacro(array $matches) + { + if (!empty($matches['macro'])) { // {macro} or {* *} + $this->setContext(self::CONTEXT_MACRO, [$this->context, $matches['macro']]); + } else { + return false; + } + } + + + /** + * Matches next token. + */ + private function match(string $re): array + { + if (!preg_match($re, $this->input, $matches, PREG_OFFSET_CAPTURE, $this->offset)) { + if (preg_last_error()) { + throw new RegexpException(null, preg_last_error()); + } + return []; + } + + $value = substr($this->input, $this->offset, $matches[0][1] - $this->offset); + if ($value !== '') { + $this->addToken(Token::TEXT, $value); + } + $this->offset = $matches[0][1] + strlen($matches[0][0]); + foreach ($matches as $k => $v) { + $matches[$k] = $v[0]; + } + return $matches; + } + + + /** + * @param string $type Parser::CONTENT_HTML, CONTENT_XHTML, CONTENT_XML or CONTENT_TEXT + * @return static + */ + public function setContentType(string $type) + { + if (in_array($type, [self::CONTENT_HTML, self::CONTENT_XHTML, self::CONTENT_XML], true)) { + $this->setContext(self::CONTEXT_HTML_TEXT); + $this->xmlMode = $type === self::CONTENT_XML; + } else { + $this->setContext(self::CONTEXT_NONE); + } + return $this; + } + + + /** + * @return static + */ + public function setContext(string $context, $quote = null) + { + $this->context = [$context, $quote]; + return $this; + } + + + /** + * Changes macro tag delimiters. + * @return static + */ + public function setSyntax(string $type) + { + $type = $type ?: $this->defaultSyntax; + if (isset($this->syntaxes[$type])) { + $this->setDelimiters($this->syntaxes[$type][0], $this->syntaxes[$type][1]); + } else { + throw new \InvalidArgumentException("Unknown syntax '$type'"); + } + return $this; + } + + + /** + * Changes macro tag delimiters (as regular expression). + * @return static + */ + public function setDelimiters(string $left, string $right) + { + $this->delimiters = [$left, $right]; + return $this; + } + + + /** + * Parses macro tag to name, arguments a modifiers parts. + * @param string $tag {name arguments | modifiers} + * @internal + */ + public function parseMacroTag(string $tag): ?array + { + if (!preg_match('~^ + (?P/?) + ( + (?P\?|[a-z]\w*+(?:[.:]\w+)*+(?!::|\(|\\\\))| ## ?, name, /name, but not function( or class:: or namespace\ + (?P[=\~#%^&_]?) ## expression, =expression, ... + )(?P(?:' . self::RE_STRING . '|[^\'"])*?) + (?P(?(?:' . self::RE_STRING . '|(?:\((?P>modArgs)\))|[^\'"/()]|/(?=.))*+))? + (?P/?\z) + ()\z~isx', $tag, $match)) { + if (preg_last_error()) { + throw new RegexpException(null, preg_last_error()); + } + return null; + } + if ($match['name'] === '') { + $match['name'] = $match['shortname'] ?: ($match['closing'] ? '' : '='); + } + return [$match['name'], trim($match['args']), $match['modifiers'], (bool) $match['empty'], (bool) $match['closing']]; + } + + + private function addToken(string $type, string $text): Token + { + $this->output[] = $token = new Token; + $token->type = $type; + $token->text = $text; + $token->line = $this->getLine() - substr_count(ltrim($text), "\n"); + return $token; + } + + + public function getLine(): int + { + return $this->offset + ? substr_count(substr($this->input, 0, $this->offset - 1), "\n") + 1 + : 1; + } + + + /** + * Process low-level macros. + */ + protected function filter(Token $token): void + { + if ($token->type === Token::MACRO_TAG && $token->name === '/syntax') { + $this->setSyntax($this->defaultSyntax); + $token->type = Token::COMMENT; + + } elseif ($token->type === Token::MACRO_TAG && $token->name === 'syntax') { + $this->setSyntax($token->value); + $token->type = Token::COMMENT; + + } elseif ($token->type === Token::HTML_ATTRIBUTE_BEGIN && $token->name === 'n:syntax') { + $this->setSyntax($token->value); + $this->syntaxEndTag = $this->lastHtmlTag; + $this->syntaxEndLevel = 1; + $token->type = Token::COMMENT; + + } elseif ($token->type === Token::HTML_TAG_BEGIN && $this->lastHtmlTag === $this->syntaxEndTag) { + $this->syntaxEndLevel++; + + } elseif ($token->type === Token::HTML_TAG_END && $this->lastHtmlTag === ('/' . $this->syntaxEndTag) && --$this->syntaxEndLevel === 0) { + $this->setSyntax($this->defaultSyntax); + + } elseif ($token->type === Token::MACRO_TAG && $token->name === 'contentType') { + if (strpos($token->value, 'html') !== false) { + $this->setContentType(self::CONTENT_HTML); + } elseif (strpos($token->value, 'xml') !== false) { + $this->setContentType(self::CONTENT_XML); + } else { + $this->setContentType(self::CONTENT_TEXT); + } + } + } +} diff --git a/vendor/latte/latte/src/Latte/Compiler/PhpHelpers.php b/vendor/latte/latte/src/Latte/Compiler/PhpHelpers.php new file mode 100644 index 0000000..268affb --- /dev/null +++ b/vendor/latte/latte/src/Latte/Compiler/PhpHelpers.php @@ -0,0 +1,128 @@ + $token) { + if (is_array($token)) { + [$name, $token] = ($tmp = $token); + if ($name === T_INLINE_HTML) { + $res .= $token; + + } elseif ($name === T_OPEN_TAG) { + $openLevel = $level; + + } elseif ($name === T_CLOSE_TAG) { + $next = $tokens[$n + 1] ?? null; + if (is_array($next) && $next[0] === T_OPEN_TAG) { // remove ?)next(); + + } else { + if (trim($php) !== '' || substr($res, -1) === '<') { // skip $v) { + $v = is_array($v) && (!$v || array_keys($v) === range(0, count($v) - 1)) + ? '[' . implode(', ', array_map(function ($s): string { return var_export($s, true); }, $v)) . ']' + : var_export($v, true); + $s .= "\t\t" . var_export($k, true) . ' => ' . $v . ",\n"; + } + return $s . "\t]"; + } + return var_export($value, true); + } +} diff --git a/vendor/latte/latte/src/Latte/Compiler/PhpWriter.php b/vendor/latte/latte/src/Latte/Compiler/PhpWriter.php new file mode 100644 index 0000000..e337481 --- /dev/null +++ b/vendor/latte/latte/src/Latte/Compiler/PhpWriter.php @@ -0,0 +1,507 @@ +tokenizer, null, $node->context); + $me->modifiers = &$node->modifiers; + return $me; + } + + + public function __construct(MacroTokens $tokens, string $modifiers = null, array $context = null) + { + $this->tokens = $tokens; + $this->modifiers = $modifiers; + $this->context = $context; + } + + + /** + * Expands %node.word, %node.array, %node.args, %escape(), %modify(), %var, %raw, %word in code. + */ + public function write(string $mask, ...$args): string + { + $mask = preg_replace('#%(node|\d+)\.#', '%$1_', $mask); + $mask = preg_replace_callback('#%escape(\(([^()]*+|(?1))+\))#', function ($m) { + return $this->escapePass(new MacroTokens(substr($m[1], 1, -1)))->joinAll(); + }, $mask); + $mask = preg_replace_callback('#%modify(Content)?(\(([^()]*+|(?2))+\))#', function ($m) { + return $this->formatModifiers(substr($m[2], 1, -1), (bool) $m[1]); + }, $mask); + + $pos = $this->tokens->position; + $word = null; + if (strpos($mask, '%node_word') !== false) { + $word = $this->tokens->fetchWord(); + if ($word === null) { + throw new CompileException('Invalid content of macro'); + } + } + + $code = preg_replace_callback('#([,+]\s*)?%(node_|\d+_|)(word|var|raw|array|args)(\?)?(\s*\+\s*)?()#', + function ($m) use ($word, &$args) { + [, $l, $source, $format, $cond, $r] = $m; + + switch ($source) { + case 'node_': + $arg = $word; break; + case '': + $arg = current($args); next($args); break; + default: + $arg = $args[(int) $source]; break; + } + + switch ($format) { + case 'word': + $code = $this->formatWord($arg); break; + case 'args': + $code = $this->formatArgs(); break; + case 'array': + $code = $this->formatArray(); + $code = $cond && $code === '[]' ? '' : $code; break; + case 'var': + $code = var_export($arg, true); break; + case 'raw': + $code = (string) $arg; break; + } + + if ($cond && $code === '') { + return $r ? $l : $r; + } else { + return $l . $code . $r; + } + }, $mask); + + $this->tokens->position = $pos; + return $code; + } + + + /** + * Formats modifiers calling. + */ + public function formatModifiers(string $var, bool $isContent = false): string + { + $tokens = new MacroTokens(ltrim($this->modifiers, '|')); + $tokens = $this->preprocess($tokens); + $tokens = $this->modifierPass($tokens, $var, $isContent); + $tokens = $this->quotingPass($tokens); + return $tokens->joinAll(); + } + + + /** + * Formats macro arguments to PHP code. (It advances tokenizer to the end as a side effect.) + */ + public function formatArgs(MacroTokens $tokens = null): string + { + $tokens = $this->preprocess($tokens); + $tokens = $this->quotingPass($tokens); + return $tokens->joinAll(); + } + + + /** + * Formats macro arguments to PHP array. (It advances tokenizer to the end as a side effect.) + */ + public function formatArray(MacroTokens $tokens = null): string + { + $tokens = $this->preprocess($tokens); + $tokens = $this->expandCastPass($tokens); + $tokens = $this->quotingPass($tokens); + return $tokens->joinAll(); + } + + + /** + * Formats parameter to PHP string. + */ + public function formatWord(string $s): string + { + return (is_numeric($s) || preg_match('#^\$|[\'"]|^(true|TRUE)\z|^(false|FALSE)\z|^(null|NULL)\z|^[\w\\\\]{3,}::[A-Z0-9_]{2,}\z#', $s)) + ? $this->formatArgs(new MacroTokens($s)) + : '"' . $s . '"'; + } + + + /** + * Preprocessor for tokens. (It advances tokenizer to the end as a side effect.) + */ + public function preprocess(MacroTokens $tokens = null): MacroTokens + { + $tokens = $tokens === null ? $this->tokens : $tokens; + $this->validateTokens($tokens); + $tokens = $this->removeCommentsPass($tokens); + $tokens = $this->shortTernaryPass($tokens); + $tokens = $this->inlineModifierPass($tokens); + $tokens = $this->inOperatorPass($tokens); + return $tokens; + } + + + /** + * @throws CompileException + */ + public function validateTokens(MacroTokens $tokens): void + { + $brackets = []; + $pos = $tokens->position; + while ($tokens->nextToken()) { + if ($tokens->isCurrent('?>')) { + throw new CompileException('Forbidden ?> inside macro'); + + } elseif ($tokens->isCurrent('(', '[', '{')) { + static $counterpart = ['(' => ')', '[' => ']', '{' => '}']; + $brackets[] = $counterpart[$tokens->currentValue()]; + + } elseif ($tokens->isCurrent(')', ']', '}') && $tokens->currentValue() !== array_pop($brackets)) { + throw new CompileException('Unexpected ' . $tokens->currentValue()); + + } elseif ( + $tokens->isCurrent('function', 'class', 'interface', 'trait') + && $tokens->isNext($tokens::T_SYMBOL, '&') + || $tokens->isCurrent('return', 'yield') + && !$brackets + ) { + throw new CompileException("Forbidden keyword '{$tokens->currentValue()}' inside macro."); + } + } + if ($brackets) { + throw new CompileException('Missing ' . array_pop($brackets)); + } + $tokens->position = $pos; + } + + + /** + * Removes PHP comments. + */ + public function removeCommentsPass(MacroTokens $tokens): MacroTokens + { + $res = new MacroTokens; + while ($tokens->nextToken()) { + if (!$tokens->isCurrent($tokens::T_COMMENT)) { + $res->append($tokens->currentToken()); + } + } + return $res; + } + + + /** + * Simplified ternary expressions without third part. + */ + public function shortTernaryPass(MacroTokens $tokens): MacroTokens + { + $res = new MacroTokens; + $inTernary = []; + while ($tokens->nextToken()) { + if ($tokens->isCurrent('?')) { + $inTernary[] = $tokens->depth; + + } elseif ($tokens->isCurrent(':')) { + array_pop($inTernary); + + } elseif ($tokens->isCurrent(',', ')', ']', '|') && end($inTernary) === $tokens->depth + $tokens->isCurrent(')', ']')) { + $res->append(' : null'); + array_pop($inTernary); + } + $res->append($tokens->currentToken()); + } + + if ($inTernary) { + $res->append(' : null'); + } + return $res; + } + + + /** + * Pseudocast (expand). + */ + public function expandCastPass(MacroTokens $tokens): MacroTokens + { + $res = new MacroTokens('['); + $expand = null; + while ($tokens->nextToken()) { + if ($tokens->isCurrent('(expand)') && $tokens->depth === 0) { + $expand = true; + $res->append('],'); + } elseif ($expand && $tokens->isCurrent(',') && !$tokens->depth) { + $expand = false; + $res->append(', ['); + } else { + $res->append($tokens->currentToken()); + } + } + + if ($expand === null) { + $res->append(']'); + } else { + $res->prepend('array_merge(')->append($expand ? ', [])' : '])'); + } + return $res; + } + + + /** + * Quotes symbols to strings. + */ + public function quotingPass(MacroTokens $tokens): MacroTokens + { + $res = new MacroTokens; + while ($tokens->nextToken()) { + $res->append($tokens->isCurrent($tokens::T_SYMBOL) + && (!$tokens->isPrev() || $tokens->isPrev(',', '(', '[', '=>', ':', '?', '.', '<', '>', '<=', '>=', '===', '!==', '==', '!=', '<>', '&&', '||', '=', 'and', 'or', 'xor', '??')) + && (!$tokens->isNext() || $tokens->isNext(',', ';', ')', ']', '=>', ':', '?', '.', '<', '>', '<=', '>=', '===', '!==', '==', '!=', '<>', '&&', '||', 'and', 'or', 'xor', '??')) + && !preg_match('#^[A-Z_][A-Z0-9_]{2,}$#', $tokens->currentValue()) + ? "'" . $tokens->currentValue() . "'" + : $tokens->currentToken() + ); + } + return $res; + } + + + /** + * Syntax $entry in [item1, item2]. + */ + public function inOperatorPass(MacroTokens $tokens): MacroTokens + { + while ($tokens->nextToken()) { + if ($tokens->isCurrent($tokens::T_VARIABLE)) { + $start = $tokens->position; + $depth = $tokens->depth; + $expr = $arr = []; + + $expr[] = $tokens->currentToken(); + while ($tokens->isNext($tokens::T_VARIABLE, $tokens::T_SYMBOL, $tokens::T_NUMBER, $tokens::T_STRING, '[', ']', '(', ')', '->') + && !$tokens->isNext('in')) { + $expr[] = $tokens->nextToken(); + } + + if ($depth === $tokens->depth && $tokens->nextValue('in') && ($arr[] = $tokens->nextToken('['))) { + while ($tokens->isNext()) { + $arr[] = $tokens->nextToken(); + if ($tokens->isCurrent(']') && $tokens->depth === $depth) { + $new = array_merge($tokens->parse('in_array('), $expr, $tokens->parse(', '), $arr, $tokens->parse(', true)')); + array_splice($tokens->tokens, $start, $tokens->position - $start + 1, $new); + $tokens->position = $start + count($new) - 1; + continue 2; + } + } + } + $tokens->position = $start; + } + } + return $tokens->reset(); + } + + + /** + * Process inline filters ($var|filter) + */ + public function inlineModifierPass(MacroTokens $tokens): MacroTokens + { + $result = new MacroTokens; + while ($tokens->nextToken()) { + if ($tokens->isCurrent('(', '[')) { + $result->tokens = array_merge($result->tokens, $this->inlineModifierInner($tokens)); + } else { + $result->append($tokens->currentToken()); + } + } + return $result; + } + + + private function inlineModifierInner(MacroTokens $tokens): array + { + $isFunctionOrArray = $tokens->isPrev($tokens::T_VARIABLE, $tokens::T_SYMBOL) || $tokens->isCurrent('['); + $result = new MacroTokens; + $args = new MacroTokens; + $modifiers = new MacroTokens; + $current = $args; + $anyModifier = false; + $result->append($tokens->currentToken()); + + while ($tokens->nextToken()) { + if ($tokens->isCurrent('(', '[')) { + $current->tokens = array_merge($current->tokens, $this->inlineModifierInner($tokens)); + + } elseif ($current !== $modifiers && $tokens->isCurrent('|')) { + $anyModifier = true; + $current = $modifiers; + + } elseif ($tokens->isCurrent(')', ']') || ($isFunctionOrArray && $tokens->isCurrent(','))) { + $partTokens = count($modifiers->tokens) + ? $this->modifierPass($modifiers, $args->tokens)->tokens + : $args->tokens; + $result->tokens = array_merge($result->tokens, $partTokens); + if ($tokens->isCurrent(',')) { + $result->append($tokens->currentToken()); + $args = new MacroTokens; + $modifiers = new MacroTokens; + $current = $args; + continue; + } elseif ($isFunctionOrArray || !$anyModifier) { + $result->append($tokens->currentToken()); + } else { + array_shift($result->tokens); + } + return $result->tokens; + + } else { + $current->append($tokens->currentToken()); + } + } + throw new CompileException('Unbalanced brackets.'); + } + + + /** + * Formats modifiers calling. + * @param string|array $var + * @throws CompileException + */ + public function modifierPass(MacroTokens $tokens, $var, bool $isContent = false): MacroTokens + { + $inside = false; + $res = new MacroTokens($var); + while ($tokens->nextToken()) { + if ($tokens->isCurrent($tokens::T_WHITESPACE)) { + $res->append(' '); + + } elseif ($inside) { + if ($tokens->isCurrent(':', ',')) { + $res->append(', '); + $tokens->nextAll($tokens::T_WHITESPACE); + + } elseif ($tokens->isCurrent('|')) { + $res->append(')'); + $inside = false; + + } else { + $res->append($tokens->currentToken()); + } + } else { + if ($tokens->isCurrent($tokens::T_SYMBOL)) { + if ($tokens->isCurrent('escape')) { + if ($isContent) { + $res->prepend('LR\Filters::convertTo($_fi, ' . var_export(implode($this->context), true) . ', ') + ->append(')'); + } else { + $res = $this->escapePass($res); + } + $tokens->nextToken('|'); + } elseif (!strcasecmp($tokens->currentValue(), 'checkurl')) { + $res->prepend('LR\Filters::safeUrl('); + $inside = true; + } else { + $name = strtolower($tokens->currentValue()); + $res->prepend($isContent + ? '$this->filters->filterContent(' . var_export($name, true) . ', $_fi, ' + : '($this->filters->' . $name . ')(' + ); + $inside = true; + } + } else { + throw new CompileException("Modifier name must be alphanumeric string, '{$tokens->currentValue()}' given."); + } + } + } + if ($inside) { + $res->append(')'); + } + return $res; + } + + + /** + * Escapes expression in tokens. + */ + public function escapePass(MacroTokens $tokens): MacroTokens + { + $tokens = clone $tokens; + [$contentType, $context] = $this->context; + switch ($contentType) { + case Compiler::CONTENT_XHTML: + case Compiler::CONTENT_HTML: + switch ($context) { + case Compiler::CONTEXT_HTML_TEXT: + return $tokens->prepend('LR\Filters::escapeHtmlText(')->append(')'); + case Compiler::CONTEXT_HTML_TAG: + case Compiler::CONTEXT_HTML_ATTRIBUTE_UNQUOTED_URL: + return $tokens->prepend('LR\Filters::escapeHtmlAttrUnquoted(')->append(')'); + case Compiler::CONTEXT_HTML_ATTRIBUTE: + case Compiler::CONTEXT_HTML_ATTRIBUTE_URL: + return $tokens->prepend('LR\Filters::escapeHtmlAttr(')->append(')'); + case Compiler::CONTEXT_HTML_ATTRIBUTE_JS: + return $tokens->prepend('LR\Filters::escapeHtmlAttr(LR\Filters::escapeJs(')->append('))'); + case Compiler::CONTEXT_HTML_ATTRIBUTE_CSS: + return $tokens->prepend('LR\Filters::escapeHtmlAttr(LR\Filters::escapeCss(')->append('))'); + case Compiler::CONTEXT_HTML_COMMENT: + return $tokens->prepend('LR\Filters::escapeHtmlComment(')->append(')'); + case Compiler::CONTEXT_HTML_BOGUS_COMMENT: + return $tokens->prepend('LR\Filters::escapeHtml(')->append(')'); + case Compiler::CONTEXT_HTML_JS: + case Compiler::CONTEXT_HTML_CSS: + return $tokens->prepend('LR\Filters::escape' . ucfirst($context) . '(')->append(')'); + default: + throw new CompileException("Unknown context $contentType, $context."); + } + // break omitted + case Compiler::CONTENT_XML: + switch ($context) { + case Compiler::CONTEXT_XML_TEXT: + case Compiler::CONTEXT_XML_ATTRIBUTE: + case Compiler::CONTEXT_XML_BOGUS_COMMENT: + return $tokens->prepend('LR\Filters::escapeXml(')->append(')'); + case Compiler::CONTEXT_XML_COMMENT: + return $tokens->prepend('LR\Filters::escapeHtmlComment(')->append(')'); + case Compiler::CONTEXT_XML_TAG: + return $tokens->prepend('LR\Filters::escapeXmlAttrUnquoted(')->append(')'); + default: + throw new CompileException("Unknown context $contentType, $context."); + } + // break omitted + case Compiler::CONTENT_JS: + case Compiler::CONTENT_CSS: + case Compiler::CONTENT_ICAL: + return $tokens->prepend('LR\Filters::escape' . ucfirst($contentType) . '(')->append(')'); + case Compiler::CONTENT_TEXT: + return $tokens; + case null: + return $tokens->prepend('($this->filters->escape)(')->append(')'); + default: + throw new CompileException("Unknown context $contentType."); + } + } +} diff --git a/vendor/latte/latte/src/Latte/Compiler/Token.php b/vendor/latte/latte/src/Latte/Compiler/Token.php new file mode 100644 index 0000000..ec4a1b1 --- /dev/null +++ b/vendor/latte/latte/src/Latte/Compiler/Token.php @@ -0,0 +1,52 @@ +? used for types MACRO_TAG, HTML_TAG_BEGIN */ + public $closing; + + /** @var bool is tag empty {name/}? used for type MACRO_TAG */ + public $empty; +} diff --git a/vendor/latte/latte/src/Latte/Compiler/TokenIterator.php b/vendor/latte/latte/src/Latte/Compiler/TokenIterator.php new file mode 100644 index 0000000..12e3830 --- /dev/null +++ b/vendor/latte/latte/src/Latte/Compiler/TokenIterator.php @@ -0,0 +1,226 @@ +tokens = $tokens; + } + + + /** + * Returns current token. + */ + public function currentToken(): ?array + { + return $this->tokens[$this->position] ?? null; + } + + + /** + * Returns current token value. + */ + public function currentValue(): ?string + { + return $this->tokens[$this->position][Tokenizer::VALUE] ?? null; + } + + + /** + * Returns next token. + * @param int|string $args desired token type or value + */ + public function nextToken(...$args): ?array + { + return $this->scan($args, true, true); // onlyFirst, advance + } + + + /** + * Returns next token value. + * @param int|string $args desired token type or value + */ + public function nextValue(...$args): ?string + { + return $this->scan($args, true, true, true); // onlyFirst, advance, strings + } + + + /** + * Returns all next tokens. + * @param int|string $args desired token type or value + * @return array[] + */ + public function nextAll(...$args): array + { + return $this->scan($args, false, true); // advance + } + + + /** + * Returns all next tokens until it sees a given token type or value. + * @param int|string $args token type or value to stop before (required) + * @return array[] + */ + public function nextUntil(...$args): array + { + return $this->scan($args, false, true, false, true); // advance, until + } + + + /** + * Returns concatenation of all next token values. + * @param int|string $args token type or value to be joined + */ + public function joinAll(...$args): string + { + return $this->scan($args, false, true, true); // advance, strings + } + + + /** + * Returns concatenation of all next tokens until it sees a given token type or value. + * @param int|string $args token type or value to stop before (required) + */ + public function joinUntil(...$args): string + { + return $this->scan($args, false, true, true, true); // advance, strings, until + } + + + /** + * Checks the current token. + * @param int|string $args token type or value + */ + public function isCurrent(...$args): bool + { + if (!isset($this->tokens[$this->position])) { + return false; + } + $token = $this->tokens[$this->position]; + return in_array($token[Tokenizer::VALUE], $args, true) + || in_array($token[Tokenizer::TYPE], $args, true); + } + + + /** + * Checks the next token existence. + * @param int|string $args token type or value + */ + public function isNext(...$args): bool + { + return (bool) $this->scan($args, true, false); // onlyFirst + } + + + /** + * Checks the previous token existence. + * @param int|string $args token type or value + */ + public function isPrev(...$args): bool + { + return (bool) $this->scan($args, true, false, false, false, true); // onlyFirst, prev + } + + + /** + * Returns next expected token or throws exception. + * @param int|string $args desired token type or value + * @throws CompileException + */ + public function consumeValue(...$args): string + { + if ($token = $this->scan($args, true, true)) { // onlyFirst, advance + return $token[Tokenizer::VALUE]; + } + $pos = $this->position + 1; + while (($next = $this->tokens[$pos] ?? null) && in_array($next[Tokenizer::TYPE], $this->ignored, true)) { + $pos++; + } + throw new CompileException($next ? "Unexpected token '" . $next[Tokenizer::VALUE] . "'." : 'Unexpected end.'); + } + + + /** + * @return static + */ + public function reset() + { + $this->position = -1; + return $this; + } + + + /** + * Moves cursor to next token. + */ + protected function next(): void + { + $this->position++; + } + + + /** + * Looks for (first) (not) wanted tokens. + * @param array $wanted of desired token types or values + * @return mixed + */ + protected function scan(array $wanted, bool $onlyFirst, bool $advance, bool $strings = false, bool $until = false, bool $prev = false) + { + $res = $onlyFirst ? null : ($strings ? '' : []); + $pos = $this->position + ($prev ? -1 : 1); + do { + if (!isset($this->tokens[$pos])) { + return $res; + } + + $token = $this->tokens[$pos]; + if (!$wanted || (in_array($token[Tokenizer::VALUE], $wanted, true) || in_array($token[Tokenizer::TYPE], $wanted, true)) ^ $until) { + while ($advance && !$prev && $pos > $this->position) { + $this->next(); + } + + if ($onlyFirst) { + return $strings ? $token[Tokenizer::VALUE] : $token; + } elseif ($strings) { + $res .= $token[Tokenizer::VALUE]; + } else { + $res[] = $token; + } + + } elseif ($until || !in_array($token[Tokenizer::TYPE], $this->ignored, true)) { + return $res; + } + $pos += $prev ? -1 : 1; + } while (true); + } +} diff --git a/vendor/latte/latte/src/Latte/Compiler/Tokenizer.php b/vendor/latte/latte/src/Latte/Compiler/Tokenizer.php new file mode 100644 index 0000000..b899763 --- /dev/null +++ b/vendor/latte/latte/src/Latte/Compiler/Tokenizer.php @@ -0,0 +1,86 @@ + pattern] + * @param string $flags regular expression flag + */ + public function __construct(array $patterns, string $flags = '') + { + $this->re = '~(' . implode(')|(', $patterns) . ')~A' . $flags; + $this->types = array_keys($patterns); + } + + + /** + * Tokenizes string. + */ + public function tokenize(string $input): array + { + preg_match_all($this->re, $input, $tokens, PREG_SET_ORDER); + if (preg_last_error()) { + throw new RegexpException(null, preg_last_error()); + } + $len = 0; + $count = count($this->types); + foreach ($tokens as &$match) { + $type = null; + for ($i = 1; $i <= $count; $i++) { + if (!isset($match[$i])) { + break; + } elseif ($match[$i] != null) { + $type = $this->types[$i - 1]; + break; + } + } + $match = [self::VALUE => $match[0], self::OFFSET => $len, self::TYPE => $type]; + $len += strlen($match[self::VALUE]); + } + if ($len !== strlen($input)) { + [$line, $col] = $this->getCoordinates($input, $len); + $token = str_replace("\n", '\n', substr($input, $len, 10)); + throw new CompileException("Unexpected '$token' on line $line, column $col."); + } + return $tokens; + } + + + /** + * Returns position of token in input string. + * @return array of [line, column] + */ + public static function getCoordinates(string $text, int $offset): array + { + $text = substr($text, 0, $offset); + return [substr_count($text, "\n") + 1, $offset - strrpos("\n" . $text, "\n") + 1]; + } +} diff --git a/vendor/latte/latte/src/Latte/Engine.php b/vendor/latte/latte/src/Latte/Engine.php new file mode 100644 index 0000000..62f4cd9 --- /dev/null +++ b/vendor/latte/latte/src/Latte/Engine.php @@ -0,0 +1,370 @@ +filters = new Runtime\FilterExecutor; + } + + + /** + * Renders template to output. + */ + public function render(string $name, array $params = [], string $block = null): void + { + $this->createTemplate($name, $params + ['_renderblock' => $block]) + ->render(); + } + + + /** + * Renders template to string. + */ + public function renderToString(string $name, array $params = [], string $block = null): string + { + $template = $this->createTemplate($name, $params + ['_renderblock' => $block]); + return $template->capture([$template, 'render']); + } + + + /** + * Creates template object. + */ + public function createTemplate(string $name, array $params = []): Runtime\Template + { + $class = $this->getTemplateClass($name); + if (!class_exists($class, false)) { + $this->loadTemplate($name); + } + return new $class($this, $params, $this->filters, $this->providers, $name); + } + + + /** + * Compiles template to PHP code. + */ + public function compile(string $name): string + { + foreach ($this->onCompile ?: [] as $cb) { + (Helpers::checkCallback($cb))($this); + } + $this->onCompile = []; + + $source = $this->getLoader()->getContent($name); + + try { + $tokens = $this->getParser()->setContentType($this->contentType) + ->parse($source); + + $code = $this->getCompiler()->setContentType($this->contentType) + ->compile($tokens, $this->getTemplateClass($name)); + + } catch (\Exception $e) { + if (!$e instanceof CompileException) { + $e = new CompileException("Thrown exception '{$e->getMessage()}'", 0, $e); + } + $line = isset($tokens) ? $this->getCompiler()->getLine() : $this->getParser()->getLine(); + throw $e->setSource($source, $line, $name); + } + + if (!preg_match('#\n|\?#', $name)) { + $code = "" . $code; + } + if ($this->strictTypes) { + $code = "" . $code; + } + $code = PhpHelpers::reformatCode($code); + return $code; + } + + + /** + * Compiles template to cache. + * @throws \LogicException + */ + public function warmupCache(string $name): void + { + if (!$this->tempDirectory) { + throw new \LogicException('Path to temporary directory is not set.'); + } + + $class = $this->getTemplateClass($name); + if (!class_exists($class, false)) { + $this->loadTemplate($name); + } + } + + + private function loadTemplate(string $name): void + { + if (!$this->tempDirectory) { + $code = $this->compile($name); + if (@eval('?>' . $code) === false) { // @ is escalated to exception + throw (new CompileException('Error in template: ' . error_get_last()['message'])) + ->setSource($code, error_get_last()['line'], "$name (compiled)"); + } + return; + } + + $file = $this->getCacheFile($name); + + if (!$this->isExpired($file, $name) && (@include $file) !== false) { // @ - file may not exist + return; + } + + if (!is_dir($this->tempDirectory) && !@mkdir($this->tempDirectory) && !is_dir($this->tempDirectory)) { // @ - dir may already exist + throw new \RuntimeException("Unable to create directory '$this->tempDirectory'. " . error_get_last()['message']); + } + + $handle = @fopen("$file.lock", 'c+'); // @ is escalated to exception + if (!$handle) { + throw new \RuntimeException("Unable to create file '$file.lock'. " . error_get_last()['message']); + } elseif (!@flock($handle, LOCK_EX)) { // @ is escalated to exception + throw new \RuntimeException("Unable to acquire exclusive lock on '$file.lock'. " . error_get_last()['message']); + } + + if (!is_file($file) || $this->isExpired($file, $name)) { + $code = $this->compile($name); + if (file_put_contents("$file.tmp", $code) !== strlen($code) || !rename("$file.tmp", $file)) { + @unlink("$file.tmp"); // @ - file may not exist + throw new \RuntimeException("Unable to create '$file'."); + } elseif (function_exists('opcache_invalidate')) { + @opcache_invalidate($file, true); // @ can be restricted + } + } + + if ((include $file) === false) { + throw new \RuntimeException("Unable to load '$file'."); + } + + flock($handle, LOCK_UN); + fclose($handle); + @unlink("$file.lock"); // @ file may become locked on Windows + } + + + private function isExpired(string $file, string $name): bool + { + return $this->autoRefresh && $this->getLoader()->isExpired($name, (int) @filemtime($file)); // @ - file may not exist + } + + + public function getCacheFile(string $name): string + { + $hash = substr($this->getTemplateClass($name), 8); + $base = preg_match('#([/\\\\][\w@.-]{3,35}){1,3}\z#', $name, $m) + ? preg_replace('#[^\w@.-]+#', '-', substr($m[0], 1)) . '--' + : ''; + return "$this->tempDirectory/$base$hash.php"; + } + + + public function getTemplateClass(string $name): string + { + $key = $this->getLoader()->getUniqueId($name) . "\00" . self::VERSION; + return 'Template' . substr(md5($key), 0, 10); + } + + + /** + * Registers run-time filter. + * @return static + */ + public function addFilter(?string $name, callable $callback) + { + $this->filters->add($name, $callback); + return $this; + } + + + /** + * Returns all run-time filters. + * @return string[] + */ + public function getFilters(): array + { + return $this->filters->getAll(); + } + + + /** + * Call a run-time filter. + * @return mixed + */ + public function invokeFilter(string $name, array $args) + { + return ($this->filters->$name)(...$args); + } + + + /** + * Adds new macro. + * @return static + */ + public function addMacro(string $name, IMacro $macro) + { + $this->getCompiler()->addMacro($name, $macro); + return $this; + } + + + /** + * Adds new provider. + * @return static + */ + public function addProvider(string $name, $value) + { + $this->providers[$name] = $value; + return $this; + } + + + /** + * Returns all providers. + */ + public function getProviders(): array + { + return $this->providers; + } + + + /** + * @return static + */ + public function setContentType(string $type) + { + $this->contentType = $type; + return $this; + } + + + /** + * Sets path to temporary directory. + * @return static + */ + public function setTempDirectory(string $path) + { + $this->tempDirectory = $path; + return $this; + } + + + /** + * Sets auto-refresh mode. + * @return static + */ + public function setAutoRefresh(bool $on = true) + { + $this->autoRefresh = $on; + return $this; + } + + + /** + * Enables declare(strict_types=1) in templates. + * @return static + */ + public function setStrictTypes(bool $on = true) + { + $this->strictTypes = $on; + return $this; + } + + + public function getParser(): Parser + { + if (!$this->parser) { + $this->parser = new Parser; + } + return $this->parser; + } + + + public function getCompiler(): Compiler + { + if (!$this->compiler) { + $this->compiler = new Compiler; + Macros\CoreMacros::install($this->compiler); + Macros\BlockMacros::install($this->compiler); + } + return $this->compiler; + } + + + /** + * @return static + */ + public function setLoader(ILoader $loader) + { + $this->loader = $loader; + return $this; + } + + + public function getLoader(): ILoader + { + if (!$this->loader) { + $this->loader = new Loaders\FileLoader; + } + return $this->loader; + } +} diff --git a/vendor/latte/latte/src/Latte/Helpers.php b/vendor/latte/latte/src/Latte/Helpers.php new file mode 100644 index 0000000..2d36cda --- /dev/null +++ b/vendor/latte/latte/src/Latte/Helpers.php @@ -0,0 +1,70 @@ + 1, 'hr' => 1, 'br' => 1, 'input' => 1, 'meta' => 1, 'area' => 1, 'embed' => 1, 'keygen' => 1, 'source' => 1, 'base' => 1, + 'col' => 1, 'link' => 1, 'param' => 1, 'basefont' => 1, 'frame' => 1, 'isindex' => 1, 'wbr' => 1, 'command' => 1, 'track' => 1, + ]; + + + /** + * Checks callback. + */ + public static function checkCallback($callable): callable + { + if (!is_callable($callable, false, $text)) { + throw new \InvalidArgumentException("Callback '$text' is not callable."); + } + return $callable; + } + + + /** + * Finds the best suggestion. + */ + public static function getSuggestion(array $items, $value): ?string + { + $best = null; + $min = (strlen($value) / 4 + 1) * 10 + .1; + foreach (array_unique($items, SORT_REGULAR) as $item) { + $item = is_object($item) ? $item->getName() : $item; + if (($len = levenshtein($item, $value, 10, 11, 10)) > 0 && $len < $min) { + $min = $len; + $best = $item; + } + } + return $best; + } + + + public static function removeFilter(string &$modifier, string $filter): bool + { + $modifier = preg_replace('#\|(' . $filter . ')\s?(?=\||\z)#i', '', $modifier, -1, $found); + return (bool) $found; + } + + + /** + * Starts the $haystack string with the prefix $needle? + */ + public static function startsWith(string $haystack, string $needle): bool + { + return strncmp($haystack, $needle, strlen($needle)) === 0; + } +} diff --git a/vendor/latte/latte/src/Latte/ILoader.php b/vendor/latte/latte/src/Latte/ILoader.php new file mode 100644 index 0000000..2f1817b --- /dev/null +++ b/vendor/latte/latte/src/Latte/ILoader.php @@ -0,0 +1,38 @@ +baseDir = $baseDir ? $this->normalizePath("$baseDir/") : null; + } + + + /** + * Returns template source code. + */ + public function getContent($fileName): string + { + $file = $this->baseDir . $fileName; + if ($this->baseDir && !Latte\Helpers::startsWith($this->normalizePath($file), $this->baseDir)) { + throw new \RuntimeException("Template '$file' is not within the allowed path '$this->baseDir'."); + + } elseif (!is_file($file)) { + throw new \RuntimeException("Missing template file '$file'."); + + } elseif ($this->isExpired($fileName, time())) { + if (@touch($file) === false) { + trigger_error("File's modification time is in the future. Cannot update it: " . error_get_last()['message'], E_USER_WARNING); + } + } + return file_get_contents($file); + } + + + public function isExpired($file, $time): bool + { + return @filemtime($this->baseDir . $file) > $time; // @ - stat may fail + } + + + /** + * Returns referred template name. + */ + public function getReferredName($file, $referringFile): string + { + if ($this->baseDir || !preg_match('#/|\\\\|[a-z][a-z0-9+.-]*:#iA', $file)) { + $file = $this->normalizePath($referringFile . '/../' . $file); + } + return $file; + } + + + /** + * Returns unique identifier for caching. + */ + public function getUniqueId($file): string + { + return $this->baseDir . strtr($file, '/', DIRECTORY_SEPARATOR); + } + + + private static function normalizePath(string $path): string + { + $res = []; + foreach (explode('/', strtr($path, '\\', '/')) as $part) { + if ($part === '..' && $res && end($res) !== '..') { + array_pop($res); + } elseif ($part !== '.') { + $res[] = $part; + } + } + return implode(DIRECTORY_SEPARATOR, $res); + } +} diff --git a/vendor/latte/latte/src/Latte/Loaders/StringLoader.php b/vendor/latte/latte/src/Latte/Loaders/StringLoader.php new file mode 100644 index 0000000..dbdf092 --- /dev/null +++ b/vendor/latte/latte/src/Latte/Loaders/StringLoader.php @@ -0,0 +1,72 @@ + content] */ + private $templates; + + + public function __construct(array $templates = null) + { + $this->templates = $templates; + } + + + /** + * Returns template source code. + */ + public function getContent($name): string + { + if ($this->templates === null) { + return $name; + } elseif (isset($this->templates[$name])) { + return $this->templates[$name]; + } else { + throw new \RuntimeException("Missing template '$name'."); + } + } + + + public function isExpired($name, $time): bool + { + return false; + } + + + /** + * Returns referred template name. + */ + public function getReferredName($name, $referringName): string + { + if ($this->templates === null) { + throw new \LogicException("Missing template '$name'."); + } + return $name; + } + + + /** + * Returns unique identifier for caching. + */ + public function getUniqueId($name): string + { + return $this->getContent($name); + } +} diff --git a/vendor/latte/latte/src/Latte/Macros/BlockMacros.php b/vendor/latte/latte/src/Latte/Macros/BlockMacros.php new file mode 100644 index 0000000..e067efe --- /dev/null +++ b/vendor/latte/latte/src/Latte/Macros/BlockMacros.php @@ -0,0 +1,420 @@ +addMacro('include', [$me, 'macroInclude']); + $me->addMacro('includeblock', [$me, 'macroIncludeBlock']); // deprecated + $me->addMacro('import', [$me, 'macroImport'], null, null, self::ALLOWED_IN_HEAD); + $me->addMacro('extends', [$me, 'macroExtends'], null, null, self::ALLOWED_IN_HEAD); + $me->addMacro('layout', [$me, 'macroExtends'], null, null, self::ALLOWED_IN_HEAD); + $me->addMacro('snippet', [$me, 'macroBlock'], [$me, 'macroBlockEnd']); + $me->addMacro('block', [$me, 'macroBlock'], [$me, 'macroBlockEnd'], null, self::AUTO_CLOSE); + $me->addMacro('define', [$me, 'macroBlock'], [$me, 'macroBlockEnd']); + $me->addMacro('snippetArea', [$me, 'macroBlock'], [$me, 'macroBlockEnd']); + $me->addMacro('ifset', [$me, 'macroIfset'], '}'); + $me->addMacro('elseifset', [$me, 'macroIfset']); + } + + + /** + * Initializes before template parsing. + * @return void + */ + public function initialize() + { + $this->namedBlocks = []; + $this->blockTypes = []; + $this->extends = null; + $this->imports = []; + } + + + /** + * Finishes template parsing. + */ + public function finalize() + { + $compiler = $this->getCompiler(); + $functions = []; + foreach ($this->namedBlocks as $name => $code) { + $compiler->addMethod( + $functions[$name] = $this->generateMethodName($name), + '?>' . $compiler->expandTokens($code) . 'namedBlocks) { + $compiler->addProperty('blocks', $functions); + $compiler->addProperty('blockTypes', $this->blockTypes); + } + + return [ + ($this->extends === null ? '' : '$this->parentName = ' . $this->extends . ';') . implode($this->imports), + ]; + } + + + /********************* macros ****************d*g**/ + + + /** + * {include block} + */ + public function macroInclude(MacroNode $node, PhpWriter $writer) + { + $node->replaced = false; + $destination = $node->tokenizer->fetchWord(); // destination [,] [params] + if (!preg_match('~#|[\w-]+\z~A', $destination)) { + return false; + } + + $destination = ltrim($destination, '#'); + $parent = $destination === 'parent'; + if ($destination === 'parent' || $destination === 'this') { + for ( + $item = $node->parentNode; + $item && $item->name !== 'block' && !isset($item->data->name); + $item = $item->parentNode + ); + if (!$item) { + throw new CompileException("Cannot include $destination block outside of any block."); + } + $destination = $item->data->name; + } + + $noEscape = Helpers::removeFilter($node->modifiers, 'noescape'); + if (!$noEscape && Helpers::removeFilter($node->modifiers, 'escape')) { + trigger_error('Macro ' . $node->getNotation() . ' provides auto-escaping, remove |escape.'); + } + if ($node->modifiers && !$noEscape) { + $node->modifiers .= '|escape'; + } + return $writer->write( + '$this->renderBlock' . ($parent ? 'Parent' : '') . '(' + . (strpos($destination, '$') === false ? var_export($destination, true) : $destination) + . ', %node.array? + ' + . (isset($this->namedBlocks[$destination]) || $parent ? 'get_defined_vars()' : '$this->params') + . ($node->modifiers + ? ', function ($s, $type) { $_fi = new LR\FilterInfo($type); return %modifyContent($s); }' + : ($noEscape || $parent ? '' : ', ' . var_export(implode($node->context), true))) + . ');' + ); + } + + + /** + * {includeblock "file"} + * @deprecated + */ + public function macroIncludeBlock(MacroNode $node, PhpWriter $writer) + { + //trigger_error('Macro {includeblock} is deprecated, use similar macro {import}.', E_USER_DEPRECATED); + $node->replaced = false; + if ($node->modifiers) { + throw new CompileException('Modifiers are not allowed in ' . $node->getNotation()); + } + return $writer->write( + 'ob_start(function () {}); $this->createTemplate(%node.word, %node.array? + get_defined_vars(), "includeblock")->renderToContentType(%var); echo rtrim(ob_get_clean());', + implode($node->context) + ); + } + + + /** + * {import "file"} + */ + public function macroImport(MacroNode $node, PhpWriter $writer) + { + if ($node->modifiers) { + throw new CompileException('Modifiers are not allowed in ' . $node->getNotation()); + } + $destination = $node->tokenizer->fetchWord(); + $this->checkExtraArgs($node); + $code = $writer->write('$this->createTemplate(%word, $this->params, "import")->render();', $destination); + if ($this->getCompiler()->isInHead()) { + $this->imports[] = $code; + } else { + return $code; + } + } + + + /** + * {extends none | $var | "file"} + */ + public function macroExtends(MacroNode $node, PhpWriter $writer) + { + $notation = $node->getNotation(); + if ($node->modifiers) { + throw new CompileException("Modifiers are not allowed in $notation"); + } elseif (!$node->args) { + throw new CompileException("Missing destination in $notation"); + } elseif ($node->parentNode) { + throw new CompileException("$notation must be placed outside any macro."); + } elseif ($this->extends !== null) { + throw new CompileException("Multiple $notation declarations are not allowed."); + } elseif ($node->args === 'none') { + $this->extends = 'FALSE'; + } else { + $this->extends = $writer->write('%node.word%node.args'); + } + if (!$this->getCompiler()->isInHead()) { + trigger_error("$notation must be placed in template head.", E_USER_WARNING); + } + } + + + /** + * {block [name]} + * {snippet [name]} + * {snippetArea [name]} + * {define name} + */ + public function macroBlock(MacroNode $node, PhpWriter $writer) + { + $name = $node->tokenizer->fetchWord(); + + if ($node->name === 'block' && $name === null) { // anonymous block + return $node->modifiers === '' ? '' : 'ob_start(function () {})'; + + } elseif ($node->name === 'define' && $node->modifiers) { + throw new CompileException('Modifiers are not allowed in ' . $node->getNotation()); + } + + $node->data->name = $name = ltrim((string) $name, '#'); + if ($name == null) { + if ($node->name === 'define') { + throw new CompileException('Missing block name.'); + } + + } elseif (strpos($name, '$') !== false) { // dynamic block/snippet + if ($node->name === 'snippet') { + for ( + $parent = $node->parentNode; + $parent && !($parent->name === 'snippet' || $parent->name === 'snippetArea'); + $parent = $parent->parentNode + ); + if (!$parent) { + throw new CompileException('Dynamic snippets are allowed only inside static snippet/snippetArea.'); + } + $parent->data->dynamic = true; + $node->data->leave = true; + $node->closingCode = 'global->snippetDriver->leave(); ?>'; + $enterCode = '$this->global->snippetDriver->enter(' . $writer->formatWord($name) . ', "' . SnippetDriver::TYPE_DYNAMIC . '");'; + + if ($node->prefix) { + $node->attrCode = $writer->write("global->snippetDriver->getHtmlId({$writer->formatWord($name)})) . '\"' ?>"); + return $writer->write($enterCode); + } + $node->closingCode .= "\n"; + $this->checkExtraArgs($node); + return $writer->write("?>\n
global->snippetDriver->getHtmlId({$writer->formatWord($name)})) ?>\">data->leave = true; + $node->data->func = $this->generateMethodName($name); + $fname = $writer->formatWord($name); + if ($node->name === 'define') { + $node->closingCode = ''; + } else { + if (Helpers::startsWith((string) $node->context[1], Latte\Compiler::CONTEXT_HTML_ATTRIBUTE)) { + $node->context[1] = ''; + $node->modifiers .= '|escape'; + } elseif ($node->modifiers) { + $node->modifiers .= '|escape'; + } + $node->closingCode = $writer->write('renderBlock(%raw, get_defined_vars()' + . ($node->modifiers ? ', function ($s, $type) { $_fi = new LR\FilterInfo($type); return %modifyContent($s); }' : '') . '); ?>', $fname); + } + $blockType = var_export(implode($node->context), true); + $this->checkExtraArgs($node); + return "\$this->checkBlockContentType($blockType, $fname);" + . "\$this->blockQueue[$fname][] = [\$this, '{$node->data->func}'];"; + } + } + + // static snippet/snippetArea + if ($node->name === 'snippet' || $node->name === 'snippetArea') { + if ($node->prefix && isset($node->htmlNode->attrs['id'])) { + throw new CompileException('Cannot combine HTML attribute id with n:snippet.'); + } + $node->data->name = $name = '_' . $name; + } + + if (isset($this->namedBlocks[$name])) { + throw new CompileException("Cannot redeclare static {$node->name} '$name'"); + } + $extendsCheck = $this->namedBlocks ? '' : 'if ($this->getParentName()) return get_defined_vars();'; + $this->namedBlocks[$name] = true; + + if (Helpers::removeFilter($node->modifiers, 'escape')) { + trigger_error('Macro ' . $node->getNotation() . ' provides auto-escaping, remove |escape.'); + } + if (Helpers::startsWith((string) $node->context[1], Latte\Compiler::CONTEXT_HTML_ATTRIBUTE)) { + $node->context[1] = ''; + $node->modifiers .= '|escape'; + } elseif ($node->modifiers) { + $node->modifiers .= '|escape'; + } + $this->blockTypes[$name] = implode($node->context); + + $include = '$this->renderBlock(%var, ' . (($node->name === 'snippet' || $node->name === 'snippetArea') ? '$this->params' : 'get_defined_vars()') + . ($node->modifiers ? ', function ($s, $type) { $_fi = new LR\FilterInfo($type); return %modifyContent($s); }' : '') . ')'; + + if ($node->name === 'snippet') { + if ($node->prefix) { + if (isset($node->htmlNode->macroAttrs['foreach'])) { + trigger_error('Combination of n:snippet with n:foreach is invalid, use n:inner-foreach.', E_USER_WARNING); + } + $node->attrCode = $writer->write('global->snippetDriver->getHtmlId(%var)) . \'"\' ?>', (string) substr($name, 1)); + return $writer->write($include, $name); + } + $this->checkExtraArgs($node); + return $writer->write("?>\n
global->snippetDriver->getHtmlId(%var)) ?>\">\n
name === 'define') { + $tokens = $node->tokenizer; + $args = []; + while ($tokens->isNext()) { + $args[] = $tokens->consumeValue($tokens::T_VARIABLE); + if ($tokens->isNext()) { + $tokens->consumeValue(','); + } + } + if ($args) { + $node->data->args = 'list(' . implode(', ', $args) . ') = $_args + [' . str_repeat('NULL, ', count($args)) . '];'; + } + return $extendsCheck; + + } else { // block, snippetArea + $this->checkExtraArgs($node); + return $writer->write($extendsCheck . $include, $name); + } + } + + + /** + * {/block} + * {/snippet} + * {/snippetArea} + * {/define} + */ + public function macroBlockEnd(MacroNode $node, PhpWriter $writer) + { + if (isset($node->data->name)) { // block, snippet, define + if ($asInner = $node->name === 'snippet' && $node->prefix === MacroNode::PREFIX_NONE) { + $node->content = $node->innerContent; + } + + if (($node->name === 'snippet' || $node->name === 'snippetArea') && strpos($node->data->name, '$') === false) { + $type = $node->name === 'snippet' ? SnippetDriver::TYPE_STATIC : SnippetDriver::TYPE_AREA; + $node->content = 'global->snippetDriver->enter(' + . $writer->formatWord(substr($node->data->name, 1)) + . ', "' . $type . '"); ?>' + . preg_replace('#(?<=\n)[ \t]+\z#', '', $node->content) . 'global->snippetDriver->leave(); ?>'; + } + if (empty($node->data->leave)) { + if (preg_match('#\$|n:#', $node->content)) { + $node->content = 'data->args) ? 'extract($this->params); ' . $node->data->args : 'extract($_args);') . ' ?>' + . $node->content; + } + $this->namedBlocks[$node->data->name] = $tmp = preg_replace('#^\n+|(?<=\n)[ \t]+\z#', '', $node->content); + $node->content = substr_replace($node->content, $node->openingCode . "\n", strspn($node->content, "\n"), strlen($tmp)); + $node->openingCode = ''; + + } elseif (isset($node->data->func)) { + $node->content = rtrim($node->content, " \t"); + $this->getCompiler()->addMethod( + $node->data->func, + $this->getCompiler()->expandTokens("extract(\$_args);\n?>$node->contentcontent = ''; + } + + if ($asInner) { // n:snippet -> n:inner-snippet + $node->innerContent = $node->openingCode . $node->content . $node->closingCode; + $node->closingCode = $node->openingCode = ''; + } + return ' '; // consume next new line + + } elseif ($node->modifiers) { // anonymous block with modifier + $node->modifiers .= '|escape'; + return $writer->write('$_fi = new LR\FilterInfo(%var); echo %modifyContent(ob_get_clean());', $node->context[0]); + } + } + + + /** + * {ifset block} + * {elseifset block} + */ + public function macroIfset(MacroNode $node, PhpWriter $writer) + { + if ($node->modifiers) { + throw new CompileException('Modifiers are not allowed in ' . $node->getNotation()); + } + if (!preg_match('~#|[\w-]+\z~A', $node->args)) { + return false; + } + $list = []; + while (($name = $node->tokenizer->fetchWord()) !== null) { + $list[] = preg_match('~#|[\w-]+\z~A', $name) + ? '$this->blockQueue["' . ltrim($name, '#') . '"]' + : $writer->formatArgs(new Latte\MacroTokens($name)); + } + return ($node->name === 'elseifset' ? '} else' : '') + . 'if (isset(' . implode(', ', $list) . ')) {'; + } + + + private function generateMethodName(string $blockName): string + { + $clean = trim(preg_replace('#\W+#', '_', $blockName), '_'); + $name = 'block' . ucfirst($clean); + $methods = array_keys($this->getCompiler()->getMethods()); + if (!$clean || in_array(strtolower($name), array_map('strtolower', $methods), true)) { + $name .= '_' . substr(md5($blockName), 0, 5); + } + return $name; + } +} diff --git a/vendor/latte/latte/src/Latte/Macros/CoreMacros.php b/vendor/latte/latte/src/Latte/Macros/CoreMacros.php new file mode 100644 index 0000000..b529768 --- /dev/null +++ b/vendor/latte/latte/src/Latte/Macros/CoreMacros.php @@ -0,0 +1,515 @@ + value} set template parameter + * - {default var => value} set default template parameter + * - {dump $var} + * - {debugbreak} + * - {contentType ...} HTTP Content-Type header + * - {l} {r} to display { } + */ +class CoreMacros extends MacroSet +{ + /** @var array */ + private $overwrittenVars; + + + public static function install(Latte\Compiler $compiler): void + { + $me = new static($compiler); + + $me->addMacro('if', [$me, 'macroIf'], [$me, 'macroEndIf']); + $me->addMacro('elseif', '} elseif (%node.args) {'); + $me->addMacro('else', [$me, 'macroElse']); + $me->addMacro('ifset', 'if (isset(%node.args)) {', '}'); + $me->addMacro('elseifset', '} elseif (isset(%node.args)) {'); + $me->addMacro('ifcontent', [$me, 'macroIfContent'], [$me, 'macroEndIfContent']); + + $me->addMacro('switch', '$this->global->switch[] = (%node.args); if (false) {', '} array_pop($this->global->switch)'); + $me->addMacro('case', '} elseif (end($this->global->switch) === (%node.args)) {'); + + $me->addMacro('foreach', '', [$me, 'macroEndForeach']); + $me->addMacro('for', 'for (%node.args) {', '}'); + $me->addMacro('while', [$me, 'macroWhile'], [$me, 'macroEndWhile']); + $me->addMacro('continueIf', [$me, 'macroBreakContinueIf']); + $me->addMacro('breakIf', [$me, 'macroBreakContinueIf']); + $me->addMacro('first', 'if ($iterator->isFirst(%node.args)) {', '}'); + $me->addMacro('last', 'if ($iterator->isLast(%node.args)) {', '}'); + $me->addMacro('sep', 'if (!$iterator->isLast(%node.args)) {', '}'); + + $me->addMacro('var', [$me, 'macroVar']); + $me->addMacro('default', [$me, 'macroVar']); + $me->addMacro('dump', [$me, 'macroDump']); + $me->addMacro('debugbreak', [$me, 'macroDebugbreak']); + $me->addMacro('l', '?>{addMacro('r', '?>}addMacro('_', [$me, 'macroTranslate'], [$me, 'macroTranslate']); + $me->addMacro('=', [$me, 'macroExpr']); + + $me->addMacro('capture', [$me, 'macroCapture'], [$me, 'macroCaptureEnd']); + $me->addMacro('spaceless', [$me, 'macroSpaceless'], [$me, 'macroSpaceless']); + $me->addMacro('include', [$me, 'macroInclude']); + $me->addMacro('contentType', [$me, 'macroContentType'], null, null, self::ALLOWED_IN_HEAD); + $me->addMacro('php', [$me, 'macroExpr']); + + $me->addMacro('class', null, null, [$me, 'macroClass']); + $me->addMacro('attr', null, null, [$me, 'macroAttr']); + } + + + /** + * Initializes before template parsing. + * @return void + */ + public function initialize() + { + $this->overwrittenVars = []; + } + + + /** + * Finishes template parsing. + * @return array|null [prolog, epilog] + */ + public function finalize() + { + $code = ''; + foreach ($this->overwrittenVars as $var => $lines) { + $s = var_export($var, true); + $code .= 'if (isset($this->params[' . var_export($var, true) + . "])) trigger_error('Variable $" . addcslashes($var, "'") . ' overwritten in foreach on line ' . implode(', ', $lines) . "'); "; + } + $code = $code ? 'if (!$this->getReferringTemplate() || $this->getReferenceType() === "extends") { ' . $code . '}' : ''; + return [$code]; + } + + + /********************* macros ****************d*g**/ + + + /** + * {if ...} + */ + public function macroIf(MacroNode $node, PhpWriter $writer) + { + if ($node->modifiers) { + throw new CompileException('Modifiers are not allowed in ' . $node->getNotation()); + } + if ($node->data->capture = ($node->args === '')) { + return 'ob_start(function () {})'; + } + if ($node->prefix === $node::PREFIX_TAG) { + return $writer->write($node->htmlNode->closing ? 'if (array_pop($this->global->ifs)) {' : 'if ($this->global->ifs[] = (%node.args)) {'); + } + return $writer->write('if (%node.args) {'); + } + + + /** + * {/if ...} + */ + public function macroEndIf(MacroNode $node, PhpWriter $writer) + { + if ($node->data->capture) { + if ($node->args === '') { + throw new CompileException('Missing condition in {if} macro.'); + } + return $writer->write('if (%node.args) ' + . (isset($node->data->else) ? '{ ob_end_clean(); echo ob_get_clean(); }' : 'echo ob_get_clean();') + . ' else ' + . (isset($node->data->else) ? '{ $this->global->else = ob_get_clean(); ob_end_clean(); echo $this->global->else; }' : 'ob_end_clean();') + ); + } + return '}'; + } + + + /** + * {else} + */ + public function macroElse(MacroNode $node, PhpWriter $writer) + { + if ($node->modifiers) { + throw new CompileException('Modifiers are not allowed in ' . $node->getNotation()); + } elseif ($node->args) { + $hint = Helpers::startsWith($node->args, 'if') ? ', did you mean {elseif}?' : ''; + throw new CompileException('Arguments are not allowed in ' . $node->getNotation() . $hint); + } + $ifNode = $node->parentNode; + if ($ifNode && $ifNode->name === 'if' && $ifNode->data->capture) { + if (isset($ifNode->data->else)) { + throw new CompileException('Macro {if} supports only one {else}.'); + } + $ifNode->data->else = true; + return 'ob_start(function () {})'; + } + return '} else {'; + } + + + /** + * n:ifcontent + */ + public function macroIfContent(MacroNode $node, PhpWriter $writer) + { + if (!$node->prefix || $node->prefix !== MacroNode::PREFIX_NONE) { + throw new CompileException('Unknown ' . $node->getNotation() . ", use n:{$node->name} attribute."); + } + } + + + /** + * n:ifcontent + */ + public function macroEndIfContent(MacroNode $node, PhpWriter $writer) + { + $node->openingCode = ''; + $node->innerContent = '' . $node->innerContent . 'global->ifcontent = ob_get_flush(); ?>'; + $node->closingCode = 'global->ifcontent) === "") ob_end_clean(); else echo ob_get_clean(); ?>'; + } + + + /** + * {_$var |modifiers} + */ + public function macroTranslate(MacroNode $node, PhpWriter $writer) + { + if ($node->closing) { + if (strpos($node->content, 'content, true); + $node->content = ''; + } else { + $node->openingCode = '' . $node->openingCode; + $value = 'ob_get_clean()'; + } + + return $writer->write('$_fi = new LR\FilterInfo(%var); echo %modifyContent($this->filters->filterContent("translate", $_fi, %raw))', $node->context[0], $value); + + } elseif ($node->empty = ($node->args !== '')) { + return $writer->write('echo %modify(($this->filters->translate)(%node.args))'); + } + } + + + /** + * {include "file" [,] [params]} + */ + public function macroInclude(MacroNode $node, PhpWriter $writer) + { + $node->replaced = false; + $noEscape = Helpers::removeFilter($node->modifiers, 'noescape'); + if (!$noEscape && Helpers::removeFilter($node->modifiers, 'escape')) { + trigger_error('Macro {include} provides auto-escaping, remove |escape.'); + } + if ($node->modifiers && !$noEscape) { + $node->modifiers .= '|escape'; + } + return $writer->write( + '/* line ' . $node->startLine . ' */ + $this->createTemplate(%node.word, %node.array? + $this->params, "include")->renderToContentType(%raw);', + $node->modifiers + ? $writer->write('function ($s, $type) { $_fi = new LR\FilterInfo($type); return %modifyContent($s); }') + : var_export($noEscape ? null : implode($node->context), true) + ); + } + + + /** + * {capture $variable} + */ + public function macroCapture(MacroNode $node, PhpWriter $writer) + { + $variable = $node->tokenizer->fetchWord(); + if (!Helpers::startsWith($variable, '$')) { + throw new CompileException("Invalid capture block variable '$variable'"); + } + $this->checkExtraArgs($node); + $node->data->variable = $variable; + return 'ob_start(function () {})'; + } + + + /** + * {/capture} + */ + public function macroCaptureEnd(MacroNode $node, PhpWriter $writer) + { + $body = in_array($node->context[0], [Engine::CONTENT_HTML, Engine::CONTENT_XHTML], true) + ? 'ob_get_length() ? new LR\\Html(ob_get_clean()) : ob_get_clean()' + : 'ob_get_clean()'; + return $writer->write("\$_fi = new LR\\FilterInfo(%var); %raw = %modifyContent($body);", $node->context[0], $node->data->variable); + } + + + /** + * {spaceless} ... {/spaceless} + */ + public function macroSpaceless(MacroNode $node, PhpWriter $writer) + { + if ($node->modifiers || $node->args) { + throw new CompileException('Modifiers and arguments are not allowed in ' . $node->getNotation()); + } + $node->openingCode = in_array($node->context[0], [Engine::CONTENT_HTML, Engine::CONTENT_XHTML], true) + ? '' + : ""; + $node->closingCode = ''; + } + + + /** + * {while ...} + */ + public function macroWhile(MacroNode $node, PhpWriter $writer) + { + if ($node->modifiers) { + throw new CompileException('Modifiers are not allowed in ' . $node->getNotation()); + } + if ($node->data->do = ($node->args === '')) { + return 'do {'; + } + return $writer->write('while (%node.args) {'); + } + + + /** + * {/while ...} + */ + public function macroEndWhile(MacroNode $node, PhpWriter $writer) + { + if ($node->data->do) { + if ($node->args === '') { + throw new CompileException('Missing condition in {while} macro.'); + } + return $writer->write('} while (%node.args);'); + } + return '}'; + } + + + /** + * {foreach ...} + */ + public function macroEndForeach(MacroNode $node, PhpWriter $writer) + { + $noCheck = Helpers::removeFilter($node->modifiers, 'nocheck'); + $noIterator = Helpers::removeFilter($node->modifiers, 'noiterator'); + if ($node->modifiers) { + throw new CompileException('Only modifiers |noiterator and |nocheck are allowed here.'); + } + $node->openingCode = 'formatArgs(); + if (!$noCheck) { + preg_match('#.+\s+as\s*\$(\w+)(?:\s*=>\s*\$(\w+))?#i', $args, $m); + for ($i = 1; $i < count($m); $i++) { + $this->overwrittenVars[$m[$i]][] = $node->startLine; + } + } + if (!$noIterator && preg_match('#\W(\$iterator|include|require|get_defined_vars)\W#', $this->getCompiler()->expandTokens($node->content))) { + $node->openingCode .= 'foreach ($iterator = $this->global->its[] = new LR\CachingIterator(' + . preg_replace('#(.*)\s+as\s+#i', '$1) as ', $args, 1) . ') { ?>'; + $node->closingCode = 'global->its); $iterator = end($this->global->its); ?>'; + } else { + $node->openingCode .= 'foreach (' . $args . ') { ?>'; + $node->closingCode = ''; + } + } + + + /** + * {breakIf ...} + * {continueIf ...} + */ + public function macroBreakContinueIf(MacroNode $node, PhpWriter $writer) + { + if ($node->modifiers) { + throw new CompileException('Modifiers are not allowed in ' . $node->getNotation()); + } + $cmd = str_replace('If', '', $node->name); + if ($node->parentNode && $node->parentNode->prefix === $node::PREFIX_NONE) { + return $writer->write("if (%node.args) { echo \"parentNode->htmlNode->name}>\\n\"; $cmd; }"); + } + return $writer->write("if (%node.args) $cmd;"); + } + + + /** + * n:class="..." + */ + public function macroClass(MacroNode $node, PhpWriter $writer) + { + if (isset($node->htmlNode->attrs['class'])) { + throw new CompileException('It is not possible to combine class with n:class.'); + } + return $writer->write('if ($_tmp = array_filter(%node.array)) echo \' class="\', %escape(implode(" ", array_unique($_tmp))), \'"\''); + } + + + /** + * n:attr="..." + */ + public function macroAttr(MacroNode $node, PhpWriter $writer) + { + return $writer->write('$_tmp = %node.array; echo LR\Filters::htmlAttributes(isset($_tmp[0]) && is_array($_tmp[0]) ? $_tmp[0] : $_tmp);'); + } + + + /** + * {dump ...} + */ + public function macroDump(MacroNode $node, PhpWriter $writer) + { + if ($node->modifiers) { + throw new CompileException('Modifiers are not allowed in ' . $node->getNotation()); + } + $args = $writer->formatArgs(); + return $writer->write( + 'Tracy\Debugger::barDump(' . ($args ? "($args)" : 'get_defined_vars()') . ', %var);', + $args ?: 'variables' + ); + } + + + /** + * {debugbreak ...} + */ + public function macroDebugbreak(MacroNode $node, PhpWriter $writer) + { + if ($node->modifiers) { + throw new CompileException('Modifiers are not allowed in ' . $node->getNotation()); + } + if (function_exists($func = 'debugbreak') || function_exists($func = 'xdebug_break')) { + return $writer->write($node->args == null ? "$func()" : "if (%node.args) $func();"); + } + } + + + /** + * {var ...} + * {default ...} + */ + public function macroVar(MacroNode $node, PhpWriter $writer) + { + if ($node->modifiers) { + throw new CompileException('Modifiers are not allowed in ' . $node->getNotation()); + } + if ($node->args === '' && $node->parentNode && $node->parentNode->name === 'switch') { + return '} else {'; + } + + $var = true; + $tokens = $writer->preprocess(); + $res = new Latte\MacroTokens; + while ($tokens->nextToken()) { + if ($var && $tokens->isCurrent($tokens::T_SYMBOL, $tokens::T_VARIABLE)) { + if ($node->name === 'default') { + $res->append("'" . ltrim($tokens->currentValue(), '$') . "'"); + } else { + $res->append('$' . ltrim($tokens->currentValue(), '$')); + } + $var = null; + + } elseif ($tokens->isCurrent('=', '=>') && $tokens->depth === 0) { + $res->append($node->name === 'default' ? '=>' : '='); + $var = false; + + } elseif ($tokens->isCurrent(',') && $tokens->depth === 0) { + if ($var === null) { + $res->append($node->name === 'default' ? '=>null' : '=null'); + } + $res->append($node->name === 'default' ? ',' : ';'); + $var = true; + + } elseif ($var === null && $node->name === 'default' && !$tokens->isCurrent($tokens::T_WHITESPACE)) { + throw new CompileException("Unexpected '{$tokens->currentValue()}' in {default $node->args}"); + + } else { + $res->append($tokens->currentToken()); + } + } + if ($var === null) { + $res->append($node->name === 'default' ? '=>null' : '=null'); + } + $out = $writer->quotingPass($res)->joinAll(); + return $node->name === 'default' ? "extract([$out], EXTR_SKIP)" : "$out;"; + } + + + /** + * {= ...} + * {php ...} + */ + public function macroExpr(MacroNode $node, PhpWriter $writer) + { + return $writer->write($node->name === '=' + ? "echo %modify(%node.args) /* line $node->startLine */" + : '%modify(%node.args);' + ); + } + + + /** + * {contentType ...} + */ + public function macroContentType(MacroNode $node, PhpWriter $writer) + { + if ( + !$this->getCompiler()->isInHead() + && !($node->htmlNode && strtolower($node->htmlNode->name) === 'script' && strpos($node->args, 'html') !== false) + ) { + throw new CompileException($node->getNotation() . ' is allowed only in template header.'); + } + $compiler = $this->getCompiler(); + if ($node->modifiers) { + throw new CompileException('Modifiers are not allowed in ' . $node->getNotation()); + } elseif (strpos($node->args, 'xhtml') !== false) { + $type = $compiler::CONTENT_XHTML; + } elseif (strpos($node->args, 'html') !== false) { + $type = $compiler::CONTENT_HTML; + } elseif (strpos($node->args, 'xml') !== false) { + $type = $compiler::CONTENT_XML; + } elseif (strpos($node->args, 'javascript') !== false) { + $type = $compiler::CONTENT_JS; + } elseif (strpos($node->args, 'css') !== false) { + $type = $compiler::CONTENT_CSS; + } elseif (strpos($node->args, 'calendar') !== false) { + $type = $compiler::CONTENT_ICAL; + } else { + $type = $compiler::CONTENT_TEXT; + } + $compiler->setContentType($type); + + if (strpos($node->args, '/') && !$node->htmlNode) { + return $writer->write('if (empty($this->global->coreCaptured) && in_array($this->getReferenceType(), ["extends", null], true)) header(%var);', "Content-Type: $node->args"); + } + } +} diff --git a/vendor/latte/latte/src/Latte/Macros/MacroSet.php b/vendor/latte/latte/src/Latte/Macros/MacroSet.php new file mode 100644 index 0000000..5229d97 --- /dev/null +++ b/vendor/latte/latte/src/Latte/Macros/MacroSet.php @@ -0,0 +1,167 @@ +compiler = $compiler; + } + + + public function addMacro(string $name, $begin, $end = null, $attr = null, int $flags = null) + { + if (!$begin && !$end && !$attr) { + throw new \InvalidArgumentException("At least one argument must be specified for macro '$name'."); + } + foreach ([$begin, $end, $attr] as $arg) { + if ($arg && !is_string($arg)) { + Latte\Helpers::checkCallback($arg); + } + } + + $this->macros[$name] = [$begin, $end, $attr]; + $this->compiler->addMacro($name, $this, $flags); + return $this; + } + + + /** + * Initializes before template parsing. + * @return void + */ + public function initialize() + { + } + + + /** + * Finishes template parsing. + * @return array|null [prolog, epilog] + */ + public function finalize() + { + } + + + /** + * New node is found. + * @return bool|null + */ + public function nodeOpened(MacroNode $node) + { + [$begin, $end, $attr] = $this->macros[$node->name]; + $node->empty = !$end; + + if ( + $node->modifiers + && (!$begin || (is_string($begin) && strpos($begin, '%modify') === false)) + && (!$end || (is_string($end) && strpos($end, '%modify') === false)) + && (!$attr || (is_string($attr) && strpos($attr, '%modify') === false)) + ) { + throw new CompileException('Modifiers are not allowed in ' . $node->getNotation()); + } + + if ( + $node->args + && (!$begin || (is_string($begin) && strpos($begin, '%node') === false)) + && (!$end || (is_string($end) && strpos($end, '%node') === false)) + && (!$attr || (is_string($attr) && strpos($attr, '%node') === false)) + ) { + throw new CompileException('Arguments are not allowed in ' . $node->getNotation()); + } + + if ($attr && $node->prefix === $node::PREFIX_NONE) { + $node->empty = true; + $node->context[1] = Latte\Compiler::CONTEXT_HTML_ATTRIBUTE; + $res = $this->compile($node, $attr); + if ($res === false) { + return false; + } elseif (!$node->attrCode) { + $node->attrCode = ""; + } + $node->context[1] = Latte\Compiler::CONTEXT_HTML_TEXT; + + } elseif ($begin) { + $res = $this->compile($node, $begin); + if ($res === false || ($node->empty && $node->prefix)) { + return false; + } elseif (!$node->openingCode && is_string($res) && $res !== '') { + $node->openingCode = ""; + } + + } elseif (!$end) { + return false; + } + } + + + /** + * Node is closed. + * @return void + */ + public function nodeClosed(MacroNode $node) + { + if (isset($this->macros[$node->name][1])) { + $res = $this->compile($node, $this->macros[$node->name][1]); + if (!$node->closingCode && is_string($res) && $res !== '') { + $node->closingCode = ""; + } + } + } + + + /** + * Generates code. + * @return string|bool|null + */ + private function compile(MacroNode $node, $def) + { + $node->tokenizer->reset(); + $writer = Latte\PhpWriter::using($node); + return is_string($def) + ? $writer->write($def) + : $def($node, $writer); + } + + + public function getCompiler(): Latte\Compiler + { + return $this->compiler; + } + + + /** @internal */ + protected function checkExtraArgs(MacroNode $node): void + { + if ($node->tokenizer->isNext()) { + $args = Latte\Runtime\Filters::truncate($node->tokenizer->joinAll(), 20); + trigger_error("Unexpected arguments '$args' in " . $node->getNotation()); + } + } +} diff --git a/vendor/latte/latte/src/Latte/Runtime/CachingIterator.php b/vendor/latte/latte/src/Latte/Runtime/CachingIterator.php new file mode 100644 index 0000000..39ac77e --- /dev/null +++ b/vendor/latte/latte/src/Latte/Runtime/CachingIterator.php @@ -0,0 +1,204 @@ +getIterator(); + } while ($iterator instanceof \IteratorAggregate); + + } elseif ($iterator instanceof \Traversable) { + if (!$iterator instanceof \Iterator) { + $iterator = new \IteratorIterator($iterator); + } + } else { + throw new \InvalidArgumentException(sprintf('Invalid argument passed to foreach; array or Traversable expected, %s given.', is_object($iterator) ? get_class($iterator) : gettype($iterator))); + } + + parent::__construct($iterator, 0); + } + + + /** + * Is the current element the first one? + * @param int $width + */ + public function isFirst(int $width = null): bool + { + return $this->counter === 1 || ($width && $this->counter !== 0 && (($this->counter - 1) % $width) === 0); + } + + + /** + * Is the current element the last one? + * @param int $width + */ + public function isLast(int $width = null): bool + { + return !$this->hasNext() || ($width && ($this->counter % $width) === 0); + } + + + /** + * Is the iterator empty? + */ + public function isEmpty(): bool + { + return $this->counter === 0; + } + + + /** + * Is the counter odd? + */ + public function isOdd(): bool + { + return $this->counter % 2 === 1; + } + + + /** + * Is the counter even? + */ + public function isEven(): bool + { + return $this->counter % 2 === 0; + } + + + /** + * Returns the counter. + */ + public function getCounter(): int + { + return $this->counter; + } + + + /** + * Returns the counter as string + */ + public function __toString(): string + { + return (string) $this->counter; + } + + + /** + * Returns the count of elements. + */ + public function count(): int + { + $inner = $this->getInnerIterator(); + if ($inner instanceof \Countable) { + return $inner->count(); + + } else { + throw new \LogicException('Iterator is not countable.'); + } + } + + + /** + * Forwards to the next element. + */ + public function next(): void + { + parent::next(); + if (parent::valid()) { + $this->counter++; + } + } + + + /** + * Rewinds the Iterator. + */ + public function rewind(): void + { + parent::rewind(); + $this->counter = parent::valid() ? 1 : 0; + } + + + /** + * Returns the next key. + * @return mixed + */ + public function getNextKey() + { + return $this->getInnerIterator()->key(); + } + + + /** + * Returns the next element. + * @return mixed + */ + public function getNextValue() + { + return $this->getInnerIterator()->current(); + } + + + /********************* property accessor ****************d*g**/ + + + /** + * Returns property value. + * @throws \LogicException if the property is not defined. + */ + public function &__get($name) + { + if (method_exists($this, $m = 'get' . $name) || method_exists($this, $m = 'is' . $name)) { + $ret = $this->$m(); + return $ret; + } + throw new \LogicException('Attempt to read undeclared property ' . get_class($this) . "::\$$name."); + } + + + /** + * Is property defined? + */ + public function __isset($name): bool + { + return method_exists($this, 'get' . $name) || method_exists($this, 'is' . $name); + } +} diff --git a/vendor/latte/latte/src/Latte/Runtime/FilterExecutor.php b/vendor/latte/latte/src/Latte/Runtime/FilterExecutor.php new file mode 100644 index 0000000..3926722 --- /dev/null +++ b/vendor/latte/latte/src/Latte/Runtime/FilterExecutor.php @@ -0,0 +1,185 @@ + [callback, FilterInfo aware] */ + private $_static = [ + 'breaklines' => [[Filters::class, 'breaklines'], false], + 'bytes' => [[Filters::class, 'bytes'], false], + 'capitalize' => [[Filters::class, 'capitalize'], false], + 'datastream' => [[Filters::class, 'dataStream'], false], + 'date' => [[Filters::class, 'date'], false], + 'escapecss' => [[Filters::class, 'escapeCss'], false], + 'escapehtml' => [[Filters::class, 'escapeHtml'], false], + 'escapehtmlcomment' => [[Filters::class, 'escapeHtmlComment'], false], + 'escapeical' => [[Filters::class, 'escapeICal'], false], + 'escapejs' => [[Filters::class, 'escapeJs'], false], + 'escapeurl' => ['rawurlencode', false], + 'escapexml' => [[Filters::class, 'escapeXml'], false], + 'firstupper' => [[Filters::class, 'firstUpper'], false], + 'checkurl' => [[Filters::class, 'safeUrl'], false], + 'implode' => ['implode', false], + 'indent' => [[Filters::class, 'indent'], true], + 'length' => [[Filters::class, 'length'], false], + 'lower' => [[Filters::class, 'lower'], false], + 'number' => ['number_format', false], + 'padleft' => [[Filters::class, 'padLeft'], false], + 'padright' => [[Filters::class, 'padRight'], false], + 'repeat' => [[Filters::class, 'repeat'], true], + 'replace' => [[Filters::class, 'replace'], true], + 'replacere' => [[Filters::class, 'replaceRe'], false], + 'reverse' => [[Filters::class, 'reverse'], false], + 'strip' => [[Filters::class, 'strip'], true], + 'striphtml' => [[Filters::class, 'stripHtml'], true], + 'striptags' => [[Filters::class, 'stripTags'], true], + 'substr' => [[Filters::class, 'substring'], false], + 'trim' => [[Filters::class, 'trim'], true], + 'truncate' => [[Filters::class, 'truncate'], false], + 'upper' => [[Filters::class, 'upper'], false], + 'webalize' => [[\Nette\Utils\Strings::class, 'webalize'], false], + ]; + + + /** + * Registers run-time filter. + * @return static + */ + public function add(?string $name, callable $callback) + { + if ($name == null) { // intentionally == + array_unshift($this->_dynamic, $callback); + } else { + $name = strtolower($name); + $this->_static[$name] = [$callback, null]; + unset($this->$name); + } + return $this; + } + + + /** + * Returns all run-time filters. + * @return string[] + */ + public function getAll(): array + { + return array_combine($tmp = array_keys($this->_static), $tmp); + } + + + /** + * Returns filter for classic calling. + */ + public function __get($name): callable + { + $lname = strtolower($name); + if (isset($this->$lname)) { // case mismatch + return $this->$lname; + + } elseif (isset($this->_static[$lname])) { + [$callback, $aware] = $this->prepareFilter($lname); + if ($aware) { // FilterInfo aware filter + return $this->$lname = function (...$args) use ($callback) { + array_unshift($args, $info = new FilterInfo); + if ($args[1] instanceof IHtmlString) { + $args[1] = $args[1]->__toString(); + $info->contentType = Engine::CONTENT_HTML; + } + $res = $callback(...$args); + return $info->contentType === Engine::CONTENT_HTML + ? new Html($res) + : $res; + }; + } else { // classic filter + return $this->$lname = $callback; + } + } + + return $this->$lname = function (...$args) use ($lname, $name) { // dynamic filter + array_unshift($args, $lname); + foreach ($this->_dynamic as $filter) { + $res = (Helpers::checkCallback($filter))(...$args); + if ($res !== null) { + return $res; + } elseif (isset($this->_static[$lname])) { // dynamic converted to classic + $this->$name = Helpers::checkCallback($this->_static[$lname][0]); + return ($this->$name)(...func_get_args()); + } + } + $hint = ($t = Helpers::getSuggestion(array_keys($this->_static), $name)) ? ", did you mean '$t'?" : '.'; + throw new \LogicException("Filter '$name' is not defined$hint"); + }; + } + + + /** + * Calls filter with FilterInfo. + * @return mixed + */ + public function filterContent(string $name, FilterInfo $info, ...$args) + { + $lname = strtolower($name); + if (!isset($this->_static[$lname])) { + $hint = ($t = Helpers::getSuggestion(array_keys($this->_static), $name)) ? ", did you mean '$t'?" : '.'; + throw new \LogicException("Filter |$name is not defined$hint"); + } + + [$callback, $aware] = $this->prepareFilter($lname); + if ($aware) { // FilterInfo aware filter + array_unshift($args, $info); + return $callback(...$args); + + } else { // classic filter + if ($info->contentType !== Engine::CONTENT_TEXT) { + trigger_error("Filter |$name is called with incompatible content type " . strtoupper($info->contentType) + . ($info->contentType === Engine::CONTENT_HTML ? ', try to prepend |stripHtml.' : '.'), E_USER_WARNING); + } + $res = ($this->$name)(...$args); + if ($res instanceof IHtmlString) { + trigger_error("Filter |$name should be changed to content-aware filter."); + $info->contentType = Engine::CONTENT_HTML; + $res = $res->__toString(); + } + return $res; + } + } + + + private function prepareFilter(string $name): array + { + if (!isset($this->_static[$name][1])) { + $callback = Helpers::checkCallback($this->_static[$name][0]); + if (is_string($callback) && strpos($callback, '::')) { + $callback = explode('::', $callback); + } elseif (is_object($callback)) { + $callback = [$callback, '__invoke']; + } + $ref = is_array($callback) + ? new \ReflectionMethod($callback[0], $callback[1]) + : new \ReflectionFunction($callback); + $this->_static[$name][1] = ($tmp = $ref->getParameters()) + && (string) $tmp[0]->getType() === FilterInfo::class; + } + return $this->_static[$name]; + } +} diff --git a/vendor/latte/latte/src/Latte/Runtime/FilterInfo.php b/vendor/latte/latte/src/Latte/Runtime/FilterInfo.php new file mode 100644 index 0000000..91b2fb1 --- /dev/null +++ b/vendor/latte/latte/src/Latte/Runtime/FilterInfo.php @@ -0,0 +1,30 @@ +contentType = $contentType; + } +} diff --git a/vendor/latte/latte/src/Latte/Runtime/Filters.php b/vendor/latte/latte/src/Latte/Runtime/Filters.php new file mode 100644 index 0000000..71ef3c7 --- /dev/null +++ b/vendor/latte/latte/src/Latte/Runtime/Filters.php @@ -0,0 +1,690 @@ +__toString(true) + : htmlspecialchars((string) $s, ENT_NOQUOTES, 'UTF-8'); + } + + + /** + * Escapes string for use inside HTML attribute value. + * @param mixed $s plain text + * @return string HTML + */ + public static function escapeHtmlAttr($s, bool $double = true): string + { + $double = $double && $s instanceof IHtmlString ? false : $double; + $s = (string) $s; + if (strpos($s, '`') !== false && strpbrk($s, ' <>"\'') === false) { + $s .= ' '; // protection against innerHTML mXSS vulnerability nette/nette#1496 + } + return htmlspecialchars($s, ENT_QUOTES, 'UTF-8', $double); + } + + + /** + * Escapes HTML for use inside HTML attribute. + * @param mixed $s HTML text + * @return string HTML + */ + public static function escapeHtmlAttrConv($s): string + { + return self::escapeHtmlAttr($s, false); + } + + + /** + * Escapes string for use inside HTML attribute name. + * @param string $s plain text + * @return string HTML + */ + public static function escapeHtmlAttrUnquoted($s): string + { + $s = (string) $s; + return preg_match('#^[a-z0-9:-]+$#i', $s) + ? $s + : '"' . self::escapeHtmlAttr($s) . '"'; + } + + + /** + * Escapes string for use inside HTML comments. + * @param string $s plain text + * @return string HTML + */ + public static function escapeHtmlComment($s): string + { + $s = (string) $s; + if ($s && ($s[0] === '-' || $s[0] === '>' || $s[0] === '!')) { + $s = ' ' . $s; + } + $s = str_replace('--', '- - ', $s); + if (substr($s, -1) === '-') { + $s .= ' '; + } + return $s; + } + + + /** + * Escapes string for use inside XML 1.0 template. + * @param string $s plain text + * @return string XML + */ + public static function escapeXml($s): string + { + // XML 1.0: \x09 \x0A \x0D and C1 allowed directly, C0 forbidden + // XML 1.1: \x00 forbidden directly and as a character reference, + // \x09 \x0A \x0D \x85 allowed directly, C0, C1 and \x7F allowed as character references + return htmlspecialchars(preg_replace('#[\x00-\x08\x0B\x0C\x0E-\x1F]+#', '', (string) $s), ENT_QUOTES, 'UTF-8'); + } + + + /** + * Escapes string for use inside XML attribute name. + * @param string $s plain text + * @return string XML + */ + public static function escapeXmlAttrUnquoted($s): string + { + $s = (string) $s; + return preg_match('#^[a-z0-9:-]+$#i', $s) + ? $s + : '"' . self::escapeXml($s) . '"'; + } + + + /** + * Escapes string for use inside CSS template. + * @param string $s plain text + * @return string CSS + */ + public static function escapeCss($s): string + { + // http://www.w3.org/TR/2006/WD-CSS21-20060411/syndata.html#q6 + return addcslashes((string) $s, "\x00..\x1F!\"#$%&'()*+,./:;<=>?@[\\]^`{|}~"); + } + + + /** + * Escapes variables for use inside + +

Nette Forms basic example

+ + + + diff --git a/vendor/nette/forms/examples/bootstrap2-rendering.php b/vendor/nette/forms/examples/bootstrap2-rendering.php new file mode 100644 index 0000000..696edec --- /dev/null +++ b/vendor/nette/forms/examples/bootstrap2-rendering.php @@ -0,0 +1,95 @@ +getRenderer(); + $renderer->wrappers['controls']['container'] = null; + $renderer->wrappers['pair']['container'] = 'div class=control-group'; + $renderer->wrappers['pair']['.error'] = 'error'; + $renderer->wrappers['control']['container'] = 'div class=controls'; + $renderer->wrappers['label']['container'] = 'div class=control-label'; + $renderer->wrappers['control']['description'] = 'span class=help-inline'; + $renderer->wrappers['control']['errorcontainer'] = 'span class=help-inline'; + $form->getElementPrototype()->class('form-horizontal'); + + foreach ($form->getControls() as $control) { + $type = $control->getOption('type'); + if ($type === 'button') { + $control->getControlPrototype()->addClass(empty($usedPrimary) ? 'btn btn-primary' : 'btn'); + $usedPrimary = true; + + } elseif (in_array($type, ['checkbox', 'radio'], true)) { + $control->getSeparatorPrototype()->setName('div')->addClass($type); + } + } +} + + +$form = new Form; +$form->onRender[] = 'makeBootstrap2'; + +$form->addGroup('Personal data'); +$form->addText('name', 'Your name') + ->setRequired('Enter your name'); + +$form->addRadioList('gender', 'Your gender', [ + 'male', 'female', +]); + +$form->addCheckboxList('colors', 'Favorite colors', [ + 'red', 'green', 'blue', +]); + +$form->addSelect('country', 'Country', [ + 'Buranda', 'Qumran', 'Saint Georges Island', +]); + +$form->addCheckbox('send', 'Ship to address'); + +$form->addGroup('Your account'); +$form->addPassword('password', 'Choose password'); +$form->addUpload('avatar', 'Picture'); +$form->addTextArea('note', 'Comment'); + +$form->addGroup(); +$form->addSubmit('submit', 'Send'); +$form->addSubmit('cancel', 'Cancel'); + + +if ($form->isSuccess()) { + echo '

Form was submitted and successfully validated

'; + Dumper::dump($form->getValues()); + exit; +} + + +?> + + +Nette Forms & Bootstrap v2 rendering example + + + +
+ + + +
diff --git a/vendor/nette/forms/examples/bootstrap3-rendering.php b/vendor/nette/forms/examples/bootstrap3-rendering.php new file mode 100644 index 0000000..84bf28b --- /dev/null +++ b/vendor/nette/forms/examples/bootstrap3-rendering.php @@ -0,0 +1,98 @@ +getRenderer(); + $renderer->wrappers['controls']['container'] = null; + $renderer->wrappers['pair']['container'] = 'div class=form-group'; + $renderer->wrappers['pair']['.error'] = 'has-error'; + $renderer->wrappers['control']['container'] = 'div class=col-sm-9'; + $renderer->wrappers['label']['container'] = 'div class="col-sm-3 control-label"'; + $renderer->wrappers['control']['description'] = 'span class=help-block'; + $renderer->wrappers['control']['errorcontainer'] = 'span class=help-block'; + $form->getElementPrototype()->class('form-horizontal'); + + foreach ($form->getControls() as $control) { + $type = $control->getOption('type'); + if ($type === 'button') { + $control->getControlPrototype()->addClass(empty($usedPrimary) ? 'btn btn-primary' : 'btn btn-default'); + $usedPrimary = true; + + } elseif (in_array($type, ['text', 'textarea', 'select'], true)) { + $control->getControlPrototype()->addClass('form-control'); + + } elseif (in_array($type, ['checkbox', 'radio'], true)) { + $control->getSeparatorPrototype()->setName('div')->addClass($type); + } + } +} + + +$form = new Form; +$form->onRender[] = 'makeBootstrap3'; + +$form->addGroup('Personal data'); +$form->addText('name', 'Your name') + ->setRequired('Enter your name'); + +$form->addRadioList('gender', 'Your gender', [ + 'male', 'female', +]); + +$form->addCheckboxList('colors', 'Favorite colors', [ + 'red', 'green', 'blue', +]); + +$form->addSelect('country', 'Country', [ + 'Buranda', 'Qumran', 'Saint Georges Island', +]); + +$form->addCheckbox('send', 'Ship to address'); + +$form->addGroup('Your account'); +$form->addPassword('password', 'Choose password'); +$form->addUpload('avatar', 'Picture'); +$form->addTextArea('note', 'Comment'); + +$form->addGroup(); +$form->addSubmit('submit', 'Send'); +$form->addSubmit('cancel', 'Cancel'); + + +if ($form->isSuccess()) { + echo '

Form was submitted and successfully validated

'; + Dumper::dump($form->getValues()); + exit; +} + + +?> + + +Nette Forms & Bootstrap v3 rendering example + + + +
+ + + +
diff --git a/vendor/nette/forms/examples/bootstrap4-rendering.php b/vendor/nette/forms/examples/bootstrap4-rendering.php new file mode 100644 index 0000000..493f9bd --- /dev/null +++ b/vendor/nette/forms/examples/bootstrap4-rendering.php @@ -0,0 +1,104 @@ +getRenderer(); + $renderer->wrappers['controls']['container'] = null; + $renderer->wrappers['pair']['container'] = 'div class="form-group row"'; + $renderer->wrappers['pair']['.error'] = 'has-danger'; + $renderer->wrappers['control']['container'] = 'div class=col-sm-9'; + $renderer->wrappers['label']['container'] = 'div class="col-sm-3 col-form-label"'; + $renderer->wrappers['control']['description'] = 'span class=form-text'; + $renderer->wrappers['control']['errorcontainer'] = 'span class=form-control-feedback'; + + foreach ($form->getControls() as $control) { + $type = $control->getOption('type'); + if ($type === 'button') { + $control->getControlPrototype()->addClass(empty($usedPrimary) ? 'btn btn-primary' : 'btn btn-secondary'); + $usedPrimary = true; + + } elseif (in_array($type, ['text', 'textarea', 'select'], true)) { + $control->getControlPrototype()->addClass('form-control'); + + } elseif ($type === 'file') { + $control->getControlPrototype()->addClass('form-control-file'); + + } elseif (in_array($type, ['checkbox', 'radio'], true)) { + if ($control instanceof Nette\Forms\Controls\Checkbox) { + $control->getLabelPrototype()->addClass('form-check-label'); + } else { + $control->getItemLabelPrototype()->addClass('form-check-label'); + } + $control->getControlPrototype()->addClass('form-check-input'); + $control->getSeparatorPrototype()->setName('div')->addClass('form-check'); + } + } +} + + +$form = new Form; +$form->onRender[] = 'makeBootstrap4'; + +$form->addGroup('Personal data'); +$form->addText('name', 'Your name') + ->setRequired('Enter your name'); + +$form->addRadioList('gender', 'Your gender', [ + 'male', 'female', +]); + +$form->addCheckboxList('colors', 'Favorite colors', [ + 'red', 'green', 'blue', +]); + +$form->addSelect('country', 'Country', [ + 'Buranda', 'Qumran', 'Saint Georges Island', +]); + +$form->addCheckbox('send', 'Ship to address'); + +$form->addGroup('Your account'); +$form->addPassword('password', 'Choose password'); +$form->addUpload('avatar', 'Picture'); +$form->addTextArea('note', 'Comment'); + +$form->addGroup(); +$form->addSubmit('submit', 'Send'); +$form->addSubmit('cancel', 'Cancel'); + + +if ($form->isSuccess()) { + echo '

Form was submitted and successfully validated

'; + Dumper::dump($form->getValues()); + exit; +} + + +?> + + +Nette Forms & Bootstrap v4 rendering example + + + +
+

Nette Forms & Bootstrap v4 rendering example

+ + +
diff --git a/vendor/nette/forms/examples/containers.php b/vendor/nette/forms/examples/containers.php new file mode 100644 index 0000000..9f7bb6b --- /dev/null +++ b/vendor/nette/forms/examples/containers.php @@ -0,0 +1,62 @@ +addGroup('First person'); + +$first = $form->addContainer('first'); +$first->addText('name', 'Your name:'); +$first->addText('email', 'Email:'); +$first->addText('street', 'Street:'); +$first->addText('city', 'City:'); + +// group Second person +$form->addGroup('Second person'); + +$second = $form->addContainer('second'); +$second->addText('name', 'Your name:'); +$second->addText('email', 'Email:'); +$second->addText('street', 'Street:'); +$second->addText('city', 'City:'); + +// group for button +$form->addGroup(); + +$form->addSubmit('submit', 'Send'); + + +if ($form->isSuccess()) { + echo '

Form was submitted and successfully validated

'; + Dumper::dump($form->getValues()); + exit; +} + + +?> + + +Nette Forms containers example + + +

Nette Forms containers example

+ + + + diff --git a/vendor/nette/forms/examples/custom-control.php b/vendor/nette/forms/examples/custom-control.php new file mode 100644 index 0000000..012a32e --- /dev/null +++ b/vendor/nette/forms/examples/custom-control.php @@ -0,0 +1,148 @@ +setRequired(false) + ->addRule([__CLASS__, 'validateDate'], 'Date is invalid.'); + } + + + public function setValue($value) + { + if ($value === null) { + $this->day = $this->month = $this->year = ''; + } else { + $date = Nette\Utils\DateTime::from($value); + $this->day = $date->format('j'); + $this->month = $date->format('n'); + $this->year = $date->format('Y'); + } + return $this; + } + + + /** + * @return DateTimeImmutable|null + */ + public function getValue() + { + return self::validateDate($this) + ? (new DateTimeImmutable)->setDate((int) $this->year, (int) $this->month, (int) $this->day)->setTime(0, 0) + : null; + } + + + /** + * @return bool + */ + public function isFilled() + { + return $this->day !== '' || $this->year !== ''; + } + + + public function loadHttpData() + { + $this->day = $this->getHttpData(Form::DATA_LINE, '[day]'); + $this->month = $this->getHttpData(Form::DATA_LINE, '[month]'); + $this->year = $this->getHttpData(Form::DATA_LINE, '[year]'); + } + + + /** + * Generates control's HTML element. + */ + public function getControl() + { + $name = $this->getHtmlName(); + return Html::el('input', [ + 'name' => $name . '[day]', + 'id' => $this->getHtmlId(), + 'value' => $this->day, + 'type' => 'number', + 'min' => 1, + 'max' => 31, + 'data-nette-rules' => Helpers::exportRules($this->getRules()) ?: null, + ]) + + . Helpers::createSelectBox( + [1 => 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], + [], + $this->month + )->name($name . '[month]') + + . Html::el('input', [ + 'name' => $name . '[year]', + 'value' => $this->year, + 'type' => 'number', + ]); + } + + + /** + * @return bool + */ + public static function validateDate(Nette\Forms\IControl $control) + { + return ctype_digit($control->day) + && ctype_digit($control->month) + && ctype_digit($control->year) + && checkdate((int) $control->month, (int) $control->day, (int) $control->year); + } +} + + +Tracy\Debugger::enable(); + +$form = new Form; + +$form['date'] = new DateInput('Date:'); +$form['date']->setDefaultValue(new DateTime); + +$form->addSubmit('submit', 'Send'); + + +if ($form->isSuccess()) { + echo '

Form was submitted and successfully validated

'; + Tracy\Dumper::dump($form->getValues()); + exit; +} + + +?> + + +Nette Forms custom control example + + + +

Nette Forms custom control example

+ + + + diff --git a/vendor/nette/forms/examples/custom-rendering.php b/vendor/nette/forms/examples/custom-rendering.php new file mode 100644 index 0000000..b980224 --- /dev/null +++ b/vendor/nette/forms/examples/custom-rendering.php @@ -0,0 +1,125 @@ +getRenderer(); +$renderer->wrappers['form']['container'] = Html::el('div')->id('form'); +$renderer->wrappers['group']['container'] = null; +$renderer->wrappers['group']['label'] = 'h3'; +$renderer->wrappers['pair']['container'] = null; +$renderer->wrappers['controls']['container'] = 'dl'; +$renderer->wrappers['control']['container'] = 'dd'; +$renderer->wrappers['control']['.odd'] = 'odd'; +$renderer->wrappers['label']['container'] = 'dt'; +$renderer->wrappers['label']['suffix'] = ':'; +$renderer->wrappers['control']['requiredsuffix'] = " \xE2\x80\xA2"; + + +$form->addGroup('Personal data'); +$form->addText('name', 'Your name') + ->setRequired('Enter your name'); + +$form->addRadioList('gender', 'Your gender', [ + 'm' => Html::el('span', 'male')->style('color: #248bd3'), + 'f' => Html::el('span', 'female')->style('color: #e948d4'), +]); + +$form->addSelect('country', 'Country', [ + 'Buranda', 'Qumran', 'Saint Georges Island', +]); + +$form->addCheckbox('send', 'Ship to address'); + +$form->addGroup('Your account'); +$form->addPassword('password', 'Choose password'); +$form->addUpload('avatar', 'Picture'); +$form->addTextArea('note', 'Comment'); + +$form->addGroup(); +$form->addSubmit('submit', 'Send'); + + +if ($form->isSuccess()) { + echo '

Form was submitted and successfully validated

'; + Dumper::dump($form->getValues()); + exit; +} + + +?> + + +Nette Forms custom rendering example + + + + + +

Nette Forms custom rendering example

+ + + + diff --git a/vendor/nette/forms/examples/custom-validator.php b/vendor/nette/forms/examples/custom-validator.php new file mode 100644 index 0000000..94f057a --- /dev/null +++ b/vendor/nette/forms/examples/custom-validator.php @@ -0,0 +1,62 @@ +value % $arg === 0; + } +} + + +$form = new Form; + +$form->addText('num1', 'Multiple of 8:') + ->setDefaultValue(5) + ->addRule('MyValidators::divisibilityValidator', 'First number must be %d multiple', 8); + +$form->addSubmit('submit', 'Send'); + + +if ($form->isSuccess()) { + echo '

Form was submitted and successfully validated

'; + Dumper::dump($form->getValues()); + exit; +} + + +?> + + +Nette Forms custom validator example + + + + + +

Nette Forms custom validator example

+ + + + diff --git a/vendor/nette/forms/examples/html5.php b/vendor/nette/forms/examples/html5.php new file mode 100644 index 0000000..1024e28 --- /dev/null +++ b/vendor/nette/forms/examples/html5.php @@ -0,0 +1,64 @@ +addGroup(); + +$form->addText('query', 'Search:') + ->setHtmlType('search') + ->setHtmlAttribute('autofocus'); + +$form->addText('count', 'Number of results:') + ->setHtmlType('number') + ->setDefaultValue(10) + ->addRule($form::INTEGER, 'Must be numeric value') + ->addRule($form::RANGE, 'Must be in range from %d to %d', [1, 100]); + +$form->addText('precision', 'Precision:') + ->setHtmlType('range') + ->setDefaultValue(50) + ->addRule($form::INTEGER, 'Precision must be numeric value') + ->addRule($form::RANGE, 'Precision must be in range from %d to %d', [0, 100]); + +$form->addEmail('email', 'Send to email:') + ->setHtmlAttribute('autocomplete', 'off') + ->setHtmlAttribute('placeholder', 'Optional, but Recommended'); + +$form->addSubmit('submit', 'Send'); + + +if ($form->isSuccess()) { + echo '

Form was submitted and successfully validated

'; + Dumper::dump($form->getValues()); + exit; +} + + +?> + + +Nette Forms and HTML5 + + + +

Nette Forms and HTML5

+ + + + diff --git a/vendor/nette/forms/examples/live-validation.php b/vendor/nette/forms/examples/live-validation.php new file mode 100644 index 0000000..d664373 --- /dev/null +++ b/vendor/nette/forms/examples/live-validation.php @@ -0,0 +1,104 @@ +addText('name', 'Your name:') + ->setRequired('Enter your name'); + +$form->addText('age', 'Your age:') + ->setRequired('Enter your age') + ->addRule($form::INTEGER, 'Age must be numeric value') + ->addRule($form::RANGE, 'Age must be in range from %d to %d', [10, 100]); + +$form->addPassword('password', 'Choose password:') + ->setRequired('Choose your password') + ->addRule($form::MIN_LENGTH, 'The password is too short: it must be at least %d characters', 3); + +$form->addPassword('password2', 'Reenter password:') + ->setRequired('Reenter your password') + ->addRule($form::EQUAL, 'Passwords do not match', $form['password']); + +$form->addSubmit('submit', 'Send'); + + +if ($form->isSuccess()) { + echo '

Form was submitted and successfully validated

'; + Dumper::dump($form->getValues()); + exit; +} + +$renderer = $form->getRenderer(); +$renderer->wrappers['pair']['.error'] = 'has-error'; + +?> + + +Nette Forms live validation example + + + + + + +

Nette Forms live validation example

+ + + + diff --git a/vendor/nette/forms/examples/localization.ini b/vendor/nette/forms/examples/localization.ini new file mode 100644 index 0000000..f03ef27 --- /dev/null +++ b/vendor/nette/forms/examples/localization.ini @@ -0,0 +1,12 @@ +Personal data = Osobní údaje +Your name: = Jméno: +Enter your name = Zadejte jméno +Your age: = Věk: +Enter your age = Zadejte váš věk +Age must be numeric value = Věk musí být číslo +Age must be in range from %d to %d = Věk musí být v rozmezí %d až %d +Country: = Země: +Select your country = Vyberte zemi +World = Svět +other = jiná +Send = Odeslat diff --git a/vendor/nette/forms/examples/localization.php b/vendor/nette/forms/examples/localization.php new file mode 100644 index 0000000..a10e928 --- /dev/null +++ b/vendor/nette/forms/examples/localization.php @@ -0,0 +1,87 @@ +table = $table; + } + + + /** + * Translates the given string. + */ + public function translate($message, $count = null) + { + return isset($this->table[$message]) ? $this->table[$message] : $message; + } +} + + +$form = new Form; + +$translator = new MyTranslator(parse_ini_file(__DIR__ . '/localization.ini')); +$form->setTranslator($translator); + +$form->addGroup('Personal data'); +$form->addText('name', 'Your name:') + ->setRequired('Enter your name'); + +$form->addText('age', 'Your age:') + ->setRequired('Enter your age') + ->addRule($form::INTEGER, 'Age must be numeric value') + ->addRule($form::RANGE, 'Age must be in range from %d to %d', [10, 100]); + +$countries = [ + 'World' => [ + 'bu' => 'Buranda', + 'qu' => 'Qumran', + 'st' => 'Saint Georges Island', + ], + '?' => 'other', +]; +$form->addSelect('country', 'Country:', $countries) + ->setPrompt('Select your country'); + +$form->addSubmit('submit', 'Send'); + + +if ($form->isSuccess()) { + echo '

Form was submitted and successfully validated

'; + Dumper::dump($form->getValues()); + exit; +} + + +?> + + +Nette Forms localization example + + + +

Nette Forms localization example

+ + + + diff --git a/vendor/nette/forms/examples/manual-rendering.php b/vendor/nette/forms/examples/manual-rendering.php new file mode 100644 index 0000000..8c91820 --- /dev/null +++ b/vendor/nette/forms/examples/manual-rendering.php @@ -0,0 +1,95 @@ +addText('name') + ->setRequired('Enter your name'); + +$form->addText('age') + ->setRequired('Enter your age'); + +$form->addRadioList('gender', null, [ + 'm' => 'male', + 'f' => 'female', +]); + +$form->addText('email') + ->setRequired(false) + ->addRule($form::EMAIL, 'Incorrect email address'); + +$form->addSubmit('submit'); + +if ($form->isSuccess()) { + echo '

Form was submitted and successfully validated

'; + Dumper::dump($form->getValues()); + exit; +} + + +?> + + + + + Nette Forms manual form rendering + + + + + +

Nette Forms manual form rendering

+ + render('begin') ?> + + errors): ?> +
    + errors as $error): ?> +
  • + +
+ + +
+ Personal data + + + + + + + + + + + + + + + + + +
getLabel('Your name:') ?>control->cols(35) ?> error ?>
getLabel('Your age:') ?>control->cols(5) ?> error ?>
getLabel('Your gender:') ?>control ?> error ?>
getLabel('Email:') ?>control->cols(35) ?> error ?>
+
+ +
+ getControl('Send') ?> +
+ + render('end'); ?> + + diff --git a/vendor/nette/forms/license.md b/vendor/nette/forms/license.md new file mode 100644 index 0000000..cf741bd --- /dev/null +++ b/vendor/nette/forms/license.md @@ -0,0 +1,60 @@ +Licenses +======== + +Good news! You may use Nette Framework under the terms of either +the New BSD License or the GNU General Public License (GPL) version 2 or 3. + +The BSD License is recommended for most projects. It is easy to understand and it +places almost no restrictions on what you can do with the framework. If the GPL +fits better to your project, you can use the framework under this license. + +You don't have to notify anyone which license you are using. You can freely +use Nette Framework in commercial projects as long as the copyright header +remains intact. + +Please be advised that the name "Nette Framework" is a protected trademark and its +usage has some limitations. So please do not use word "Nette" in the name of your +project or top-level domain, and choose a name that stands on its own merits. +If your stuff is good, it will not take long to establish a reputation for yourselves. + + +New BSD License +--------------- + +Copyright (c) 2004, 2014 David Grudl (https://davidgrudl.com) +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of "Nette Framework" nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +This software is provided by the copyright holders and contributors "as is" and +any express or implied warranties, including, but not limited to, the implied +warranties of merchantability and fitness for a particular purpose are +disclaimed. In no event shall the copyright owner or contributors be liable for +any direct, indirect, incidental, special, exemplary, or consequential damages +(including, but not limited to, procurement of substitute goods or services; +loss of use, data, or profits; or business interruption) however caused and on +any theory of liability, whether in contract, strict liability, or tort +(including negligence or otherwise) arising in any way out of the use of this +software, even if advised of the possibility of such damage. + + +GNU General Public License +-------------------------- + +GPL licenses are very very long, so instead of including them here we offer +you URLs with full text: + +- [GPL version 2](http://www.gnu.org/licenses/gpl-2.0.html) +- [GPL version 3](http://www.gnu.org/licenses/gpl-3.0.html) diff --git a/vendor/nette/forms/package.json b/vendor/nette/forms/package.json new file mode 100644 index 0000000..6307002 --- /dev/null +++ b/vendor/nette/forms/package.json @@ -0,0 +1,21 @@ +{ + "name": "nette-forms", + "version": "2.4.9", + "description": "Client side script for Nette Forms Component", + "keywords": [ + "nette", + "validation", + "forms" + ], + "homepage": "https://nette.org", + "author": "David Grudl (https://davidgrudl.com)", + "license": "BSD-3-Clause", + "main": "src/assets/netteForms.js", + "files": [ + "src/assets" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/nette/forms.git" + } +} diff --git a/vendor/nette/forms/readme.md b/vendor/nette/forms/readme.md new file mode 100644 index 0000000..a488fe1 --- /dev/null +++ b/vendor/nette/forms/readme.md @@ -0,0 +1,69 @@ +Nette Forms: greatly facilitates web forms +========================================== + +[![Downloads this Month](https://img.shields.io/packagist/dm/nette/forms.svg)](https://packagist.org/packages/nette/forms) +[![Build Status](https://travis-ci.org/nette/forms.svg?branch=master)](https://travis-ci.org/nette/forms) +[![Coverage Status](https://coveralls.io/repos/github/nette/forms/badge.svg?branch=master)](https://coveralls.io/github/nette/forms?branch=master) +[![Latest Stable Version](https://poser.pugx.org/nette/forms/v/stable)](https://github.com/nette/forms/releases) +[![License](https://img.shields.io/badge/license-New%20BSD-blue.svg)](https://github.com/nette/forms/blob/master/license.md) + +Nette\Forms greatly facilitates creating and processing web forms. What it can really do? + +- validate sent data both client-side (JavaScript) and server-side +- provide high level of security +- multiple render modes +- translations, i18n + +Why should you bother setting up framework for a simple web form? You won't have to take care about routine tasks such as writing two validation scripts (client and server) and your code will be safe against security breaches. + +Nette Framework puts a great effort to be safe and since forms are the most common user input, Nette forms are as good as impenetrable. All is maintained dynamically and transparently, nothing has to be set manually. Well-known vulnerabilities such as Cross Site Scripting (XSS) and Cross-Site Request Forgery (CSRF) are filtered, as well as special control characters. All inputs are checked for UTF-8 validity. Every multiple-choice, select boxes and similar are checked for forged values upon validating. Sounds good? Let's try it out. + + +Documentation +------------- + +This is just a piece of documentation. [Please see our website](https://doc.nette.org/forms). + + +First form +---------- + +Let's create a simple registration form: + +```php +use Nette\Forms\Form; + +$form = new Form; + +$form->addText('name', 'Name:'); +$form->addPassword('password', 'Password:'); +$form->addSubmit('send', 'Register'); + +echo $form; // renders the form +``` + +Although we mentioned validation, our form has none. Let's fix it. In order to require user's name, call `setRequired()` method on the form item. You can pass an error message as optional argument and it will be displayed if user does not fill his name in: + + +```php +$form->addText('name', 'Name:') + ->setRequired('Please fill your name.'); +``` + +Try submitting a form without the name - the message is displayed unless you meet the validation rules. + +The form is validated on both the client and server side. You only need to link `netteForms.js`, which is located at `/src/assets` in the distribution package. + +```html + +``` + +Nette Framework adds `required` class to all mandatory elements. Adding the following style will turn label of *name* input to red. + +```html + +``` + +[Continue…](https://doc.nette.org/forms). diff --git a/vendor/nette/forms/src/Bridges/FormsDI/FormsExtension.php b/vendor/nette/forms/src/Bridges/FormsDI/FormsExtension.php new file mode 100644 index 0000000..545464c --- /dev/null +++ b/vendor/nette/forms/src/Bridges/FormsDI/FormsExtension.php @@ -0,0 +1,38 @@ + [], + ]; + + + public function afterCompile(Nette\PhpGenerator\ClassType $class) + { + $initialize = $class->getMethod('initialize'); + $config = $this->validateConfig($this->defaults); + + foreach ((array) $config['messages'] as $name => $text) { + if (defined('Nette\Forms\Form::' . $name)) { + $initialize->addBody('Nette\Forms\Validator::$messages[Nette\Forms\Form::?] = ?;', [$name, $text]); + } elseif (defined($name)) { + $initialize->addBody('Nette\Forms\Validator::$messages[' . $name . '] = ?;', [$text]); + } else { + throw new Nette\InvalidArgumentException('Constant Nette\Forms\Form::' . $name . ' or constant ' . $name . ' does not exist.'); + } + } + } +} diff --git a/vendor/nette/forms/src/Bridges/FormsLatte/FormMacros.php b/vendor/nette/forms/src/Bridges/FormsLatte/FormMacros.php new file mode 100644 index 0000000..91f8d7f --- /dev/null +++ b/vendor/nette/forms/src/Bridges/FormsLatte/FormMacros.php @@ -0,0 +1,257 @@ +addMacro('form', [$me, 'macroForm'], 'echo Nette\Bridges\FormsLatte\Runtime::renderFormEnd(array_pop($this->global->formsStack));'); + $me->addMacro('formContainer', [$me, 'macroFormContainer'], 'array_pop($this->global->formsStack); $formContainer = $_form = end($this->global->formsStack)'); + $me->addMacro('label', [$me, 'macroLabel'], [$me, 'macroLabelEnd'], null, self::AUTO_EMPTY); + $me->addMacro('input', [$me, 'macroInput']); + $me->addMacro('name', [$me, 'macroName'], [$me, 'macroNameEnd'], [$me, 'macroNameAttr']); + $me->addMacro('inputError', [$me, 'macroInputError']); + } + + + /********************* macros ****************d*g**/ + + + /** + * {form ...} + */ + public function macroForm(MacroNode $node, PhpWriter $writer) + { + if ($node->modifiers) { + throw new CompileException('Modifiers are not allowed in ' . $node->getNotation()); + } + if ($node->prefix) { + throw new CompileException('Did you mean
?'); + } + $name = $node->tokenizer->fetchWord(); + if ($name === false) { + throw new CompileException('Missing form name in ' . $node->getNotation()); + } + $node->replaced = true; + $node->tokenizer->reset(); + return $writer->write( + "/* line $node->startLine */\n" + . 'echo Nette\Bridges\FormsLatte\Runtime::renderFormBegin($form = $_form = $this->global->formsStack[] = ' + . ($name[0] === '$' ? 'is_object(%node.word) ? %node.word : ' : '') + . '$this->global->uiControl[%node.word], %node.array);' + ); + } + + + /** + * {formContainer ...} + */ + public function macroFormContainer(MacroNode $node, PhpWriter $writer) + { + if ($node->modifiers) { + throw new CompileException('Modifiers are not allowed in ' . $node->getNotation()); + } + $name = $node->tokenizer->fetchWord(); + if ($name === false) { + throw new CompileException('Missing name in ' . $node->getNotation()); + } + $node->tokenizer->reset(); + return $writer->write( + '$this->global->formsStack[] = $formContainer = $_form = ' + . ($name[0] === '$' ? 'is_object(%node.word) ? %node.word : ' : '') + . 'end($this->global->formsStack)[%node.word];' + ); + } + + + /** + * {label ...} + */ + public function macroLabel(MacroNode $node, PhpWriter $writer) + { + if ($node->modifiers) { + throw new CompileException('Modifiers are not allowed in ' . $node->getNotation()); + } + $words = $node->tokenizer->fetchWords(); + if (!$words) { + throw new CompileException('Missing name in ' . $node->getNotation()); + } + $node->replaced = true; + $name = array_shift($words); + return $writer->write( + ($name[0] === '$' ? '$_input = is_object(%0.word) ? %0.word : end($this->global->formsStack)[%0.word]; if ($_label = $_input' : 'if ($_label = end($this->global->formsStack)[%0.word]') + . '->%1.raw) echo $_label' + . ($node->tokenizer->isNext() ? '->addAttributes(%node.array)' : ''), + $name, + $words ? ('getLabelPart(' . implode(', ', array_map([$writer, 'formatWord'], $words)) . ')') : 'getLabel()' + ); + } + + + /** + * {/label} + */ + public function macroLabelEnd(MacroNode $node, PhpWriter $writer) + { + if ($node->content != null) { + $node->openingCode = rtrim($node->openingCode, '?> ') . '->startTag() ?>'; + return $writer->write('if ($_label) echo $_label->endTag()'); + } + } + + + /** + * {input ...} + */ + public function macroInput(MacroNode $node, PhpWriter $writer) + { + if ($node->modifiers) { + throw new CompileException('Modifiers are not allowed in ' . $node->getNotation()); + } + $words = $node->tokenizer->fetchWords(); + if (!$words) { + throw new CompileException('Missing name in ' . $node->getNotation()); + } + $node->replaced = true; + $name = array_shift($words); + return $writer->write( + ($name[0] === '$' ? '$_input = is_object(%0.word) ? %0.word : end($this->global->formsStack)[%0.word]; echo $_input' : 'echo end($this->global->formsStack)[%0.word]') + . '->%1.raw' + . ($node->tokenizer->isNext() ? '->addAttributes(%node.array)' : '') + . " /* line $node->startLine */", + $name, + $words ? 'getControlPart(' . implode(', ', array_map([$writer, 'formatWord'], $words)) . ')' : 'getControl()' + ); + } + + + /** + * , , + + + + + + + <?= Helpers::escapeHtml($title . ': ' . $exception->getMessage() . $code) ?> + + getPrevious()): ?> + + + + + >document.documentElement.className+=' tracy-js' + + + + + + +> +(function() { + + + + +})(); +Tracy.Dumper.init(); +Tracy.BlueScreen.init(); + + + diff --git a/vendor/tracy/tracy/src/Tracy/Debugger/Debugger.php b/vendor/tracy/tracy/src/Tracy/Debugger/Debugger.php new file mode 100644 index 0000000..4b39889 --- /dev/null +++ b/vendor/tracy/tracy/src/Tracy/Debugger/Debugger.php @@ -0,0 +1,600 @@ +dispatchAssets()) { + exit; + } + } + + + /** + * Renders loading + + + +Server Error + + + +
+
+

Server Error

+ +

We're sorry! The server encountered an internal error and + was unable to complete your request. Please try again later.

+ +

error 500 |
Tracy is unable to log error.

+
+
+ + diff --git a/vendor/tracy/tracy/src/Tracy/Dumper/Dumper.php b/vendor/tracy/tracy/src/Tracy/Dumper/Dumper.php new file mode 100644 index 0000000..16d8f62 --- /dev/null +++ b/vendor/tracy/tracy/src/Tracy/Dumper/Dumper.php @@ -0,0 +1,667 @@ + '1;33', + 'null' => '1;33', + 'number' => '1;32', + 'string' => '1;36', + 'array' => '1;31', + 'key' => '1;37', + 'object' => '1;31', + 'visibility' => '1;30', + 'resource' => '1;37', + 'indent' => '1;30', + ]; + + /** @var array */ + public static $resources = [ + 'stream' => 'stream_get_meta_data', + 'stream-context' => 'stream_context_get_options', + 'curl' => 'curl_getinfo', + ]; + + /** @var array */ + public static $objectExporters = [ + 'Closure' => [self::class, 'exportClosure'], + 'SplFileInfo' => [self::class, 'exportSplFileInfo'], + 'SplObjectStorage' => [self::class, 'exportSplObjectStorage'], + '__PHP_Incomplete_Class' => [self::class, 'exportPhpIncompleteClass'], + ]; + + /** @var int|null */ + private $maxDepth = 4; + + /** @var int|null */ + private $maxLength = 150; + + /** @var int|bool */ + private $collapseTop = 14; + + /** @var int */ + private $collapseSub = 7; + + /** @var int */ + private $location = 0; + + /** @var bool|null lazy-loading via JavaScript? true=full, false=none, null=collapsed parts */ + private $lazy; + + /** @var array|null */ + private $snapshot; + + /** @var bool */ + private $debugInfo = false; + + /** @var array */ + private $keysToHide = []; + + /** @var callable[] */ + private $resourceDumpers; + + /** @var callable[] */ + private $objectDumpers; + + + /** + * Dumps variable to the output. + * @return mixed variable + */ + public static function dump($var, array $options = []) + { + if (PHP_SAPI !== 'cli' && !preg_match('#^Content-Type: (?!text/html)#im', implode("\n", headers_list()))) { + echo self::toHtml($var, $options); + } elseif (self::detectColors()) { + echo self::toTerminal($var, $options); + } else { + echo self::toText($var, $options); + } + return $var; + } + + + /** + * Dumps variable to HTML. + */ + public static function toHtml($var, array $options = []): string + { + return (new static($options))->asHtml($var); + } + + + /** + * Dumps variable to plain text. + */ + public static function toText($var, array $options = []): string + { + return (new static($options))->asTerminal($var); + } + + + /** + * Dumps variable to x-terminal. + */ + public static function toTerminal($var, array $options = []): string + { + return (new static($options))->asTerminal($var, self::$terminalColors); + } + + + private function __construct(array $options = []) + { + $this->maxDepth = $options[self::DEPTH] ?? $this->maxDepth; + $this->maxLength = $options[self::TRUNCATE] ?? $this->maxLength; + $this->collapseTop = $options[self::COLLAPSE] ?? $this->collapseTop; + $this->collapseSub = $options[self::COLLAPSE_COUNT] ?? $this->collapseSub; + $this->location = $options[self::LOCATION] ?? $this->location; + $this->location = $this->location === true ? ~0 : (int) $this->location; + $this->snapshot = &$options[self::SNAPSHOT]; + if ($options[self::LIVE] ?? false) { + $this->snapshot = &self::$liveSnapshot; + } + $this->lazy = is_array($this->snapshot) ? true : ($options[self::LAZY] ?? $this->lazy); + $this->debugInfo = $options[self::DEBUGINFO] ?? $this->debugInfo; + $this->keysToHide = array_flip(array_map('strtolower', $options[self::KEYS_TO_HIDE] ?? [])); + $this->resourceDumpers = ($options['resourceExporters'] ?? []) + self::$resources; + $this->objectDumpers = ($options[self::OBJECT_EXPORTERS] ?? []) + self::$objectExporters; + uksort($this->objectDumpers, function ($a, $b): int { + return $b === '' || (class_exists($a, false) && is_subclass_of($a, $b)) ? -1 : 1; + }); + } + + + /** + * Dumps variable to HTML. + */ + private function asHtml($var): string + { + [$file, $line, $code] = $this->location ? $this->findLocation() : null; + $locAttrs = $file && $this->location & self::LOCATION_SOURCE ? Helpers::formatHtml( + ' title="%in file % on line %" data-tracy-href="%"', "$code\n", $file, $line, Helpers::editorUri($file, $line) + ) : null; + + if (is_array($this->snapshot)) { + $options[self::SNAPSHOT] = &$this->snapshot; + } + $snapshot = &$options[self::SNAPSHOT]; // reference must exist + + $html = $json = null; + if ($this->lazy && (is_array($var) || is_object($var) || is_resource($var)) && $var) { + $json = $this->toJson($var, $options); + $snapshot = (array) $snapshot; + } else { + $html = $this->dumpVar($var, $options + [self::LAZY => $this->lazy]); + } + + return '
snapshot) ? ' data-tracy-snapshot=' . $this->formatSnapshotAttribute($snapshot) : '')
+			. ($json ? " data-tracy-dump='" . json_encode($json, JSON_HEX_APOS | JSON_HEX_AMP) . "'>" : '>')
+			. $html
+			. ($file && $this->location & self::LOCATION_LINK ? 'in ' . Helpers::editorLink($file, $line) . '' : '')
+			. "
\n"; + } + + + /** + * Dumps variable to x-terminal. + */ + private function asTerminal($var, array $colors = []): string + { + $s = $this->dumpVar($var, [self::LAZY => false]); + if ($colors) { + $s = preg_replace_callback('#|#', function ($m) use ($colors): string { + return "\033[" . (isset($m[1], $colors[$m[1]]) ? $colors[$m[1]] : '0') . 'm'; + }, $s); + } + $s = htmlspecialchars_decode(strip_tags($s), ENT_QUOTES); + if ($this->location & self::LOCATION_LINK && ([$file, $line] = $this->findLocation())) { + $s .= "in $file:$line"; + } + return $s; + } + + + /** + * Internal toHtml() dump implementation. + * @param mixed $var + */ + private function dumpVar(&$var, array $options, int $level = 0): string + { + if (method_exists(__CLASS__, $m = 'dump' . gettype($var))) { + return $this->$m($var, $options, $level); + } else { + return "unknown type\n"; + } + } + + + private function dumpNull(): string + { + return "null\n"; + } + + + private function dumpBoolean(&$var): string + { + return '' . ($var ? 'true' : 'false') . "\n"; + } + + + private function dumpInteger(&$var): string + { + return "$var\n"; + } + + + private function dumpDouble(&$var): string + { + $var = is_finite($var) + ? ($tmp = json_encode($var)) . (strpos($tmp, '.') === false ? '.0' : '') + : var_export($var, true); + return "$var\n"; + } + + + private function dumpString(&$var): string + { + return '"' + . Helpers::escapeHtml($this->encodeString($var, $this->maxLength)) + . '"' . (strlen($var) > 1 ? ' (' . strlen($var) . ')' : '') . "\n"; + } + + + private function dumpArray(&$var, array $options, int $level): string + { + $out = 'array ('; + + if (empty($var)) { + return $out . ")\n"; + + } elseif (in_array($var, $options['parents'] ?? [], true)) { + return $out . (count($var) - 1) . ") [ RECURSION ]\n"; + + } elseif (!$this->maxDepth || $level < $this->maxDepth) { + $collapsed = $level + ? count($var) >= $this->collapseSub + : (is_int($this->collapseTop) ? count($var) >= $this->collapseTop : $this->collapseTop); + + $span = '" + . $out . count($var) . ")\n"; + + } else { + $out = $span . '>' . $out . count($var) . ")\n" . ''; + $options['parents'][] = $var; + foreach ($var as $k => &$v) { + $hide = is_string($k) && isset($this->keysToHide[strtolower($k)]) ? self::HIDDEN_VALUE : null; + $out .= ' ' . str_repeat('| ', $level) . '' + . '' . Helpers::escapeHtml($this->encodeKey($k)) . ' => ' + . ($hide ? $this->dumpString($hide) : $this->dumpVar($v, $options, $level + 1)); + } + array_pop($options['parents']); + + return $out . '
'; + } + + } else { + return $out . count($var) . ") [ ... ]\n"; + } + } + + + private function dumpObject(&$var, array $options, int $level): string + { + $fields = $this->exportObject($var); + + $editorAttributes = ''; + if ($this->location & self::LOCATION_CLASS) { + $rc = $var instanceof \Closure ? new \ReflectionFunction($var) : new \ReflectionClass($var); + $editor = $rc->getFileName() ? Helpers::editorUri($rc->getFileName(), $rc->getStartLine()) : null; + if ($editor) { + $editorAttributes = Helpers::formatHtml( + ' title="Declared in file % on line %" data-tracy-href="%"', + $rc->getFileName(), + $rc->getStartLine(), + $editor + ); + } + } + $out = '' + . Helpers::escapeHtml(Helpers::getClass($var)) + . ' #' . substr(md5(spl_object_hash($var)), 0, 4) . ''; + + if (empty($fields)) { + return $out . "\n"; + + } elseif (in_array($var, $options['parents'] ?? [], true)) { + return $out . " { RECURSION }\n"; + + } elseif (!$this->maxDepth || $level < $this->maxDepth || $var instanceof \Closure) { + $collapsed = $level + ? count($fields) >= $this->collapseSub + : (is_int($this->collapseTop) ? count($fields) >= $this->collapseTop : $this->collapseTop); + + $span = '" . $out . "\n"; + + } else { + $out = $span . '>' . $out . "\n" . ''; + $options['parents'][] = $var; + foreach ($fields as $k => &$v) { + $vis = ''; + if (isset($k[0]) && $k[0] === "\x00") { + $vis = ' ' . ($k[1] === '*' ? 'protected' : 'private') . ''; + $k = substr($k, strrpos($k, "\x00") + 1); + } + $hide = is_string($k) && isset($this->keysToHide[strtolower($k)]) ? self::HIDDEN_VALUE : null; + $out .= ' ' . str_repeat('| ', $level) . '' + . '' . Helpers::escapeHtml($this->encodeKey($k)) . "$vis => " + . ($hide ? $this->dumpString($hide) : $this->dumpVar($v, $options, $level + 1)); + } + array_pop($options['parents']); + + return $out . ''; + } + + + } else { + return $out . " { ... }\n"; + } + } + + + private function dumpResource(&$var, array $options, int $level): string + { + $type = get_resource_type($var); + $out = '' . Helpers::escapeHtml($type) . ' resource ' + . '#' . (int) $var . ''; + if (isset($this->resourceDumpers[$type])) { + $out = "$out\n
"; + foreach (($this->resourceDumpers[$type])($var) as $k => $v) { + $out .= ' ' . str_repeat('| ', $level) . '' + . '' . Helpers::escapeHtml($k) . ' => ' . $this->dumpVar($v, $options, $level + 1); + } + return $out . '
'; + } + return "$out\n"; + } + + + /** + * @return mixed + */ + private function toJson(&$var, array $options = [], int $level = 0) + { + if (is_bool($var) || $var === null || is_int($var)) { + return $var; + + } elseif (is_float($var)) { + return is_finite($var) + ? (strpos($tmp = json_encode($var), '.') ? $var : ['number' => "$tmp.0"]) + : ['type' => (string) $var]; + + } elseif (is_string($var)) { + return $this->encodeString($var, $this->maxLength); + + } elseif (is_array($var)) { + if (($rec = in_array($var, $options['parents'] ?? [], true)) || $level >= $this->maxDepth) { + return ['stop' => [count($var), $rec]]; + } + $res = []; + $options['parents'][] = $var; + foreach ($var as $k => &$v) { + $hide = is_string($k) && isset($this->keysToHide[strtolower($k)]); + $res[] = [$this->encodeKey($k), $hide ? self::HIDDEN_VALUE : $this->toJson($v, $options, $level + 1)]; + } + array_pop($options['parents']); + return $res; + + } elseif (is_object($var)) { + $hash = spl_object_hash($var); + $obj = &$options[self::SNAPSHOT][$hash]; + if ($obj && $obj['level'] <= $level) { + return ['object' => $obj['id']]; + } + + $obj = $obj ?: [ + 'id' => count($options[self::SNAPSHOT]), + 'name' => Helpers::getClass($var), + 'hash' => substr(md5($hash), 0, 4), + 'level' => $level, + 'object' => $var, + ]; + if (empty($obj['editor']) && ($this->location & self::LOCATION_CLASS)) { + $rc = $var instanceof \Closure ? new \ReflectionFunction($var) : new \ReflectionClass($var); + if ($editor = $rc->getFileName() ? Helpers::editorUri($rc->getFileName(), $rc->getStartLine()) : null) { + $obj['editor'] = ['file' => $rc->getFileName(), 'line' => $rc->getStartLine(), 'url' => $editor]; + } + } + + if ($level < $this->maxDepth || !$this->maxDepth) { + $obj['level'] = $level; + $obj['items'] = []; + + foreach ($this->exportObject($var) as $k => $v) { + $vis = 0; + if (isset($k[0]) && $k[0] === "\x00") { + $vis = $k[1] === '*' ? 1 : 2; + $k = substr($k, strrpos($k, "\x00") + 1); + } + $hide = is_string($k) && isset($this->keysToHide[strtolower($k)]); + $obj['items'][] = [$this->encodeKey($k), $hide ? self::HIDDEN_VALUE : $this->toJson($v, $options, $level + 1), $vis]; + } + } + return ['object' => $obj['id']]; + + } elseif (is_resource($var)) { + $obj = &$options[self::SNAPSHOT][(string) $var]; + if (!$obj) { + $type = get_resource_type($var); + $obj = ['id' => count($options[self::SNAPSHOT]), 'name' => $type . ' resource', 'hash' => (int) $var]; + if (isset($this->resourceDumpers[$type])) { + foreach (($this->resourceDumpers[$type])($var) as $k => $v) { + $obj['items'][] = [$k, $this->toJson($v, $options, $level + 1)]; + } + } + } + return ['resource' => $obj['id']]; + + } else { + return ['type' => 'unknown type']; + } + } + + + public static function formatSnapshotAttribute(array &$snapshot): string + { + $res = []; + foreach ($snapshot as $obj) { + $id = $obj['id']; + unset($obj['level'], $obj['object'], $obj['id']); + $res[$id] = $obj; + } + $snapshot = []; + return "'" . json_encode($res, JSON_HEX_APOS | JSON_HEX_AMP) . "'"; + } + + + /** + * @internal + */ + public static function encodeString(string $s, int $maxLength = null): string + { + static $table; + if ($table === null) { + foreach (array_merge(range("\x00", "\x1F"), range("\x7F", "\xFF")) as $ch) { + $table[$ch] = '\x' . str_pad(dechex(ord($ch)), 2, '0', STR_PAD_LEFT); + } + $table['\\'] = '\\\\'; + $table["\r"] = '\r'; + $table["\n"] = '\n'; + $table["\t"] = '\t'; + } + + if ($maxLength && strlen($s) > $maxLength) { // shortens to $maxLength in UTF-8 or longer + if (function_exists('mb_substr')) { + $s = mb_substr($tmp = $s, 0, $maxLength, 'UTF-8'); + $shortened = $s !== $tmp; + } else { + $i = $len = 0; + $maxI = $maxLength * 4; // max UTF-8 length + do { + if (($s[$i] < "\x80" || $s[$i] >= "\xC0") && (++$len > $maxLength) || $i >= $maxI) { + $s = substr($s, 0, $i); + $shortened = true; + break; + } + } while (isset($s[++$i])); + } + } + + if (preg_match('#[^\x09\x0A\x0D\x20-\x7E\xA0-\x{10FFFF}]#u', $s) || preg_last_error()) { // is binary? + if ($maxLength && strlen($s) > $maxLength) { + $s = substr($s, 0, $maxLength); + $shortened = true; + } + $s = strtr($s, $table); + } + + return $s . (empty($shortened) ? '' : ' ... '); + } + + + /** + * @param int|string $k + * @return int|string + */ + private function encodeKey($key) + { + return is_int($key) || preg_match('#^[!\#$%&()*+,./0-9:;<=>?@A-Z[\]^_`a-z{|}~-]{1,50}\z#', $key) + ? $key + : '"' . $this->encodeString($key, $this->maxLength) . '"'; + } + + + /** + * @param object $obj + */ + private function exportObject($obj): array + { + foreach ($this->objectDumpers as $type => $dumper) { + if (!$type || $obj instanceof $type) { + return $dumper($obj); + } + } + + if ($this->debugInfo && method_exists($obj, '__debugInfo')) { + return $obj->__debugInfo(); + } + + return (array) $obj; + } + + + private static function exportClosure(\Closure $obj): array + { + $rc = new \ReflectionFunction($obj); + $res = []; + foreach ($rc->getParameters() as $param) { + $res[] = '$' . $param->getName(); + } + return [ + 'file' => $rc->getFileName(), + 'line' => $rc->getStartLine(), + 'variables' => $rc->getStaticVariables(), + 'parameters' => implode(', ', $res), + ]; + } + + + private static function exportSplFileInfo(\SplFileInfo $obj): array + { + return ['path' => $obj->getPathname()]; + } + + + private static function exportSplObjectStorage(\SplObjectStorage $obj): array + { + $res = []; + foreach (clone $obj as $item) { + $res[] = ['object' => $item, 'data' => $obj[$item]]; + } + return $res; + } + + + private static function exportPhpIncompleteClass(\__PHP_Incomplete_Class $obj): array + { + $info = ['className' => null, 'private' => [], 'protected' => [], 'public' => []]; + foreach ((array) $obj as $name => $value) { + if ($name === '__PHP_Incomplete_Class_Name') { + $info['className'] = $value; + } elseif (preg_match('#^\x0\*\x0(.+)\z#', $name, $m)) { + $info['protected'][$m[1]] = $value; + } elseif (preg_match('#^\x0(.+)\x0(.+)\z#', $name, $m)) { + $info['private'][$m[1] . '::$' . $m[2]] = $value; + } else { + $info['public'][$name] = $value; + } + } + return $info; + } + + + /** + * Finds the location where dump was called. Returns [file, line, code] + */ + private static function findLocation(): ?array + { + foreach (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) as $item) { + if (isset($item['class']) && $item['class'] === __CLASS__) { + $location = $item; + continue; + } elseif (isset($item['function'])) { + try { + $reflection = isset($item['class']) + ? new \ReflectionMethod($item['class'], $item['function']) + : new \ReflectionFunction($item['function']); + if ($reflection->isInternal() || preg_match('#\s@tracySkipLocation\s#', (string) $reflection->getDocComment())) { + $location = $item; + continue; + } + } catch (\ReflectionException $e) { + } + } + break; + } + + if (isset($location['file'], $location['line']) && is_file($location['file'])) { + $lines = file($location['file']); + $line = $lines[$location['line'] - 1]; + return [ + $location['file'], + $location['line'], + trim(preg_match('#\w*dump(er::\w+)?\(.*\)#i', $line, $m) ? $m[0] : $line), + ]; + } + return null; + } + + + private static function detectColors(): bool + { + return self::$terminalColors && + (getenv('ConEmuANSI') === 'ON' + || getenv('ANSICON') !== false + || getenv('term') === 'xterm-256color' + || (defined('STDOUT') && function_exists('posix_isatty') && posix_isatty(STDOUT))); + } +} diff --git a/vendor/tracy/tracy/src/Tracy/Dumper/assets/dumper.css b/vendor/tracy/tracy/src/Tracy/Dumper/assets/dumper.css new file mode 100644 index 0000000..2d2624f --- /dev/null +++ b/vendor/tracy/tracy/src/Tracy/Dumper/assets/dumper.css @@ -0,0 +1,70 @@ +/** + * This file is part of the Tracy (https://tracy.nette.org) + */ + +pre.tracy-dump { + text-align: left; + color: #444; + background: white; +} + +pre.tracy-dump div { + padding-left: 3ex; +} + +pre.tracy-dump div div { + border-left: 1px solid rgba(0, 0, 0, .1); + margin-left: .5ex; +} + +pre.tracy-dump a { + color: #125EAE; + text-decoration: none; +} + +pre.tracy-dump a:hover, +pre.tracy-dump a:focus { + background-color: #125EAE; + color: white; +} + +.tracy-dump-array, +.tracy-dump-object { + color: #C22; +} + +.tracy-dump-string { + color: #35D; +} + +.tracy-dump-number { + color: #090; +} + +.tracy-dump-null, +.tracy-dump-bool { + color: #850; +} + +.tracy-dump-visibility, +.tracy-dump-hash { + font-size: 85%; color: #999; +} + +.tracy-dump-indent { + display: none; +} + +span[data-tracy-href] { + border-bottom: 1px dotted rgba(0, 0, 0, .2); +} + +.tracy-dump-flash { + animation: tracy-dump-flash .2s ease; +} + +@keyframes tracy-dump-flash { + 0% { + background: #c0c0c033; + } +} diff --git a/vendor/tracy/tracy/src/Tracy/Dumper/assets/dumper.js b/vendor/tracy/tracy/src/Tracy/Dumper/assets/dumper.js new file mode 100644 index 0000000..846d542 --- /dev/null +++ b/vendor/tracy/tracy/src/Tracy/Dumper/assets/dumper.js @@ -0,0 +1,214 @@ +/** + * This file is part of the Tracy (https://tracy.nette.org) + */ + +'use strict'; + +(function() { + const + COLLAPSE_COUNT = 7, + COLLAPSE_COUNT_TOP = 14; + + class Dumper + { + static init(context) { + (context || document).querySelectorAll('[itemprop=tracy-snapshot], [data-tracy-snapshot]').forEach((el) => { + let preList, snapshot = JSON.parse(el.getAttribute('data-tracy-snapshot')); + + if (el.tagName === 'META') { // + snapshot = JSON.parse(el.getAttribute('content')); + preList = el.parentElement.querySelectorAll('[data-tracy-dump]'); + } else if (el.matches('[data-tracy-dump]')) { //
+					preList = [el];
+					el.removeAttribute('data-tracy-snapshot');
+				} else { // 
+					el.querySelectorAll('[data-tracy-dump]').forEach((el) => {
+						el.parentNode.removeChild(el.nextSibling); // remove \n after toggler
+						el.parentNode.replaceChild( // replace toggler
+							build(JSON.parse(el.getAttribute('data-tracy-dump')), snapshot, el.classList.contains('tracy-collapsed')),
+							el
+						);
+					});
+					return;
+				}
+
+				preList.forEach((el) => { // 
+					let built = build(JSON.parse(el.getAttribute('data-tracy-dump')), snapshot, el.classList.contains('tracy-collapsed'));
+					el.insertBefore(built, el.lastChild);
+					el.classList.remove('tracy-collapsed');
+					el.removeAttribute('data-tracy-dump');
+				});
+			});
+
+			if (Dumper.inited) {
+				return;
+			}
+			Dumper.inited = true;
+
+			// enables  & ctrl key
+			document.documentElement.addEventListener('click', (e) => {
+				let el;
+				if (e.ctrlKey && (el = e.target.closest('[data-tracy-href]'))) {
+					location.href = el.getAttribute('data-tracy-href');
+					return false;
+				}
+			});
+
+			document.documentElement.addEventListener('tracy-toggle', (e) => {
+				if (e.target.matches('.tracy-dump *')) {
+					e.detail.relatedTarget.classList.toggle('tracy-dump-flash', !e.detail.collapsed);
+				}
+			});
+
+			document.documentElement.addEventListener('animationend', (e) => {
+				if (e.animationName === 'tracy-dump-flash') {
+					e.target.classList.toggle('tracy-dump-flash', false);
+				}
+			});
+
+			Tracy.Toggle.init();
+		}
+	}
+
+
+	function build(data, repository, collapsed, parentIds) {
+		let type = data === null ? 'null' : typeof data,
+			collapseCount = collapsed === null ? COLLAPSE_COUNT : COLLAPSE_COUNT_TOP;
+
+		if (type === 'null' || type === 'string' || type === 'number' || type === 'boolean') {
+			data = type === 'string' ? '"' + data + '"' : (data + '');
+			return createEl(null, null, [
+				createEl(
+					'span',
+					{'class': 'tracy-dump-' + type.replace('ean', '')},
+					[data + '\n']
+				)
+			]);
+
+		} else if (Array.isArray(data)) {
+			return buildStruct(
+				[
+					createEl('span', {'class': 'tracy-dump-array'}, ['array']),
+					' (' + (data[0] && data.length || '') + ')'
+				],
+				' [ ... ]',
+				data[0] === null ? null : data,
+				collapsed === true || data.length >= collapseCount,
+				repository,
+				parentIds
+			);
+
+		} else if (data.stop) {
+			return createEl(null, null, [
+				createEl('span', {'class': 'tracy-dump-array'}, ['array']),
+				' (' + data.stop[0] + ')',
+				data.stop[1] ? ' [ RECURSION ]\n' : ' [ ... ]\n',
+			]);
+
+		} else if (data.number) {
+			return createEl(null, null, [
+				createEl('span', {'class': 'tracy-dump-number'}, [data.number + '\n'])
+			]);
+
+		} else if (data.type) {
+			return createEl(null, null, [
+				createEl('span', null, [data.type + '\n'])
+			]);
+
+		} else {
+			let id = data.object || data.resource,
+				object = repository[id];
+
+			if (!object) {
+				throw new UnknownEntityException;
+			}
+			parentIds = parentIds || [];
+			let recursive = parentIds.indexOf(id) > -1;
+			parentIds.push(id);
+
+			return buildStruct(
+				[
+					createEl('span', {
+						'class': data.object ? 'tracy-dump-object' : 'tracy-dump-resource',
+						title: object.editor ? 'Declared in file ' + object.editor.file + ' on line ' + object.editor.line : null,
+						'data-tracy-href': object.editor ? object.editor.url : null
+					}, [object.name]),
+					' ',
+					createEl('span', {'class': 'tracy-dump-hash'}, ['#' + object.hash])
+				],
+				recursive ? ' { RECURSION }' : ' { ... }',
+				recursive ? null : object.items,
+				collapsed === true || (object.items && object.items.length >= collapseCount),
+				repository,
+				parentIds
+			);
+		}
+	}
+
+
+	function buildStruct(span, ellipsis, items, collapsed, repository, parentIds) {
+		let res, toggle, div, handler;
+
+		if (!items || !items.length) {
+			span.push(!items || items.length ? ellipsis + '\n' : '\n');
+			return createEl(null, null, span);
+		}
+
+		res = createEl(null, null, [
+			toggle = createEl('span', {'class': collapsed ? 'tracy-toggle tracy-collapsed' : 'tracy-toggle'}, span),
+			'\n',
+			div = createEl('div', {'class': collapsed ? 'tracy-collapsed' : null})
+		]);
+
+		if (collapsed) {
+			toggle.addEventListener('tracy-toggle', handler = function() {
+				toggle.removeEventListener('tracy-toggle', handler);
+				createItems(div, items, repository, parentIds);
+			});
+		} else {
+			createItems(div, items, repository, parentIds);
+		}
+		return res;
+	}
+
+
+	function createEl(el, attrs, content) {
+		if (!(el instanceof Node)) {
+			el = el ? document.createElement(el) : document.createDocumentFragment();
+		}
+		for (let id in attrs || {}) {
+			if (attrs[id] !== null) {
+				el.setAttribute(id, attrs[id]);
+			}
+		}
+		content = content || [];
+		for (let id = 0; id < content.length; id++) {
+			let child = content[id];
+			if (child !== null) {
+				el.appendChild(child instanceof Node ? child : document.createTextNode(child));
+			}
+		}
+		return el;
+	}
+
+
+	function createItems(el, items, repository, parentIds) {
+		for (let i = 0; i < items.length; i++) {
+			let vis = items[i][2];
+			createEl(el, null, [
+				createEl('span', {'class': 'tracy-dump-key'}, [items[i][0]]),
+				vis ? ' ' : null,
+				vis ? createEl('span', {'class': 'tracy-dump-visibility'}, [vis === 1 ? 'protected' : 'private']) : null,
+				' => ',
+				build(items[i][1], repository, null, parentIds)
+			]);
+		}
+	}
+
+
+	function UnknownEntityException() {}
+
+
+	let Tracy = window.Tracy = window.Tracy || {};
+	Tracy.Dumper = Dumper;
+})();
diff --git a/vendor/tracy/tracy/src/Tracy/Helpers.php b/vendor/tracy/tracy/src/Tracy/Helpers.php
new file mode 100644
index 0000000..4113e02
--- /dev/null
+++ b/vendor/tracy/tracy/src/Tracy/Helpers.php
@@ -0,0 +1,305 @@
+ strlen($m[0])) {
+				$file = '...' . $m[0];
+			}
+			$file = strtr($file, '/', DIRECTORY_SEPARATOR);
+			return self::formatHtml('%%%',
+				$editor,
+				$origFile . ($line ? ":$line" : ''),
+				rtrim(dirname($file), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR,
+				basename($file),
+				$line ? ":$line" : ''
+			);
+		} else {
+			return self::formatHtml('%', $file . ($line ? ":$line" : ''));
+		}
+	}
+
+
+	/**
+	 * Returns link to editor.
+	 */
+	public static function editorUri(string $file, int $line = null, string $action = 'open', string $search = '', string $replace = ''): ?string
+	{
+		if (Debugger::$editor && $file && ($action === 'create' || is_file($file))) {
+			$file = strtr($file, '/', DIRECTORY_SEPARATOR);
+			$file = strtr($file, Debugger::$editorMapping);
+			return strtr(Debugger::$editor, [
+				'%action' => $action,
+				'%file' => rawurlencode($file),
+				'%line' => $line ?: 1,
+				'%search' => rawurlencode($search),
+				'%replace' => rawurlencode($replace),
+			]);
+		}
+		return null;
+	}
+
+
+	public static function formatHtml(string $mask): string
+	{
+		$args = func_get_args();
+		return preg_replace_callback('#%#', function () use (&$args, &$count): string {
+			return self::escapeHtml($args[++$count]);
+		}, $mask);
+	}
+
+
+	public static function escapeHtml($s): string
+	{
+		return htmlspecialchars((string) $s, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
+	}
+
+
+	public static function findTrace(array $trace, $method, int &$index = null): ?array
+	{
+		$m = is_array($method) ? $method : explode('::', $method);
+		foreach ($trace as $i => $item) {
+			if (
+				isset($item['function'])
+				&& $item['function'] === end($m)
+				&& isset($item['class']) === isset($m[1])
+				&& (!isset($item['class']) || $m[0] === '*' || is_a($item['class'], $m[0], true))
+			) {
+				$index = $i;
+				return $item;
+			}
+		}
+		return null;
+	}
+
+
+	public static function getClass($obj): string
+	{
+		return explode("\x00", get_class($obj))[0];
+	}
+
+
+	/** @internal */
+	public static function fixStack(\Throwable $exception): \Throwable
+	{
+		if (function_exists('xdebug_get_function_stack')) {
+			$stack = [];
+			foreach (array_slice(array_reverse(xdebug_get_function_stack()), 2, -1) as $row) {
+				$frame = [
+					'file' => $row['file'],
+					'line' => $row['line'],
+					'function' => $row['function'] ?? '*unknown*',
+					'args' => [],
+				];
+				if (!empty($row['class'])) {
+					$frame['type'] = isset($row['type']) && $row['type'] === 'dynamic' ? '->' : '::';
+					$frame['class'] = $row['class'];
+				}
+				$stack[] = $frame;
+			}
+			$ref = new \ReflectionProperty('Exception', 'trace');
+			$ref->setAccessible(true);
+			$ref->setValue($exception, $stack);
+		}
+		return $exception;
+	}
+
+
+	/** @internal */
+	public static function fixEncoding(string $s): string
+	{
+		return htmlspecialchars_decode(htmlspecialchars($s, ENT_NOQUOTES | ENT_IGNORE, 'UTF-8'), ENT_NOQUOTES);
+	}
+
+
+	/** @internal */
+	public static function errorTypeToString(int $type): string
+	{
+		$types = [
+			E_ERROR => 'Fatal Error',
+			E_USER_ERROR => 'User Error',
+			E_RECOVERABLE_ERROR => 'Recoverable Error',
+			E_CORE_ERROR => 'Core Error',
+			E_COMPILE_ERROR => 'Compile Error',
+			E_PARSE => 'Parse Error',
+			E_WARNING => 'Warning',
+			E_CORE_WARNING => 'Core Warning',
+			E_COMPILE_WARNING => 'Compile Warning',
+			E_USER_WARNING => 'User Warning',
+			E_NOTICE => 'Notice',
+			E_USER_NOTICE => 'User Notice',
+			E_STRICT => 'Strict standards',
+			E_DEPRECATED => 'Deprecated',
+			E_USER_DEPRECATED => 'User Deprecated',
+		];
+		return $types[$type] ?? 'Unknown error';
+	}
+
+
+	/** @internal */
+	public static function getSource(): string
+	{
+		if (isset($_SERVER['REQUEST_URI'])) {
+			return (!empty($_SERVER['HTTPS']) && strcasecmp($_SERVER['HTTPS'], 'off') ? 'https://' : 'http://')
+				. ($_SERVER['HTTP_HOST'] ?? '')
+				. $_SERVER['REQUEST_URI'];
+		} else {
+			return 'CLI (PID: ' . getmypid() . ')'
+				. (empty($_SERVER['argv']) ? '' : ': ' . implode(' ', $_SERVER['argv']));
+		}
+	}
+
+
+	/** @internal */
+	public static function improveException(\Throwable $e): void
+	{
+		$message = $e->getMessage();
+		if (!$e instanceof \Error && !$e instanceof \ErrorException) {
+			// do nothing
+		} elseif (preg_match('#^Call to undefined function (\S+\\\\)?(\w+)\(#', $message, $m)) {
+			$funcs = array_merge(get_defined_functions()['internal'], get_defined_functions()['user']);
+			$hint = self::getSuggestion($funcs, $m[1] . $m[2]) ?: self::getSuggestion($funcs, $m[2]);
+			$message = "Call to undefined function $m[2](), did you mean $hint()?";
+			$replace = ["$m[2](", "$hint("];
+
+		} elseif (preg_match('#^Call to undefined method ([\w\\\\]+)::(\w+)#', $message, $m)) {
+			$hint = self::getSuggestion(get_class_methods($m[1]), $m[2]);
+			$message .= ", did you mean $hint()?";
+			$replace = ["$m[2](", "$hint("];
+
+		} elseif (preg_match('#^Undefined variable: (\w+)#', $message, $m) && !empty($e->context)) {
+			$hint = self::getSuggestion(array_keys($e->context), $m[1]);
+			$message = "Undefined variable $$m[1], did you mean $$hint?";
+			$replace = ["$$m[1]", "$$hint"];
+
+		} elseif (preg_match('#^Undefined property: ([\w\\\\]+)::\$(\w+)#', $message, $m)) {
+			$rc = new \ReflectionClass($m[1]);
+			$items = array_diff($rc->getProperties(\ReflectionProperty::IS_PUBLIC), $rc->getProperties(\ReflectionProperty::IS_STATIC));
+			$hint = self::getSuggestion($items, $m[2]);
+			$message .= ", did you mean $$hint?";
+			$replace = ["->$m[2]", "->$hint"];
+
+		} elseif (preg_match('#^Access to undeclared static property: ([\w\\\\]+)::\$(\w+)#', $message, $m)) {
+			$rc = new \ReflectionClass($m[1]);
+			$items = array_intersect($rc->getProperties(\ReflectionProperty::IS_PUBLIC), $rc->getProperties(\ReflectionProperty::IS_STATIC));
+			$hint = self::getSuggestion($items, $m[2]);
+			$message .= ", did you mean $$hint?";
+			$replace = ["::$$m[2]", "::$$hint"];
+		}
+
+		if (isset($hint)) {
+			$ref = new \ReflectionProperty($e, 'message');
+			$ref->setAccessible(true);
+			$ref->setValue($e, $message);
+			$e->tracyAction = [
+				'link' => self::editorUri($e->getFile(), $e->getLine(), 'fix', $replace[0], $replace[1]),
+				'label' => 'fix it',
+			];
+		}
+	}
+
+
+	/** @internal */
+	public static function improveError(string $message, array $context = []): string
+	{
+		if (preg_match('#^Undefined variable: (\w+)#', $message, $m) && $context) {
+			$hint = self::getSuggestion(array_keys($context), $m[1]);
+			return $hint ? "Undefined variable $$m[1], did you mean $$hint?" : $message;
+
+		} elseif (preg_match('#^Undefined property: ([\w\\\\]+)::\$(\w+)#', $message, $m)) {
+			$rc = new \ReflectionClass($m[1]);
+			$items = array_diff($rc->getProperties(\ReflectionProperty::IS_PUBLIC), $rc->getProperties(\ReflectionProperty::IS_STATIC));
+			$hint = self::getSuggestion($items, $m[2]);
+			return $hint ? $message . ", did you mean $$hint?" : $message;
+		}
+		return $message;
+	}
+
+
+	/** @internal */
+	public static function guessClassFile(string $class): ?string
+	{
+		$segments = explode(DIRECTORY_SEPARATOR, $class);
+		$res = null;
+		$max = 0;
+		foreach (get_declared_classes() as $class) {
+			$parts = explode(DIRECTORY_SEPARATOR, $class);
+			foreach ($parts as $i => $part) {
+				if ($part !== $segments[$i] ?? null) {
+					break;
+				}
+			}
+			if ($i > $max && ($file = (new \ReflectionClass($class))->getFileName())) {
+				$max = $i;
+				$res = array_merge(array_slice(explode(DIRECTORY_SEPARATOR, $file), 0, $i - count($parts)), array_slice($segments, $i));
+				$res = implode(DIRECTORY_SEPARATOR, $res) . '.php';
+			}
+		}
+		return $res;
+	}
+
+
+	/**
+	 * Finds the best suggestion.
+	 * @internal
+	 */
+	public static function getSuggestion(array $items, string $value): ?string
+	{
+		$best = null;
+		$min = (strlen($value) / 4 + 1) * 10 + .1;
+		foreach (array_unique($items, SORT_REGULAR) as $item) {
+			$item = is_object($item) ? $item->getName() : $item;
+			if (($len = levenshtein($item, $value, 10, 11, 10)) > 0 && $len < $min) {
+				$min = $len;
+				$best = $item;
+			}
+		}
+		return $best;
+	}
+
+
+	/** @internal */
+	public static function isHtmlMode(): bool
+	{
+		return empty($_SERVER['HTTP_X_REQUESTED_WITH']) && empty($_SERVER['HTTP_X_TRACY_AJAX'])
+			&& PHP_SAPI !== 'cli'
+			&& !preg_match('#^Content-Type: (?!text/html)#im', implode("\n", headers_list()));
+	}
+
+
+	/** @internal */
+	public static function isAjax(): bool
+	{
+		return isset($_SERVER['HTTP_X_TRACY_AJAX']) && preg_match('#^\w{10,15}\z#', $_SERVER['HTTP_X_TRACY_AJAX']);
+	}
+
+
+	/** @internal */
+	public static function getNonce(): ?string
+	{
+		return preg_match('#^Content-Security-Policy(?:-Report-Only)?:.*\sscript-src\s+(?:[^;]+\s)?\'nonce-([\w+/]+=*)\'#mi', implode("\n", headers_list()), $m)
+			? $m[1]
+			: null;
+	}
+}
diff --git a/vendor/tracy/tracy/src/Tracy/Logger/FireLogger.php b/vendor/tracy/tracy/src/Tracy/Logger/FireLogger.php
new file mode 100644
index 0000000..b152cb5
--- /dev/null
+++ b/vendor/tracy/tracy/src/Tracy/Logger/FireLogger.php
@@ -0,0 +1,180 @@
+ []];
+
+
+	/**
+	 * Sends message to FireLogger console.
+	 * @param  mixed  $message
+	 */
+	public function log($message, $priority = self::DEBUG): bool
+	{
+		if (!isset($_SERVER['HTTP_X_FIRELOGGER']) || headers_sent()) {
+			return false;
+		}
+
+		$item = [
+			'name' => 'PHP',
+			'level' => $priority,
+			'order' => count($this->payload['logs']),
+			'time' => str_pad(number_format((microtime(true) - Debugger::$time) * 1000, 1, '.', ' '), 8, '0', STR_PAD_LEFT) . ' ms',
+			'template' => '',
+			'message' => '',
+			'style' => 'background:#767ab6',
+		];
+
+		$args = func_get_args();
+		if (isset($args[0]) && is_string($args[0])) {
+			$item['template'] = array_shift($args);
+		}
+
+		if (isset($args[0]) && $args[0] instanceof \Throwable) {
+			$e = array_shift($args);
+			$trace = $e->getTrace();
+			if (
+				isset($trace[0]['class'])
+				&& $trace[0]['class'] === Debugger::class
+				&& ($trace[0]['function'] === 'shutdownHandler' || $trace[0]['function'] === 'errorHandler')
+			) {
+				unset($trace[0]);
+			}
+
+			$file = str_replace(dirname(dirname(dirname($e->getFile()))), "\xE2\x80\xA6", $e->getFile());
+			$item['template'] = ($e instanceof \ErrorException ? '' : Helpers::getClass($e) . ': ')
+				. $e->getMessage() . ($e->getCode() ? ' #' . $e->getCode() : '') . ' in ' . $file . ':' . $e->getLine();
+			$item['pathname'] = $e->getFile();
+			$item['lineno'] = $e->getLine();
+
+		} else {
+			$trace = debug_backtrace();
+			if (
+				isset($trace[1]['class'])
+				&& $trace[1]['class'] === Debugger::class
+				&& ($trace[1]['function'] === 'fireLog')
+			) {
+				unset($trace[0]);
+			}
+
+			foreach ($trace as $frame) {
+				if (isset($frame['file']) && is_file($frame['file'])) {
+					$item['pathname'] = $frame['file'];
+					$item['lineno'] = $frame['line'];
+					break;
+				}
+			}
+		}
+
+		$item['exc_info'] = ['', '', []];
+		$item['exc_frames'] = [];
+
+		foreach ($trace as $frame) {
+			$frame += ['file' => null, 'line' => null, 'class' => null, 'type' => null, 'function' => null, 'object' => null, 'args' => null];
+			$item['exc_info'][2][] = [$frame['file'], $frame['line'], "$frame[class]$frame[type]$frame[function]", $frame['object']];
+			$item['exc_frames'][] = $frame['args'];
+		}
+
+		if (isset($args[0]) && in_array($args[0], [self::DEBUG, self::INFO, self::WARNING, self::ERROR, self::CRITICAL], true)) {
+			$item['level'] = array_shift($args);
+		}
+
+		$item['args'] = $args;
+
+		$this->payload['logs'][] = $this->jsonDump($item, -1);
+		foreach (str_split(base64_encode(json_encode($this->payload)), 4990) as $k => $v) {
+			header("FireLogger-de11e-$k:$v");
+		}
+		return true;
+	}
+
+
+	/**
+	 * Dump implementation for JSON.
+	 * @param  mixed  $var
+	 * @return array|null|int|float|bool|string
+	 */
+	private function jsonDump(&$var, int $level = 0)
+	{
+		if (is_bool($var) || $var === null || is_int($var) || is_float($var)) {
+			return $var;
+
+		} elseif (is_string($var)) {
+			return Dumper::encodeString($var, $this->maxLength);
+
+		} elseif (is_array($var)) {
+			static $marker;
+			if ($marker === null) {
+				$marker = uniqid("\x00", true);
+			}
+			if (isset($var[$marker])) {
+				return "\xE2\x80\xA6RECURSION\xE2\x80\xA6";
+
+			} elseif ($level < $this->maxDepth || !$this->maxDepth) {
+				$var[$marker] = true;
+				$res = [];
+				foreach ($var as $k => &$v) {
+					if ($k !== $marker) {
+						$res[$this->jsonDump($k)] = $this->jsonDump($v, $level + 1);
+					}
+				}
+				unset($var[$marker]);
+				return $res;
+
+			} else {
+				return " \xE2\x80\xA6 ";
+			}
+
+		} elseif (is_object($var)) {
+			$arr = (array) $var;
+			static $list = [];
+			if (in_array($var, $list, true)) {
+				return "\xE2\x80\xA6RECURSION\xE2\x80\xA6";
+
+			} elseif ($level < $this->maxDepth || !$this->maxDepth) {
+				$list[] = $var;
+				$res = ["\x00" => '(object) ' . Helpers::getClass($var)];
+				foreach ($arr as $k => &$v) {
+					if (isset($k[0]) && $k[0] === "\x00") {
+						$k = substr($k, strrpos($k, "\x00") + 1);
+					}
+					$res[$this->jsonDump($k)] = $this->jsonDump($v, $level + 1);
+				}
+				array_pop($list);
+				return $res;
+
+			} else {
+				return " \xE2\x80\xA6 ";
+			}
+
+		} elseif (is_resource($var)) {
+			return 'resource ' . get_resource_type($var);
+
+		} else {
+			return 'unknown type';
+		}
+	}
+}
diff --git a/vendor/tracy/tracy/src/Tracy/Logger/ILogger.php b/vendor/tracy/tracy/src/Tracy/Logger/ILogger.php
new file mode 100644
index 0000000..d260936
--- /dev/null
+++ b/vendor/tracy/tracy/src/Tracy/Logger/ILogger.php
@@ -0,0 +1,27 @@
+directory = $directory;
+		$this->email = $email;
+		$this->blueScreen = $blueScreen;
+		$this->mailer = [$this, 'defaultMailer'];
+	}
+
+
+	/**
+	 * Logs message or exception to file and sends email notification.
+	 * @param  mixed  $message
+	 * @param  string  $priority  one of constant ILogger::INFO, WARNING, ERROR (sends email), EXCEPTION (sends email), CRITICAL (sends email)
+	 * @return string|null logged error filename
+	 */
+	public function log($message, $priority = self::INFO)
+	{
+		if (!$this->directory) {
+			throw new \LogicException('Logging directory is not specified.');
+		} elseif (!is_dir($this->directory)) {
+			throw new \RuntimeException("Logging directory '$this->directory' is not found or is not directory.");
+		}
+
+		$exceptionFile = $message instanceof \Throwable
+			? $this->getExceptionFile($message)
+			: null;
+		$line = static::formatLogLine($message, $exceptionFile);
+		$file = $this->directory . '/' . strtolower($priority ?: self::INFO) . '.log';
+
+		if (!@file_put_contents($file, $line . PHP_EOL, FILE_APPEND | LOCK_EX)) { // @ is escalated to exception
+			throw new \RuntimeException("Unable to write to log file '$file'. Is directory writable?");
+		}
+
+		if ($exceptionFile) {
+			$this->logException($message, $exceptionFile);
+		}
+
+		if (in_array($priority, [self::ERROR, self::EXCEPTION, self::CRITICAL], true)) {
+			$this->sendEmail($message);
+		}
+
+		return $exceptionFile;
+	}
+
+
+	/**
+	 * @param  mixed  $message
+	 */
+	public static function formatMessage($message): string
+	{
+		if ($message instanceof \Throwable) {
+			while ($message) {
+				$tmp[] = ($message instanceof \ErrorException
+					? Helpers::errorTypeToString($message->getSeverity()) . ': ' . $message->getMessage()
+					: Helpers::getClass($message) . ': ' . $message->getMessage() . ($message->getCode() ? ' #' . $message->getCode() : '')
+				) . ' in ' . $message->getFile() . ':' . $message->getLine();
+				$message = $message->getPrevious();
+			}
+			$message = implode("\ncaused by ", $tmp);
+
+		} elseif (!is_string($message)) {
+			$message = Dumper::toText($message);
+		}
+
+		return trim($message);
+	}
+
+
+	/**
+	 * @param  mixed  $message
+	 */
+	public static function formatLogLine($message, string $exceptionFile = null): string
+	{
+		return implode(' ', [
+			@date('[Y-m-d H-i-s]'), // @ timezone may not be set
+			preg_replace('#\s*\r?\n\s*#', ' ', static::formatMessage($message)),
+			' @  ' . Helpers::getSource(),
+			$exceptionFile ? ' @@  ' . basename($exceptionFile) : null,
+		]);
+	}
+
+
+	public function getExceptionFile(\Throwable $exception): string
+	{
+		while ($exception) {
+			$data[] = [
+				get_class($exception), $exception->getMessage(), $exception->getCode(), $exception->getFile(), $exception->getLine(),
+				array_map(function (array $item): array { unset($item['args']); return $item; }, $exception->getTrace()),
+			];
+			$exception = $exception->getPrevious();
+		}
+		$hash = substr(md5(serialize($data)), 0, 10);
+		$dir = strtr($this->directory . '/', '\\/', DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR);
+		foreach (new \DirectoryIterator($this->directory) as $file) {
+			if (strpos($file->getBasename(), $hash)) {
+				return $dir . $file;
+			}
+		}
+		return $dir . 'exception--' . @date('Y-m-d--H-i') . "--$hash.html"; // @ timezone may not be set
+	}
+
+
+	/**
+	 * Logs exception to the file if file doesn't exist.
+	 * @return string logged error filename
+	 */
+	protected function logException(\Throwable $exception, string $file = null): string
+	{
+		$file = $file ?: $this->getExceptionFile($exception);
+		$bs = $this->blueScreen ?: new BlueScreen;
+		$bs->renderToFile($exception, $file);
+		return $file;
+	}
+
+
+	/**
+	 * @param  mixed  $message
+	 */
+	protected function sendEmail($message): void
+	{
+		$snooze = is_numeric($this->emailSnooze)
+			? $this->emailSnooze
+			: @strtotime($this->emailSnooze) - time(); // @ timezone may not be set
+
+		if (
+			$this->email
+			&& $this->mailer
+			&& @filemtime($this->directory . '/email-sent') + $snooze < time() // @ file may not exist
+			&& @file_put_contents($this->directory . '/email-sent', 'sent') // @ file may not be writable
+		) {
+			($this->mailer)($message, implode(', ', (array) $this->email));
+		}
+	}
+
+
+	/**
+	 * Default mailer.
+	 * @param  mixed  $message
+	 * @internal
+	 */
+	public function defaultMailer($message, string $email): void
+	{
+		$host = preg_replace('#[^\w.-]+#', '', $_SERVER['HTTP_HOST'] ?? php_uname('n'));
+		$parts = str_replace(
+			["\r\n", "\n"],
+			["\n", PHP_EOL],
+			[
+				'headers' => implode("\n", [
+					'From: ' . ($this->fromEmail ?: "noreply@$host"),
+					'X-Mailer: Tracy',
+					'Content-Type: text/plain; charset=UTF-8',
+					'Content-Transfer-Encoding: 8bit',
+				]) . "\n",
+				'subject' => "PHP: An error occurred on the server $host",
+				'body' => static::formatMessage($message) . "\n\nsource: " . Helpers::getSource(),
+			]
+		);
+
+		mail($email, $parts['subject'], $parts['body'], $parts['headers']);
+	}
+}
diff --git a/vendor/tracy/tracy/src/Tracy/OutputDebugger/OutputDebugger.php b/vendor/tracy/tracy/src/Tracy/OutputDebugger/OutputDebugger.php
new file mode 100644
index 0000000..85f152b
--- /dev/null
+++ b/vendor/tracy/tracy/src/Tracy/OutputDebugger/OutputDebugger.php
@@ -0,0 +1,80 @@
+start();
+	}
+
+
+	public function start(): void
+	{
+		foreach (get_included_files() as $file) {
+			if (fread(fopen($file, 'r'), 3) === self::BOM) {
+				$this->list[] = [$file, 1, self::BOM];
+			}
+		}
+		ob_start([$this, 'handler'], 1);
+	}
+
+
+	/** @internal */
+	public function handler(string $s, int $phase): ?string
+	{
+		$trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
+		if (isset($trace[0]['file'], $trace[0]['line'])) {
+			$stack = $trace;
+			unset($stack[0]['line'], $stack[0]['args']);
+			$i = count($this->list);
+			if ($i && $this->list[$i - 1][3] === $stack) {
+				$this->list[$i - 1][2] .= $s;
+			} else {
+				$this->list[] = [$trace[0]['file'], $trace[0]['line'], $s, $stack];
+			}
+		}
+		return $phase === PHP_OUTPUT_HANDLER_FINAL
+			? $this->renderHtml()
+			: null;
+	}
+
+
+	private function renderHtml(): string
+	{
+		$res = '';
+		foreach ($this->list as $item) {
+			$stack = [];
+			foreach (array_slice($item[3], 1) as $t) {
+				$t += ['class' => '', 'type' => '', 'function' => ''];
+				$stack[] = "$t[class]$t[type]$t[function]()"
+					. (isset($t['file'], $t['line']) ? ' in ' . basename($t['file']) . ":$t[line]" : '');
+			}
+
+			$res .= ''
+				. Helpers::editorLink($item[0], $item[1]) . ' '
+				. str_replace(self::BOM, 'BOM', Dumper::toHtml($item[2]))
+				. "
\n"; + } + return $res . '
'; + } +} diff --git a/vendor/tracy/tracy/src/Tracy/TableSort/table-sort.css b/vendor/tracy/tracy/src/Tracy/TableSort/table-sort.css new file mode 100644 index 0000000..e24286c --- /dev/null +++ b/vendor/tracy/tracy/src/Tracy/TableSort/table-sort.css @@ -0,0 +1,15 @@ +/** + * This file is part of the Tracy (https://tracy.nette.org) + */ + +.tracy-sortable tr:first-child > * { + position: relative; +} + +.tracy-sortable tr:first-child > *:hover:before { + position: absolute; + right: .3em; + content: "\21C5"; + opacity: .4; + font-weight: normal; +} diff --git a/vendor/tracy/tracy/src/Tracy/TableSort/table-sort.js b/vendor/tracy/tracy/src/Tracy/TableSort/table-sort.js new file mode 100644 index 0000000..6e2ab1f --- /dev/null +++ b/vendor/tracy/tracy/src/Tracy/TableSort/table-sort.js @@ -0,0 +1,43 @@ +/** + * This file is part of the Tracy (https://tracy.nette.org) + */ + +'use strict'; + +(function() { + + // enables + class TableSort + { + static init() { + document.documentElement.addEventListener('click', (e) => { + if (e.target.matches('.tracy-sortable tr:first-child *')) { + TableSort.sort(e.target.closest('td,th')); + } + }); + + TableSort.init = function() {}; + } + + static sort(tcell) { + let tbody = tcell.closest('table').tBodies[0]; + let preserveFirst = !tcell.closest('thead') && !tcell.parentNode.querySelectorAll('td').length; + let asc = !(tbody.tracyAsc === tcell.cellIndex); + tbody.tracyAsc = asc ? tcell.cellIndex : null; + let getText = (cell) => { return cell ? cell.innerText : ''; }; + + Array.from(tbody.children) + .slice(preserveFirst ? 1 : 0) + .sort((a, b) => { + return function(v1, v2) { + return v1 !== '' && v2 !== '' && !isNaN(v1) && !isNaN(v2) ? v1 - v2 : v1.toString().localeCompare(v2); + }(getText((asc ? a : b).children[tcell.cellIndex]), getText((asc ? b : a).children[tcell.cellIndex])); + }) + .forEach((tr) => { tbody.appendChild(tr); }); + } + } + + + let Tracy = window.Tracy = window.Tracy || {}; + Tracy.TableSort = Tracy.TableSort || TableSort; +})(); diff --git a/vendor/tracy/tracy/src/Tracy/Toggle/toggle.css b/vendor/tracy/tracy/src/Tracy/Toggle/toggle.css new file mode 100644 index 0000000..eb985f1 --- /dev/null +++ b/vendor/tracy/tracy/src/Tracy/Toggle/toggle.css @@ -0,0 +1,29 @@ +/** + * This file is part of the Tracy (https://tracy.nette.org) + */ + +.tracy-collapsed { + display: none; +} + +.tracy-toggle.tracy-collapsed { + display: inline; +} + +.tracy-toggle { + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.tracy-toggle:after { + content: "\A0\25BC"; + opacity: .4; +} + +.tracy-toggle.tracy-collapsed:after { + content: "\A0\25BA"; +} diff --git a/vendor/tracy/tracy/src/Tracy/Toggle/toggle.js b/vendor/tracy/tracy/src/Tracy/Toggle/toggle.js new file mode 100644 index 0000000..a4ad6c2 --- /dev/null +++ b/vendor/tracy/tracy/src/Tracy/Toggle/toggle.js @@ -0,0 +1,107 @@ +/** + * This file is part of the Tracy (https://tracy.nette.org) + */ + +'use strict'; + +(function() { + + // enables or toggling + class Toggle + { + static init() { + document.documentElement.addEventListener('click', (e) => { + let el = e.target.closest('.tracy-toggle'); + if (el && !e.shiftKey && !e.altKey && !e.ctrlKey && !e.metaKey) { + Toggle.toggle(el); + e.stopImmediatePropagation(); + } + }); + Toggle.init = function() {}; + } + + + // changes element visibility + static toggle(el, show) { + let collapsed = el.classList.contains('tracy-collapsed'), + ref = el.getAttribute('data-tracy-ref') || el.getAttribute('href', 2), + dest = el; + + if (typeof show === 'undefined') { + show = collapsed; + } else if (!show === collapsed) { + return; + } + + if (!ref || ref === '#') { + ref = '+'; + } else if (ref.substr(0, 1) === '#') { + dest = document; + } + ref = ref.match(/(\^\s*([^+\s]*)\s*)?(\+\s*(\S*)\s*)?(.*)/); + dest = ref[1] ? dest.parentNode : dest; + dest = ref[2] ? dest.closest(ref[2]) : dest; + dest = ref[3] ? Toggle.nextElement(dest.nextElementSibling, ref[4]) : dest; + dest = ref[5] ? dest.querySelector(ref[5]) : dest; + + el.classList.toggle('tracy-collapsed', !show); + dest.classList.toggle('tracy-collapsed', !show); + + el.dispatchEvent(new CustomEvent('tracy-toggle', { + bubbles: true, + detail: {relatedTarget: dest, collapsed: !show} + })); + } + + + // save & restore toggles + static persist(baseEl, restore) { + let saved = []; + baseEl.addEventListener('tracy-toggle', (e) => { + if (saved.indexOf(e.target) < 0) { + saved.push(e.target); + } + }); + + let toggles = JSON.parse(sessionStorage.getItem('tracy-toggles-' + baseEl.id)); + if (toggles && restore !== false) { + toggles.forEach((item) => { + let el = baseEl; + for (let i in item.path) { + if (!(el = el.children[item.path[i]])) { + return; + } + } + if (el.textContent === item.text) { + Toggle.toggle(el, item.show); + } + }); + } + + window.addEventListener('unload', () => { + toggles = saved.map((el) => { + let item = {path: [], text: el.textContent, show: !el.classList.contains('tracy-collapsed')}; + do { + item.path.unshift(Array.from(el.parentNode.children).indexOf(el)); + el = el.parentNode; + } while (el && el !== baseEl); + return item; + }); + sessionStorage.setItem('tracy-toggles-' + baseEl.id, JSON.stringify(toggles)); + }); + } + + + // finds next matching element + static nextElement(el, selector) { + while (el && selector && !el.matches(selector)) { + el = el.nextElementSibling; + } + return el; + } + } + + + let Tracy = window.Tracy = window.Tracy || {}; + Tracy.Toggle = Tracy.Toggle || Toggle; +})(); diff --git a/vendor/tracy/tracy/src/Tracy/shortcuts.php b/vendor/tracy/tracy/src/Tracy/shortcuts.php new file mode 100644 index 0000000..f110f22 --- /dev/null +++ b/vendor/tracy/tracy/src/Tracy/shortcuts.php @@ -0,0 +1,46 @@ +setStub("startBuffering(); +foreach ($iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__ . '/../../src', RecursiveDirectoryIterator::SKIP_DOTS)) as $file) { + echo "adding: {$iterator->getSubPathname()}\n"; + + $s = file_get_contents($file->getPathname()); + if (strpos($s, '@tracySkipLocation') === false) { + $s = php_strip_whitespace($file->getPathname()); + } + + if ($file->getExtension() === 'js') { + $s = compressJs($s); + + } elseif ($file->getExtension() === 'css') { + $s = compressCss($s); + + } elseif ($file->getExtension() === 'phtml') { + $s = preg_replace_callback('#(<(script|style).*(?)(.*)(getSubPathname()] = $s; +} + +$phar->stopBuffering(); +$phar->compressFiles(Phar::GZ); + +echo "OK\n"; diff --git a/vendor/tracy/tracy/tools/open-in-editor/linux/install.sh b/vendor/tracy/tracy/tools/open-in-editor/linux/install.sh new file mode 100644 index 0000000..5a7bfb3 --- /dev/null +++ b/vendor/tracy/tracy/tools/open-in-editor/linux/install.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# This shell script sets open-editor.sh as handler for editor:// protocol + +matches=0 +while read -r line +do + if [ "editor=" == "${line:0:7}" ]; then + matches=1 + break + fi +done < "open-editor.sh" + +if [ "$matches" == "0" ]; then + echo -e "\e[31;1mError: it seems like you have not set command to run your editor." + echo -e "Before install, set variable \`\$editor\` in file \`open-editor.sh\`.\e[0m" + exit 1 +fi + +# -------------------------------------------------------------- + +echo "[Desktop Entry] +Name=Tracy Open Editor +Exec=tracy-openeditor.sh %u +Terminal=false +NoDisplay=true +Type=Application +MimeType=x-scheme-handler/editor;" > tracy-openeditor.desktop + +chmod +x open-editor.sh +chmod +x tracy-openeditor.desktop + +sudo cp open-editor.sh /usr/bin/tracy-openeditor.sh +sudo xdg-desktop-menu install tracy-openeditor.desktop +sudo update-desktop-database +rm tracy-openeditor.desktop + +echo -e "\e[32;1mDone.\e[0m" diff --git a/vendor/tracy/tracy/tools/open-in-editor/linux/open-editor.sh b/vendor/tracy/tracy/tools/open-in-editor/linux/open-editor.sh new file mode 100644 index 0000000..a9754e3 --- /dev/null +++ b/vendor/tracy/tracy/tools/open-in-editor/linux/open-editor.sh @@ -0,0 +1,101 @@ +#!/bin/bash +declare -A mapping + +# +# Configure your editor by setting the $editor variable: +# + +# Visual Studio Code +#editor='code --goto "$FILE":"$LINE"' +# Emacs +#editor='emacs +$LINE "$FILE"' +# gVim +#editor='gvim +$LINE "$FILE"' +# gEdit +#editor='gedit +$LINE "$FILE"' +# Pluma +#editor='pluma +$LINE "$FILE"' + +# +# Optionally configure custom mapping here: +# + +#mapping["/remotepath"]="/localpath" +#mapping["/mnt/d/"]="d:/" + +# +# Please, do not modify the code below. +# + +# Find and return URI parameter value. Or nothing, if the param is missing. +# Arguments: 1) URI, 2) Parameter name. +function get_param { + echo "$1" | sed -n -r "s/.*$2=([^&]*).*/\1/ip" +} + +if [[ -z "$editor" ]]; then + echo "You need to set the \$editor variable in file '`realpath $0`'" + exit +fi + +url=$1 +if [ "${url:0:9}" != "editor://" ]; then + exit +fi + +# Parse action and essential data from the URI. +regex='editor\:\/\/(open|create|fix)\/\?(.*)' +action=`echo $url | sed -r "s/$regex/\1/i"` +uri_params=`echo $url | sed -r "s/$regex/\2/i"` + +file=`get_param $uri_params "file"` +line=`get_param $uri_params "line"` +search=`get_param $uri_params "search"` +replace=`get_param $uri_params "replace"` + +# Debug? +#echo "action '$action'" +#echo "file '$file'" +#echo "line '$line'" +#echo "search '$search'" +#echo "replace '$replace'" + +# Convert URI encoded codes to normal characters (e.g. '%2F' => '/'). +printf -v file "${file//%/\\x}" +# And escape double-quotes. +file=${file//\"/\\\"} + +# Action: Create a file (only if it does not already exist). +if [ "$action" == "create" ] && [[ ! -f "$file" ]]; then + mkdir -p $(dirname "$file") + touch "$file" +fi + +# Action: Fix the file (if the file exists and while creating backup beforehand). +if [ "$action" == "fix" ]; then + + if [[ ! -f "$file" ]]; then + echo "Cannot fix non-existing file '$file'" + exit + fi + + # Backup the original file. + cp $file "$file.bak" + # Search and replace in place - only on the specified line. + sed -i "${line}s/${search}/${replace}/" $file + +fi + +# Apply custom mapping conversion. +for path in "${!mapping[@]}"; do + file="${file//$path/${mapping[$path]}}" +done + +# Format the command according to the selected editor. +command="${editor//\$FILE/$file}" +command="${command//\$LINE/$line}" + +# Debug? +#echo $command + +eval $command diff --git a/vendor/tracy/tracy/tools/open-in-editor/windows/install.cmd b/vendor/tracy/tracy/tools/open-in-editor/windows/install.cmd new file mode 100644 index 0000000..ecee89f --- /dev/null +++ b/vendor/tracy/tracy/tools/open-in-editor/windows/install.cmd @@ -0,0 +1,8 @@ +@echo off +:: This Windows batch file sets open-editor.js as handler for editor:// protocol + +if defined PROCESSOR_ARCHITEW6432 (set reg="%systemroot%\sysnative\reg.exe") else (set reg=reg) + +%reg% ADD HKCR\editor /ve /d "URL:editor Protocol" /f +%reg% ADD HKCR\editor /v "URL Protocol" /d "" /f +%reg% ADD HKCR\editor\shell\open\command /ve /d "wscript \"%~dp0open-editor.js\" \"%%1\"" /f diff --git a/vendor/tracy/tracy/tools/open-in-editor/windows/open-editor.js b/vendor/tracy/tracy/tools/open-in-editor/windows/open-editor.js new file mode 100644 index 0000000..6d17f16 --- /dev/null +++ b/vendor/tracy/tracy/tools/open-in-editor/windows/open-editor.js @@ -0,0 +1,81 @@ +var settings = { + + // PhpStorm + // editor: '"C:\\Program Files\\JetBrains\\PhpStorm 2018.1.2\\bin\\phpstorm64.exe" --line %line% "%file%"', + // title: 'PhpStorm', + + // NetBeans + // editor: '"C:\\Program Files\\NetBeans 8.1\\bin\\netbeans.exe" "%file%:%line%" --console suppress', + + // Nusphere PHPEd + // editor: '"C:\\Program Files\\NuSphere\\PhpED\\phped.exe" "%file%" --line=%line%', + + // SciTE + // editor: '"C:\\Program Files\\SciTE\\scite.exe" "-open:%file%" -goto:%line%', + + // EmEditor + // editor: '"C:\\Program Files\\EmEditor\\EmEditor.exe" "%file%" /l %line%', + + // PSPad Editor + // editor: '"C:\\Program Files\\PSPad editor\\PSPad.exe" -%line% "%file%"', + + // gVim + // editor: '"C:\\Program Files\\Vim\\vim73\\gvim.exe" "%file%" +%line%', + + // Sublime Text 2 + // editor: '"C:\\Program Files\\Sublime Text 2\\sublime_text.exe" "%file%:%line%"', + + mappings: { + // '/remotepath': '/localpath' + } +}; + + + +if (!settings.editor) { + WScript.Echo('Create variable "settings.editor" in ' + WScript.ScriptFullName); + WScript.Quit(); +} + +var url = WScript.Arguments(0); +var match = /^editor:\/\/(open|create|fix)\/\?file=([^&]+)&line=(\d+)(?:&search=([^&]*)&replace=([^&]*))?/.exec(url); +if (!match) { + WScript.Echo('Unexpected URI ' + url); + WScript.Quit(); +} +for (var i in match) { + match[i] = decodeURIComponent(match[i]).replace(/\+/g, ' '); +} + +var action = match[1]; +var file = match[2]; +var line = match[3]; +var search = match[4]; +var replace = match[5]; + +var shell = new ActiveXObject('WScript.Shell'); +var fileSystem = new ActiveXObject('Scripting.FileSystemObject'); + +for (var id in settings.mappings) { + if (file.indexOf(id) === 0) { + file = settings.mappings[id] + file.substr(id.length); + break; + } +} + +if (action === 'create' && !fileSystem.FileExists(file)) { + shell.Run('cmd /c mkdir "' + fileSystem.GetParentFolderName(file) + '"', 0, 1); + fileSystem.CreateTextFile(file); + +} else if (action === 'fix') { + var lines = fileSystem.OpenTextFile(file).ReadAll().split('\n'); + lines[line-1] = lines[line-1].replace(search, replace); + fileSystem.OpenTextFile(file, 2).Write(lines.join('\n')); +} + +var command = settings.editor.replace(/%line%/, line).replace(/%file%/, file); +shell.Exec(command); + +if (settings.title) { + shell.AppActivate(settings.title); +} diff --git a/www/.htaccess b/www/.htaccess new file mode 100644 index 0000000..0996638 --- /dev/null +++ b/www/.htaccess @@ -0,0 +1,32 @@ +# Apache configuration file (see https://httpd.apache.org/docs/current/mod/quickreference.html) +Require all granted + +# disable directory listing + + Options -Indexes + + +# enable cool URL + + RewriteEngine On + # RewriteBase / + + # use HTTPS + # RewriteCond %{HTTPS} !on + # RewriteRule .? https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] + + # prevents files starting with dot to be viewed by browser + RewriteRule /\.|^\.(?!well-known/) - [F] + + # front controller + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule !\.(pdf|js|ico|gif|jpg|jpeg|png|webp|svg|css|rar|zip|7z|tar\.gz|map|eot|ttf|otf|woff|woff2)$ index.php [L] + + +# enable gzip compression + + + AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/json application/xml image/svg+xml + + diff --git a/www/favicon.ico b/www/favicon.ico new file mode 100644 index 0000000..b20cfd0 Binary files /dev/null and b/www/favicon.ico differ diff --git a/www/index.php b/www/index.php new file mode 100644 index 0000000..0fa97b7 --- /dev/null +++ b/www/index.php @@ -0,0 +1,6 @@ +getByType(Nette\Application\Application::class) + ->run(); diff --git a/www/robots.txt b/www/robots.txt new file mode 100644 index 0000000..e69de29