summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2020-05-01 17:33:13 +0200
committerLaria Carolin Chabowski <laria@laria.me>2020-05-01 17:33:13 +0200
commit7449faaa76a5b4008fd51a6562cca2e0a852ea6b (patch)
tree9e6bc34afe9e4e7d49b1a26f0b67485869b0a9de
parentb0c9a4aeb61aff8a8fa60746cd566e6dbe05a3b5 (diff)
downloadste-7449faaa76a5b4008fd51a6562cca2e0a852ea6b.tar.gz
ste-7449faaa76a5b4008fd51a6562cca2e0a852ea6b.tar.bz2
ste-7449faaa76a5b4008fd51a6562cca2e0a852ea6b.zip
Clean up code and improve documentation
This switches the code documentation genarator (we're now using phpdoc instead of NaturalDoc). Also various small code cleanup tasks: - Remove unused code - Get rid of `and` / `or`, we're using `&&` / `||` now - Adding missing return values - Helping PhpStorm to detect some dynamically called functions (mark_builtin_callable in Transcompiler) - Reword transcompiling => compiling in documentation
-rw-r--r--.gitignore1
-rw-r--r--README.markdown2
-rw-r--r--composer.json7
-rw-r--r--composer.lock3052
-rw-r--r--docu/README5
-rw-r--r--docu/index.html2
-rw-r--r--docu/language_definition.html80
-rw-r--r--example/index.php2
-rwxr-xr-xmkdocu.sh12
-rw-r--r--src/ste/ASTNode.php8
-rw-r--r--src/ste/Calc.php48
-rw-r--r--src/ste/CantLoadTemplate.php8
-rw-r--r--src/ste/CantSaveTemplate.php8
-rw-r--r--src/ste/FatalRuntimeError.php6
-rw-r--r--src/ste/FilesystemStorageAccess.php28
-rw-r--r--src/ste/Misc.php4
-rw-r--r--src/ste/ParseCompileError.php8
-rw-r--r--src/ste/Parser.php114
-rw-r--r--src/ste/RuntimeError.php8
-rw-r--r--src/ste/STECore.php177
-rw-r--r--src/ste/STEStandardLibrary.php74
-rw-r--r--src/ste/Scope.php39
-rw-r--r--src/ste/StorageAccess.php51
-rw-r--r--src/ste/TagNode.php11
-rw-r--r--src/ste/TextNode.php7
-rw-r--r--src/ste/Transcompiler.php181
-rw-r--r--src/ste/VariableNode.php13
-rw-r--r--tests/dump_ast.php1
28 files changed, 3699 insertions, 258 deletions
diff --git a/.gitignore b/.gitignore
index 234ce20..f7e841f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
vendor
.php_cs.cache
+docu/phpdoc/
diff --git a/README.markdown b/README.markdown
index ec1379f..a48eeec 100644
--- a/README.markdown
+++ b/README.markdown
@@ -26,7 +26,7 @@ Why should you use it?
* It has a simple, yet powerful plugin interface. You can easily define your
own template functions / tags. It is even possible to write them in the
template language itself, which makes it kind of a programming language...
-* It can transcompile templates into PHP.
+* It can compile templates into PHP.
* You can use anonymous functions to define custom tags.
Documentation
diff --git a/composer.json b/composer.json
index 54edefd..c530140 100644
--- a/composer.json
+++ b/composer.json
@@ -20,5 +20,8 @@
"description": "A compiling template engine with an XML-ish syntax",
"type": "library",
"keywords": ["templating"],
- "homepage": "http://github.com/silvasur/ste"
-} \ No newline at end of file
+ "homepage": "http://github.com/silvasur/ste",
+ "require-dev": {
+ "phpdocumentor/phpdocumentor": "^2.9"
+ }
+}
diff --git a/composer.lock b/composer.lock
new file mode 100644
index 0000000..b14f168
--- /dev/null
+++ b/composer.lock
@@ -0,0 +1,3052 @@
+{
+ "_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": "f45ad110a19695736796a2738838799d",
+ "packages": [],
+ "packages-dev": [
+ {
+ "name": "cilex/cilex",
+ "version": "1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Cilex/Cilex.git",
+ "reference": "7acd965a609a56d0345e8b6071c261fbdb926cb5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Cilex/Cilex/zipball/7acd965a609a56d0345e8b6071c261fbdb926cb5",
+ "reference": "7acd965a609a56d0345e8b6071c261fbdb926cb5",
+ "shasum": ""
+ },
+ "require": {
+ "cilex/console-service-provider": "1.*",
+ "php": ">=5.3.3",
+ "pimple/pimple": "~1.0",
+ "symfony/finder": "~2.1",
+ "symfony/process": "~2.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "3.7.*",
+ "symfony/validator": "~2.1"
+ },
+ "suggest": {
+ "monolog/monolog": ">=1.0.0",
+ "symfony/validator": ">=1.0.0",
+ "symfony/yaml": ">=1.0.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Cilex": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Mike van Riel",
+ "email": "mike.vanriel@naenius.com"
+ }
+ ],
+ "description": "The PHP micro-framework for Command line tools based on the Symfony2 Components",
+ "homepage": "http://cilex.github.com",
+ "keywords": [
+ "cli",
+ "microframework"
+ ],
+ "time": "2014-03-29T14:03:13+00:00"
+ },
+ {
+ "name": "cilex/console-service-provider",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Cilex/console-service-provider.git",
+ "reference": "25ee3d1875243d38e1a3448ff94bdf944f70d24e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Cilex/console-service-provider/zipball/25ee3d1875243d38e1a3448ff94bdf944f70d24e",
+ "reference": "25ee3d1875243d38e1a3448ff94bdf944f70d24e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "pimple/pimple": "1.*@dev",
+ "symfony/console": "~2.1"
+ },
+ "require-dev": {
+ "cilex/cilex": "1.*@dev",
+ "silex/silex": "1.*@dev"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Cilex\\Provider\\Console": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Beau Simensen",
+ "email": "beau@dflydev.com",
+ "homepage": "http://beausimensen.com"
+ },
+ {
+ "name": "Mike van Riel",
+ "email": "mike.vanriel@naenius.com"
+ }
+ ],
+ "description": "Console Service Provider",
+ "keywords": [
+ "cilex",
+ "console",
+ "pimple",
+ "service-provider",
+ "silex"
+ ],
+ "time": "2012-12-19T10:50:58+00:00"
+ },
+ {
+ "name": "composer/ca-bundle",
+ "version": "1.2.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/ca-bundle.git",
+ "reference": "95c63ab2117a72f48f5a55da9740a3273d45b7fd"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/ca-bundle/zipball/95c63ab2117a72f48f5a55da9740a3273d45b7fd",
+ "reference": "95c63ab2117a72f48f5a55da9740a3273d45b7fd",
+ "shasum": ""
+ },
+ "require": {
+ "ext-openssl": "*",
+ "ext-pcre": "*",
+ "php": "^5.3.2 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8",
+ "psr/log": "^1.0",
+ "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\CaBundle\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ }
+ ],
+ "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
+ "keywords": [
+ "cabundle",
+ "cacert",
+ "certificate",
+ "ssl",
+ "tls"
+ ],
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-04-08T08:27:21+00:00"
+ },
+ {
+ "name": "container-interop/container-interop",
+ "version": "1.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/container-interop/container-interop.git",
+ "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8",
+ "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8",
+ "shasum": ""
+ },
+ "require": {
+ "psr/container": "^1.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Interop\\Container\\": "src/Interop/Container/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Promoting the interoperability of container objects (DIC, SL, etc.)",
+ "homepage": "https://github.com/container-interop/container-interop",
+ "abandoned": "psr/container",
+ "time": "2017-02-14T19:40:03+00:00"
+ },
+ {
+ "name": "doctrine/annotations",
+ "version": "1.10.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/annotations.git",
+ "reference": "b9d758e831c70751155c698c2f7df4665314a1cb"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/annotations/zipball/b9d758e831c70751155c698c2f7df4665314a1cb",
+ "reference": "b9d758e831c70751155c698c2f7df4665314a1cb",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/lexer": "1.*",
+ "ext-tokenizer": "*",
+ "php": "^7.1"
+ },
+ "require-dev": {
+ "doctrine/cache": "1.*",
+ "phpunit/phpunit": "^7.5"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.9.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com"
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de"
+ },
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com"
+ },
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com"
+ }
+ ],
+ "description": "Docblock Annotations Parser",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "annotations",
+ "docblock",
+ "parser"
+ ],
+ "time": "2020-04-20T09:18:32+00:00"
+ },
+ {
+ "name": "doctrine/instantiator",
+ "version": "1.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/instantiator.git",
+ "reference": "ae466f726242e637cebdd526a7d991b9433bacf1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1",
+ "reference": "ae466f726242e637cebdd526a7d991b9433bacf1",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1"
+ },
+ "require-dev": {
+ "doctrine/coding-standard": "^6.0",
+ "ext-pdo": "*",
+ "ext-phar": "*",
+ "phpbench/phpbench": "^0.13",
+ "phpstan/phpstan-phpunit": "^0.11",
+ "phpstan/phpstan-shim": "^0.11",
+ "phpunit/phpunit": "^7.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.2.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Marco Pivetta",
+ "email": "ocramius@gmail.com",
+ "homepage": "http://ocramius.github.com/"
+ }
+ ],
+ "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
+ "homepage": "https://www.doctrine-project.org/projects/instantiator.html",
+ "keywords": [
+ "constructor",
+ "instantiate"
+ ],
+ "time": "2019-10-21T16:45:58+00:00"
+ },
+ {
+ "name": "doctrine/lexer",
+ "version": "1.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/lexer.git",
+ "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6",
+ "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2"
+ },
+ "require-dev": {
+ "doctrine/coding-standard": "^6.0",
+ "phpstan/phpstan": "^0.11.8",
+ "phpunit/phpunit": "^8.2"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.2.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com"
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com"
+ }
+ ],
+ "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.",
+ "homepage": "https://www.doctrine-project.org/projects/lexer.html",
+ "keywords": [
+ "annotations",
+ "docblock",
+ "lexer",
+ "parser",
+ "php"
+ ],
+ "time": "2019-10-30T14:39:59+00:00"
+ },
+ {
+ "name": "erusev/parsedown",
+ "version": "1.7.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/erusev/parsedown.git",
+ "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3",
+ "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3",
+ "shasum": ""
+ },
+ "require": {
+ "ext-mbstring": "*",
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.35"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "Parsedown": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Emanuil Rusev",
+ "email": "hello@erusev.com",
+ "homepage": "http://erusev.com"
+ }
+ ],
+ "description": "Parser for Markdown.",
+ "homepage": "http://parsedown.org",
+ "keywords": [
+ "markdown",
+ "parser"
+ ],
+ "time": "2019-12-30T22:54:17+00:00"
+ },
+ {
+ "name": "jms/metadata",
+ "version": "1.7.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/schmittjoh/metadata.git",
+ "reference": "e5854ab1aa643623dc64adde718a8eec32b957a8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/e5854ab1aa643623dc64adde718a8eec32b957a8",
+ "reference": "e5854ab1aa643623dc64adde718a8eec32b957a8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "doctrine/cache": "~1.0",
+ "symfony/cache": "~3.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.5.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Metadata\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Asmir Mustafic",
+ "email": "goetas@gmail.com"
+ },
+ {
+ "name": "Johannes M. Schmitt",
+ "email": "schmittjoh@gmail.com"
+ }
+ ],
+ "description": "Class/method/property metadata management in PHP",
+ "keywords": [
+ "annotations",
+ "metadata",
+ "xml",
+ "yaml"
+ ],
+ "time": "2018-10-26T12:40:10+00:00"
+ },
+ {
+ "name": "jms/parser-lib",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/schmittjoh/parser-lib.git",
+ "reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/schmittjoh/parser-lib/zipball/c509473bc1b4866415627af0e1c6cc8ac97fa51d",
+ "reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d",
+ "shasum": ""
+ },
+ "require": {
+ "phpoption/phpoption": ">=0.9,<2.0-dev"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "JMS\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache2"
+ ],
+ "description": "A library for easily creating recursive-descent parsers.",
+ "time": "2012-11-18T18:08:43+00:00"
+ },
+ {
+ "name": "jms/serializer",
+ "version": "1.7.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/schmittjoh/serializer.git",
+ "reference": "4fad8bbbe76e05de3b79ffa3db027058ed3813ff"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/4fad8bbbe76e05de3b79ffa3db027058ed3813ff",
+ "reference": "4fad8bbbe76e05de3b79ffa3db027058ed3813ff",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/annotations": "^1.0",
+ "doctrine/instantiator": "^1.0.3",
+ "jms/metadata": "~1.1",
+ "jms/parser-lib": "1.*",
+ "php": ">=5.5.0",
+ "phpcollection/phpcollection": "~0.1",
+ "phpoption/phpoption": "^1.1"
+ },
+ "conflict": {
+ "jms/serializer-bundle": "<1.2.1",
+ "twig/twig": "<1.12"
+ },
+ "require-dev": {
+ "doctrine/orm": "~2.1",
+ "doctrine/phpcr-odm": "^1.3|^2.0",
+ "ext-pdo_sqlite": "*",
+ "jackalope/jackalope-doctrine-dbal": "^1.1.5",
+ "phpunit/phpunit": "^4.8|^5.0",
+ "propel/propel1": "~1.7",
+ "symfony/expression-language": "^2.6|^3.0",
+ "symfony/filesystem": "^2.1",
+ "symfony/form": "~2.1|^3.0",
+ "symfony/translation": "^2.1|^3.0",
+ "symfony/validator": "^2.2|^3.0",
+ "symfony/yaml": "^2.1|^3.0",
+ "twig/twig": "~1.12|~2.0"
+ },
+ "suggest": {
+ "doctrine/cache": "Required if you like to use cache functionality.",
+ "doctrine/collections": "Required if you like to use doctrine collection types as ArrayCollection.",
+ "symfony/yaml": "Required if you'd like to serialize data to YAML format."
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.8-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "JMS\\Serializer": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "authors": [
+ {
+ "name": "Johannes M. Schmitt",
+ "email": "schmittjoh@gmail.com"
+ }
+ ],
+ "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.",
+ "homepage": "http://jmsyst.com/libs/serializer",
+ "keywords": [
+ "deserialization",
+ "jaxb",
+ "json",
+ "serialization",
+ "xml"
+ ],
+ "time": "2017-05-15T08:35:42+00:00"
+ },
+ {
+ "name": "monolog/monolog",
+ "version": "1.25.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Seldaek/monolog.git",
+ "reference": "fa82921994db851a8becaf3787a9e73c5976b6f1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fa82921994db851a8becaf3787a9e73c5976b6f1",
+ "reference": "fa82921994db851a8becaf3787a9e73c5976b6f1",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0",
+ "psr/log": "~1.0"
+ },
+ "provide": {
+ "psr/log-implementation": "1.0.0"
+ },
+ "require-dev": {
+ "aws/aws-sdk-php": "^2.4.9 || ^3.0",
+ "doctrine/couchdb": "~1.0@dev",
+ "graylog2/gelf-php": "~1.0",
+ "jakub-onderka/php-parallel-lint": "0.9",
+ "php-amqplib/php-amqplib": "~2.4",
+ "php-console/php-console": "^3.1.3",
+ "phpunit/phpunit": "~4.5",
+ "phpunit/phpunit-mock-objects": "2.3.0",
+ "ruflin/elastica": ">=0.90 <3.0",
+ "sentry/sentry": "^0.13",
+ "swiftmailer/swiftmailer": "^5.3|^6.0"
+ },
+ "suggest": {
+ "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
+ "doctrine/couchdb": "Allow sending log messages to a CouchDB server",
+ "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
+ "ext-mongo": "Allow sending log messages to a MongoDB server",
+ "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
+ "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver",
+ "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
+ "php-console/php-console": "Allow sending log messages to Google Chrome",
+ "rollbar/rollbar": "Allow sending log messages to Rollbar",
+ "ruflin/elastica": "Allow sending log messages to an Elastic Search server",
+ "sentry/sentry": "Allow sending log messages to a Sentry server"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Monolog\\": "src/Monolog"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ }
+ ],
+ "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
+ "homepage": "http://github.com/Seldaek/monolog",
+ "keywords": [
+ "log",
+ "logging",
+ "psr-3"
+ ],
+ "time": "2019-12-20T14:15:16+00:00"
+ },
+ {
+ "name": "nikic/php-parser",
+ "version": "v1.4.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nikic/PHP-Parser.git",
+ "reference": "f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51",
+ "reference": "f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51",
+ "shasum": ""
+ },
+ "require": {
+ "ext-tokenizer": "*",
+ "php": ">=5.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4-dev"
+ }
+ },
+ "autoload": {
+ "files": [
+ "lib/bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Nikita Popov"
+ }
+ ],
+ "description": "A PHP parser written in PHP",
+ "keywords": [
+ "parser",
+ "php"
+ ],
+ "time": "2015-09-19T14:15:08+00:00"
+ },
+ {
+ "name": "padraic/humbug_get_contents",
+ "version": "1.1.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/humbug/file_get_contents.git",
+ "reference": "dcb086060c9dd6b2f51d8f7a895500307110b7a7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/humbug/file_get_contents/zipball/dcb086060c9dd6b2f51d8f7a895500307110b7a7",
+ "reference": "dcb086060c9dd6b2f51d8f7a895500307110b7a7",
+ "shasum": ""
+ },
+ "require": {
+ "composer/ca-bundle": "^1.0",
+ "ext-openssl": "*",
+ "php": "^5.3 || ^7.0 || ^7.1 || ^7.2"
+ },
+ "require-dev": {
+ "bamarni/composer-bin-plugin": "^1.1",
+ "mikey179/vfsstream": "^1.6",
+ "phpunit/phpunit": "^4.8 || ^5.7 || ^6.5"
+ },
+ "type": "library",
+ "extra": {
+ "bamarni-bin": {
+ "bin-links": false
+ },
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Humbug\\": "src/"
+ },
+ "files": [
+ "src/function.php",
+ "src/functions.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Pádraic Brady",
+ "email": "padraic.brady@gmail.com",
+ "homepage": "http://blog.astrumfutura.com"
+ },
+ {
+ "name": "Théo Fidry",
+ "email": "theo.fidry@gmail.com"
+ }
+ ],
+ "description": "Secure wrapper for accessing HTTPS resources with file_get_contents for PHP 5.3+",
+ "homepage": "https://github.com/padraic/file_get_contents",
+ "keywords": [
+ "download",
+ "file_get_contents",
+ "http",
+ "https",
+ "ssl",
+ "tls"
+ ],
+ "time": "2018-02-12T18:47:17+00:00"
+ },
+ {
+ "name": "padraic/phar-updater",
+ "version": "v1.0.6",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/humbug/phar-updater.git",
+ "reference": "d01d3b8f26e541ac9b9eeba1e18d005d852f7ff1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/humbug/phar-updater/zipball/d01d3b8f26e541ac9b9eeba1e18d005d852f7ff1",
+ "reference": "d01d3b8f26e541ac9b9eeba1e18d005d852f7ff1",
+ "shasum": ""
+ },
+ "require": {
+ "padraic/humbug_get_contents": "^1.0",
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Humbug\\SelfUpdate\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Pádraic Brady",
+ "email": "padraic.brady@gmail.com",
+ "homepage": "http://blog.astrumfutura.com"
+ }
+ ],
+ "description": "A thing to make PHAR self-updating easy and secure.",
+ "keywords": [
+ "humbug",
+ "phar",
+ "self-update",
+ "update"
+ ],
+ "time": "2018-03-30T12:52:15+00:00"
+ },
+ {
+ "name": "phpcollection/phpcollection",
+ "version": "0.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/schmittjoh/php-collection.git",
+ "reference": "f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6",
+ "reference": "f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6",
+ "shasum": ""
+ },
+ "require": {
+ "phpoption/phpoption": "1.*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "0.4-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "PhpCollection": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache2"
+ ],
+ "authors": [
+ {
+ "name": "Johannes M. Schmitt",
+ "email": "schmittjoh@gmail.com"
+ }
+ ],
+ "description": "General-Purpose Collection Library for PHP",
+ "keywords": [
+ "collection",
+ "list",
+ "map",
+ "sequence",
+ "set"
+ ],
+ "time": "2015-05-17T12:39:23+00:00"
+ },
+ {
+ "name": "phpdocumentor/fileset",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpDocumentor/Fileset.git",
+ "reference": "bfa78d8fa9763dfce6d0e5d3730c1d8ab25d34b0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpDocumentor/Fileset/zipball/bfa78d8fa9763dfce6d0e5d3730c1d8ab25d34b0",
+ "reference": "bfa78d8fa9763dfce6d0e5d3730c1d8ab25d34b0",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "symfony/finder": "~2.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~3.7"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "phpDocumentor": [
+ "src/",
+ "tests/unit/"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Fileset component for collecting a set of files given directories and file paths",
+ "homepage": "http://www.phpdoc.org",
+ "keywords": [
+ "files",
+ "fileset",
+ "phpdoc"
+ ],
+ "time": "2013-08-06T21:07:42+00:00"
+ },
+ {
+ "name": "phpdocumentor/graphviz",
+ "version": "1.0.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpDocumentor/GraphViz.git",
+ "reference": "a906a90a9f230535f25ea31caf81b2323956283f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpDocumentor/GraphViz/zipball/a906a90a9f230535f25ea31caf81b2323956283f",
+ "reference": "a906a90a9f230535f25ea31caf81b2323956283f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "phpDocumentor": [
+ "src/",
+ "tests/unit"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Mike van Riel",
+ "email": "mike.vanriel@naenius.com"
+ }
+ ],
+ "time": "2016-02-02T13:00:08+00:00"
+ },
+ {
+ "name": "phpdocumentor/phpdocumentor",
+ "version": "v2.9.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpDocumentor/phpDocumentor.git",
+ "reference": "2e4f981a55ebe6f5db592d7da892d13d5b3c7816"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpDocumentor/phpDocumentor/zipball/2e4f981a55ebe6f5db592d7da892d13d5b3c7816",
+ "reference": "2e4f981a55ebe6f5db592d7da892d13d5b3c7816",
+ "shasum": ""
+ },
+ "require": {
+ "cilex/cilex": "~1.0",
+ "erusev/parsedown": "~1.0",
+ "jms/serializer": ">=0.12 < 1.8.0",
+ "monolog/monolog": "~1.6",
+ "padraic/phar-updater": "^1.0",
+ "php": ">=5.3.3",
+ "phpdocumentor/fileset": "~1.0",
+ "phpdocumentor/graphviz": "~1.0",
+ "phpdocumentor/reflection": "^3.0",
+ "phpdocumentor/reflection-docblock": "~2.0",
+ "symfony/config": "~2.3",
+ "symfony/console": "~2.3",
+ "symfony/event-dispatcher": "~2.1",
+ "symfony/process": "~2.0",
+ "symfony/stopwatch": "~2.3",
+ "symfony/validator": "~2.2",
+ "twig/twig": "~1.3",
+ "webmozart/assert": "^1.2",
+ "zendframework/zend-cache": "~2.1",
+ "zendframework/zend-config": "~2.1",
+ "zendframework/zend-filter": "~2.1",
+ "zendframework/zend-i18n": "~2.1",
+ "zendframework/zend-serializer": "~2.1",
+ "zendframework/zend-servicemanager": "~2.1",
+ "zendframework/zend-stdlib": "~2.1",
+ "zetacomponents/document": ">=1.3.1"
+ },
+ "require-dev": {
+ "behat/behat": "^3.0",
+ "mikey179/vfsstream": "~1.2",
+ "mockery/mockery": "^0.9@dev",
+ "phpunit/phpunit": "^4.0",
+ "squizlabs/php_codesniffer": "^1.4",
+ "symfony/expression-language": "^2.4"
+ },
+ "suggest": {
+ "ext-twig": "Enabling the twig extension improves the generation of twig based templates.",
+ "ext-xslcache": "Enabling the XSLCache extension improves the generation of xml based templates."
+ },
+ "bin": [
+ "bin/phpdoc.php",
+ "bin/phpdoc"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-develop": "2.9-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "phpDocumentor": [
+ "src/",
+ "tests/unit/"
+ ],
+ "Cilex\\Provider": [
+ "src/"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Documentation Generator for PHP",
+ "homepage": "http://www.phpdoc.org",
+ "keywords": [
+ "api",
+ "application",
+ "dga",
+ "documentation",
+ "phpdoc"
+ ],
+ "time": "2020-01-12T19:44:16+00:00"
+ },
+ {
+ "name": "phpdocumentor/reflection",
+ "version": "3.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpDocumentor/Reflection.git",
+ "reference": "793bfd92d9a0fc96ae9608fb3e947c3f59fb3a0d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpDocumentor/Reflection/zipball/793bfd92d9a0fc96ae9608fb3e947c3f59fb3a0d",
+ "reference": "793bfd92d9a0fc96ae9608fb3e947c3f59fb3a0d",
+ "shasum": ""
+ },
+ "require": {
+ "nikic/php-parser": "^1.0",
+ "php": ">=5.3.3",
+ "phpdocumentor/reflection-docblock": "~2.0",
+ "psr/log": "~1.0"
+ },
+ "require-dev": {
+ "behat/behat": "~2.4",
+ "mockery/mockery": "~0.8",
+ "phpunit/phpunit": "~4.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "phpDocumentor": [
+ "src/",
+ "tests/unit/",
+ "tests/mocks/"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Reflection library to do Static Analysis for PHP Projects",
+ "homepage": "http://www.phpdoc.org",
+ "keywords": [
+ "phpDocumentor",
+ "phpdoc",
+ "reflection",
+ "static analysis"
+ ],
+ "time": "2016-05-21T08:42:32+00:00"
+ },
+ {
+ "name": "phpdocumentor/reflection-docblock",
+ "version": "2.0.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
+ "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e6a969a640b00d8daa3c66518b0405fb41ae0c4b",
+ "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0"
+ },
+ "suggest": {
+ "dflydev/markdown": "~1.0",
+ "erusev/parsedown": "~1.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "phpDocumentor": [
+ "src/"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Mike van Riel",
+ "email": "mike.vanriel@naenius.com"
+ }
+ ],
+ "time": "2016-01-25T08:17:30+00:00"
+ },
+ {
+ "name": "phpoption/phpoption",
+ "version": "1.7.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/schmittjoh/php-option.git",
+ "reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/4acfd6a4b33a509d8c88f50e5222f734b6aeebae",
+ "reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.5.9 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "bamarni/composer-bin-plugin": "^1.3",
+ "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.7-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PhpOption\\": "src/PhpOption/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "authors": [
+ {
+ "name": "Johannes M. Schmitt",
+ "email": "schmittjoh@gmail.com"
+ },
+ {
+ "name": "Graham Campbell",
+ "email": "graham@alt-three.com"
+ }
+ ],
+ "description": "Option Type for PHP",
+ "keywords": [
+ "language",
+ "option",
+ "php",
+ "type"
+ ],
+ "time": "2020-03-21T18:07:53+00:00"
+ },
+ {
+ "name": "pimple/pimple",
+ "version": "v1.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/silexphp/Pimple.git",
+ "reference": "2019c145fe393923f3441b23f29bbdfaa5c58c4d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/silexphp/Pimple/zipball/2019c145fe393923f3441b23f29bbdfaa5c58c4d",
+ "reference": "2019c145fe393923f3441b23f29bbdfaa5c58c4d",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Pimple": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ }
+ ],
+ "description": "Pimple is a simple Dependency Injection Container for PHP 5.3",
+ "homepage": "http://pimple.sensiolabs.org",
+ "keywords": [
+ "container",
+ "dependency injection"
+ ],
+ "time": "2013-11-22T08:30:29+00:00"
+ },
+ {
+ "name": "psr/cache",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/cache.git",
+ "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8",
+ "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Cache\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for caching libraries",
+ "keywords": [
+ "cache",
+ "psr",
+ "psr-6"
+ ],
+ "time": "2016-08-06T20:24:11+00:00"
+ },
+ {
+ "name": "psr/container",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/container.git",
+ "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
+ "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Container\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common Container Interface (PHP FIG PSR-11)",
+ "homepage": "https://github.com/php-fig/container",
+ "keywords": [
+ "PSR-11",
+ "container",
+ "container-interface",
+ "container-interop",
+ "psr"
+ ],
+ "time": "2017-02-14T16:28:37+00:00"
+ },
+ {
+ "name": "psr/log",
+ "version": "1.1.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/log.git",
+ "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
+ "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Log\\": "Psr/Log/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for logging libraries",
+ "homepage": "https://github.com/php-fig/log",
+ "keywords": [
+ "log",
+ "psr",
+ "psr-3"
+ ],
+ "time": "2020-03-23T09:12:05+00:00"
+ },
+ {
+ "name": "psr/simple-cache",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/simple-cache.git",
+ "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
+ "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\SimpleCache\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interfaces for simple caching",
+ "keywords": [
+ "cache",
+ "caching",
+ "psr",
+ "psr-16",
+ "simple-cache"
+ ],
+ "time": "2017-10-23T01:57:42+00:00"
+ },
+ {
+ "name": "symfony/config",
+ "version": "v2.8.52",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/config.git",
+ "reference": "7dd5f5040dc04c118d057fb5886563963eb70011"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/config/zipball/7dd5f5040dc04c118d057fb5886563963eb70011",
+ "reference": "7dd5f5040dc04c118d057fb5886563963eb70011",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.9",
+ "symfony/filesystem": "~2.3|~3.0.0",
+ "symfony/polyfill-ctype": "~1.8"
+ },
+ "require-dev": {
+ "symfony/yaml": "~2.7|~3.0.0"
+ },
+ "suggest": {
+ "symfony/yaml": "To use the yaml reference dumper"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.8-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Config\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Config Component",
+ "homepage": "https://symfony.com",
+ "time": "2018-11-26T09:38:12+00:00"
+ },
+ {
+ "name": "symfony/console",
+ "version": "v2.8.52",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/console.git",
+ "reference": "cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/console/zipball/cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12",
+ "reference": "cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.9",
+ "symfony/debug": "^2.7.2|~3.0.0",
+ "symfony/polyfill-mbstring": "~1.0"
+ },
+ "require-dev": {
+ "psr/log": "~1.0",
+ "symfony/event-dispatcher": "~2.1|~3.0.0",
+ "symfony/process": "~2.1|~3.0.0"
+ },
+ "suggest": {
+ "psr/log-implementation": "For using the console logger",
+ "symfony/event-dispatcher": "",
+ "symfony/process": ""
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.8-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Console\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Console Component",
+ "homepage": "https://symfony.com",
+ "time": "2018-11-20T15:55:20+00:00"
+ },
+ {
+ "name": "symfony/debug",
+ "version": "v3.0.9",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/debug.git",
+ "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/697c527acd9ea1b2d3efac34d9806bf255278b0a",
+ "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5.9",
+ "psr/log": "~1.0"
+ },
+ "conflict": {
+ "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
+ },
+ "require-dev": {
+ "symfony/class-loader": "~2.8|~3.0",
+ "symfony/http-kernel": "~2.8|~3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Debug\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Debug Component",
+ "homepage": "https://symfony.com",
+ "time": "2016-07-30T07:22:48+00:00"
+ },
+ {
+ "name": "symfony/event-dispatcher",
+ "version": "v2.8.52",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/event-dispatcher.git",
+ "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a77e974a5fecb4398833b0709210e3d5e334ffb0",
+ "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.9"
+ },
+ "require-dev": {
+ "psr/log": "~1.0",
+ "symfony/config": "^2.0.5|~3.0.0",
+ "symfony/dependency-injection": "~2.6|~3.0.0",
+ "symfony/expression-language": "~2.6|~3.0.0",
+ "symfony/stopwatch": "~2.3|~3.0.0"
+ },
+ "suggest": {
+ "symfony/dependency-injection": "",
+ "symfony/http-kernel": ""
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.8-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\EventDispatcher\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony EventDispatcher Component",
+ "homepage": "https://symfony.com",
+ "time": "2018-11-21T14:20:20+00:00"
+ },
+ {
+ "name": "symfony/filesystem",
+ "version": "v3.0.9",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/filesystem.git",
+ "reference": "b2da5009d9bacbd91d83486aa1f44c793a8c380d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/b2da5009d9bacbd91d83486aa1f44c793a8c380d",
+ "reference": "b2da5009d9bacbd91d83486aa1f44c793a8c380d",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5.9"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Filesystem\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Filesystem Component",
+ "homepage": "https://symfony.com",
+ "time": "2016-07-20T05:43:46+00:00"
+ },
+ {
+ "name": "symfony/finder",
+ "version": "v2.8.52",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/finder.git",
+ "reference": "1444eac52273e345d9b95129bf914639305a9ba4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/1444eac52273e345d9b95129bf914639305a9ba4",
+ "reference": "1444eac52273e345d9b95129bf914639305a9ba4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.9"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.8-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Finder\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Finder Component",
+ "homepage": "https://symfony.com",
+ "time": "2018-11-11T11:18:13+00:00"
+ },
+ {
+ "name": "symfony/polyfill-ctype",
+ "version": "v1.15.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-ctype.git",
+ "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14",
+ "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "suggest": {
+ "ext-ctype": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.15-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Ctype\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Gert de Pagter",
+ "email": "BackEndTea@gmail.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for ctype functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "ctype",
+ "polyfill",
+ "portable"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-02-27T09:26:54+00:00"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.15.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac",
+ "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.15-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Mbstring\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for the Mbstring extension",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-03-09T19:04:49+00:00"
+ },
+ {
+ "name": "symfony/process",
+ "version": "v2.8.52",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/process.git",
+ "reference": "c3591a09c78639822b0b290d44edb69bf9f05dc8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/process/zipball/c3591a09c78639822b0b290d44edb69bf9f05dc8",
+ "reference": "c3591a09c78639822b0b290d44edb69bf9f05dc8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.9"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.8-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Process\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Process Component",
+ "homepage": "https://symfony.com",
+ "time": "2018-11-11T11:18:13+00:00"
+ },
+ {
+ "name": "symfony/stopwatch",
+ "version": "v2.8.52",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/stopwatch.git",
+ "reference": "752586c80af8a85aeb74d1ae8202411c68836663"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/stopwatch/zipball/752586c80af8a85aeb74d1ae8202411c68836663",
+ "reference": "752586c80af8a85aeb74d1ae8202411c68836663",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.9"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.8-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Stopwatch\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Stopwatch Component",
+ "homepage": "https://symfony.com",
+ "time": "2018-11-11T11:18:13+00:00"
+ },
+ {
+ "name": "symfony/translation",
+ "version": "v3.0.9",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/translation.git",
+ "reference": "eee6c664853fd0576f21ae25725cfffeafe83f26"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/translation/zipball/eee6c664853fd0576f21ae25725cfffeafe83f26",
+ "reference": "eee6c664853fd0576f21ae25725cfffeafe83f26",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5.9",
+ "symfony/polyfill-mbstring": "~1.0"
+ },
+ "conflict": {
+ "symfony/config": "<2.8"
+ },
+ "require-dev": {
+ "psr/log": "~1.0",
+ "symfony/config": "~2.8|~3.0",
+ "symfony/intl": "~2.8|~3.0",
+ "symfony/yaml": "~2.8|~3.0"
+ },
+ "suggest": {
+ "psr/log": "To use logging capability in translator",
+ "symfony/config": "",
+ "symfony/yaml": ""
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Translation\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Translation Component",
+ "homepage": "https://symfony.com",
+ "time": "2016-07-30T07:22:48+00:00"
+ },
+ {
+ "name": "symfony/validator",
+ "version": "v2.8.52",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/validator.git",
+ "reference": "d5d2090bba3139d8ddb79959fbf516e87238fe3a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/validator/zipball/d5d2090bba3139d8ddb79959fbf516e87238fe3a",
+ "reference": "d5d2090bba3139d8ddb79959fbf516e87238fe3a",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.9",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/translation": "~2.4|~3.0.0"
+ },
+ "require-dev": {
+ "doctrine/annotations": "~1.0",
+ "doctrine/cache": "~1.0",
+ "egulias/email-validator": "^1.2.1",
+ "symfony/config": "~2.2|~3.0.0",
+ "symfony/expression-language": "~2.4|~3.0.0",
+ "symfony/http-foundation": "~2.3|~3.0.0",
+ "symfony/intl": "~2.7.25|^2.8.18|~3.2.5",
+ "symfony/property-access": "~2.3|~3.0.0",
+ "symfony/yaml": "^2.0.5|~3.0.0"
+ },
+ "suggest": {
+ "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.",
+ "doctrine/cache": "For using the default cached annotation reader and metadata cache.",
+ "egulias/email-validator": "Strict (RFC compliant) email validation",
+ "symfony/config": "",
+ "symfony/expression-language": "For using the 2.4 Expression validator",
+ "symfony/http-foundation": "",
+ "symfony/intl": "",
+ "symfony/property-access": "For using the 2.4 Validator API",
+ "symfony/yaml": ""
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.8-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Validator\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Validator Component",
+ "homepage": "https://symfony.com",
+ "time": "2018-11-14T14:06:48+00:00"
+ },
+ {
+ "name": "twig/twig",
+ "version": "v1.42.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/twigphp/Twig.git",
+ "reference": "87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e",
+ "reference": "87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5.0",
+ "symfony/polyfill-ctype": "^1.8"
+ },
+ "require-dev": {
+ "psr/container": "^1.0",
+ "symfony/phpunit-bridge": "^4.4|^5.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.42-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Twig_": "lib/"
+ },
+ "psr-4": {
+ "Twig\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
+ },
+ {
+ "name": "Twig Team",
+ "role": "Contributors"
+ },
+ {
+ "name": "Armin Ronacher",
+ "email": "armin.ronacher@active-4.com",
+ "role": "Project Founder"
+ }
+ ],
+ "description": "Twig, the flexible, fast, and secure template language for PHP",
+ "homepage": "https://twig.symfony.com",
+ "keywords": [
+ "templating"
+ ],
+ "time": "2020-02-11T05:59:23+00:00"
+ },
+ {
+ "name": "webmozart/assert",
+ "version": "1.8.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/webmozart/assert.git",
+ "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
+ "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.3 || ^7.0",
+ "symfony/polyfill-ctype": "^1.8"
+ },
+ "conflict": {
+ "vimeo/psalm": "<3.9.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.36 || ^7.5.13"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Webmozart\\Assert\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@gmail.com"
+ }
+ ],
+ "description": "Assertions to validate method input/output with nice error messages.",
+ "keywords": [
+ "assert",
+ "check",
+ "validate"
+ ],
+ "time": "2020-04-18T12:12:48+00:00"
+ },
+ {
+ "name": "zendframework/zend-cache",
+ "version": "2.8.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-cache.git",
+ "reference": "edde41f1ee5c28e01701a032f434d03751b65df4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-cache/zipball/edde41f1ee5c28e01701a032f434d03751b65df4",
+ "reference": "edde41f1ee5c28e01701a032f434d03751b65df4",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.6 || ^7.0",
+ "psr/cache": "^1.0",
+ "psr/simple-cache": "^1.0",
+ "zendframework/zend-eventmanager": "^2.6.3 || ^3.2",
+ "zendframework/zend-servicemanager": "^2.7.8 || ^3.3",
+ "zendframework/zend-stdlib": "^2.7.7 || ^3.1"
+ },
+ "provide": {
+ "psr/cache-implementation": "1.0",
+ "psr/simple-cache-implementation": "1.0"
+ },
+ "require-dev": {
+ "cache/integration-tests": "^0.16",
+ "phpbench/phpbench": "^0.13",
+ "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2",
+ "zendframework/zend-coding-standard": "~1.0.0",
+ "zendframework/zend-serializer": "^2.6",
+ "zendframework/zend-session": "^2.7.4"
+ },
+ "suggest": {
+ "ext-apc": "APC or compatible extension, to use the APC storage adapter",
+ "ext-apcu": "APCU >= 5.1.0, to use the APCu storage adapter",
+ "ext-dba": "DBA, to use the DBA storage adapter",
+ "ext-memcache": "Memcache >= 2.0.0 to use the Memcache storage adapter",
+ "ext-memcached": "Memcached >= 1.0.0 to use the Memcached storage adapter",
+ "ext-mongo": "Mongo, to use MongoDb storage adapter",
+ "ext-mongodb": "MongoDB, to use the ExtMongoDb storage adapter",
+ "ext-redis": "Redis, to use Redis storage adapter",
+ "ext-wincache": "WinCache, to use the WinCache storage adapter",
+ "ext-xcache": "XCache, to use the XCache storage adapter",
+ "mongodb/mongodb": "Required for use with the ext-mongodb adapter",
+ "mongofill/mongofill": "Alternative to ext-mongo - a pure PHP implementation designed as a drop in replacement",
+ "zendframework/zend-serializer": "Zend\\Serializer component",
+ "zendframework/zend-session": "Zend\\Session component"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.8.x-dev",
+ "dev-develop": "2.9.x-dev"
+ },
+ "zf": {
+ "component": "Zend\\Cache",
+ "config-provider": "Zend\\Cache\\ConfigProvider"
+ }
+ },
+ "autoload": {
+ "files": [
+ "autoload/patternPluginManagerPolyfill.php"
+ ],
+ "psr-4": {
+ "Zend\\Cache\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "Caching implementation with a variety of storage options, as well as codified caching strategies for callbacks, classes, and output",
+ "keywords": [
+ "ZendFramework",
+ "cache",
+ "psr-16",
+ "psr-6",
+ "zf"
+ ],
+ "abandoned": "laminas/laminas-cache",
+ "time": "2019-08-28T21:34:32+00:00"
+ },
+ {
+ "name": "zendframework/zend-config",
+ "version": "2.6.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-config.git",
+ "reference": "2920e877a9f6dca9fa8f6bd3b1ffc2e19bb1e30d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-config/zipball/2920e877a9f6dca9fa8f6bd3b1ffc2e19bb1e30d",
+ "reference": "2920e877a9f6dca9fa8f6bd3b1ffc2e19bb1e30d",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.5 || ^7.0",
+ "zendframework/zend-stdlib": "^2.7 || ^3.0"
+ },
+ "require-dev": {
+ "fabpot/php-cs-fixer": "1.7.*",
+ "phpunit/phpunit": "~4.0",
+ "zendframework/zend-filter": "^2.6",
+ "zendframework/zend-i18n": "^2.5",
+ "zendframework/zend-json": "^2.6.1",
+ "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3"
+ },
+ "suggest": {
+ "zendframework/zend-filter": "Zend\\Filter component",
+ "zendframework/zend-i18n": "Zend\\I18n component",
+ "zendframework/zend-json": "Zend\\Json to use the Json reader or writer classes",
+ "zendframework/zend-servicemanager": "Zend\\ServiceManager for use with the Config Factory to retrieve reader and writer instances"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.6-dev",
+ "dev-develop": "2.7-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Zend\\Config\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "provides a nested object property based user interface for accessing this configuration data within application code",
+ "homepage": "https://github.com/zendframework/zend-config",
+ "keywords": [
+ "config",
+ "zf2"
+ ],
+ "abandoned": "laminas/laminas-config",
+ "time": "2016-02-04T23:01:10+00:00"
+ },
+ {
+ "name": "zendframework/zend-eventmanager",
+ "version": "3.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-eventmanager.git",
+ "reference": "a5e2583a211f73604691586b8406ff7296a946dd"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/a5e2583a211f73604691586b8406ff7296a946dd",
+ "reference": "a5e2583a211f73604691586b8406ff7296a946dd",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.6 || ^7.0"
+ },
+ "require-dev": {
+ "athletic/athletic": "^0.1",
+ "container-interop/container-interop": "^1.1.0",
+ "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2",
+ "zendframework/zend-coding-standard": "~1.0.0",
+ "zendframework/zend-stdlib": "^2.7.3 || ^3.0"
+ },
+ "suggest": {
+ "container-interop/container-interop": "^1.1.0, to use the lazy listeners feature",
+ "zendframework/zend-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.2-dev",
+ "dev-develop": "3.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Zend\\EventManager\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "Trigger and listen to events within a PHP application",
+ "homepage": "https://github.com/zendframework/zend-eventmanager",
+ "keywords": [
+ "event",
+ "eventmanager",
+ "events",
+ "zf2"
+ ],
+ "abandoned": "laminas/laminas-eventmanager",
+ "time": "2018-04-25T15:33:34+00:00"
+ },
+ {
+ "name": "zendframework/zend-filter",
+ "version": "2.9.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-filter.git",
+ "reference": "d78f2cdde1c31975e18b2a0753381ed7b61118ef"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-filter/zipball/d78f2cdde1c31975e18b2a0753381ed7b61118ef",
+ "reference": "d78f2cdde1c31975e18b2a0753381ed7b61118ef",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.6 || ^7.0",
+ "zendframework/zend-stdlib": "^2.7.7 || ^3.1"
+ },
+ "conflict": {
+ "zendframework/zend-validator": "<2.10.1"
+ },
+ "require-dev": {
+ "pear/archive_tar": "^1.4.3",
+ "phpunit/phpunit": "^5.7.23 || ^6.4.3",
+ "psr/http-factory": "^1.0",
+ "zendframework/zend-coding-standard": "~1.0.0",
+ "zendframework/zend-crypt": "^3.2.1",
+ "zendframework/zend-servicemanager": "^2.7.8 || ^3.3",
+ "zendframework/zend-uri": "^2.6"
+ },
+ "suggest": {
+ "psr/http-factory-implementation": "psr/http-factory-implementation, for creating file upload instances when consuming PSR-7 in file upload filters",
+ "zendframework/zend-crypt": "Zend\\Crypt component, for encryption filters",
+ "zendframework/zend-i18n": "Zend\\I18n component for filters depending on i18n functionality",
+ "zendframework/zend-servicemanager": "Zend\\ServiceManager component, for using the filter chain functionality",
+ "zendframework/zend-uri": "Zend\\Uri component, for the UriNormalize filter"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.9.x-dev",
+ "dev-develop": "2.10.x-dev"
+ },
+ "zf": {
+ "component": "Zend\\Filter",
+ "config-provider": "Zend\\Filter\\ConfigProvider"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Zend\\Filter\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "Programmatically filter and normalize data and files",
+ "keywords": [
+ "ZendFramework",
+ "filter",
+ "zf"
+ ],
+ "abandoned": "laminas/laminas-filter",
+ "time": "2019-08-19T07:08:04+00:00"
+ },
+ {
+ "name": "zendframework/zend-hydrator",
+ "version": "1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-hydrator.git",
+ "reference": "22652e1661a5a10b3f564cf7824a2206cf5a4a65"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-hydrator/zipball/22652e1661a5a10b3f564cf7824a2206cf5a4a65",
+ "reference": "22652e1661a5a10b3f564cf7824a2206cf5a4a65",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.5 || ^7.0",
+ "zendframework/zend-stdlib": "^2.7 || ^3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0",
+ "squizlabs/php_codesniffer": "^2.0@dev",
+ "zendframework/zend-eventmanager": "^2.6.2 || ^3.0",
+ "zendframework/zend-filter": "^2.6",
+ "zendframework/zend-inputfilter": "^2.6",
+ "zendframework/zend-serializer": "^2.6.1",
+ "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3"
+ },
+ "suggest": {
+ "zendframework/zend-eventmanager": "^2.6.2 || ^3.0, to support aggregate hydrator usage",
+ "zendframework/zend-filter": "^2.6, to support naming strategy hydrator usage",
+ "zendframework/zend-serializer": "^2.6.1, to use the SerializableStrategy",
+ "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3, to support hydrator plugin manager usage"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-release-1.0": "1.0-dev",
+ "dev-release-1.1": "1.1-dev",
+ "dev-master": "2.0-dev",
+ "dev-develop": "2.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Zend\\Hydrator\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "homepage": "https://github.com/zendframework/zend-hydrator",
+ "keywords": [
+ "hydrator",
+ "zf2"
+ ],
+ "abandoned": "laminas/laminas-hydrator",
+ "time": "2016-02-18T22:38:26+00:00"
+ },
+ {
+ "name": "zendframework/zend-i18n",
+ "version": "2.9.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-i18n.git",
+ "reference": "e17a54b3aee333ab156958f570cde630acee8b07"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-i18n/zipball/e17a54b3aee333ab156958f570cde630acee8b07",
+ "reference": "e17a54b3aee333ab156958f570cde630acee8b07",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.6 || ^7.0",
+ "zendframework/zend-stdlib": "^2.7 || ^3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.16",
+ "zendframework/zend-cache": "^2.6.1",
+ "zendframework/zend-coding-standard": "~1.0.0",
+ "zendframework/zend-config": "^2.6",
+ "zendframework/zend-eventmanager": "^2.6.2 || ^3.0",
+ "zendframework/zend-filter": "^2.6.1",
+ "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3",
+ "zendframework/zend-validator": "^2.6",
+ "zendframework/zend-view": "^2.6.3"
+ },
+ "suggest": {
+ "ext-intl": "Required for most features of Zend\\I18n; included in default builds of PHP",
+ "zendframework/zend-cache": "Zend\\Cache component",
+ "zendframework/zend-config": "Zend\\Config component",
+ "zendframework/zend-eventmanager": "You should install this package to use the events in the translator",
+ "zendframework/zend-filter": "You should install this package to use the provided filters",
+ "zendframework/zend-i18n-resources": "Translation resources",
+ "zendframework/zend-servicemanager": "Zend\\ServiceManager component",
+ "zendframework/zend-validator": "You should install this package to use the provided validators",
+ "zendframework/zend-view": "You should install this package to use the provided view helpers"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.9.x-dev",
+ "dev-develop": "2.10.x-dev"
+ },
+ "zf": {
+ "component": "Zend\\I18n",
+ "config-provider": "Zend\\I18n\\ConfigProvider"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Zend\\I18n\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "Provide translations for your application, and filter and validate internationalized values",
+ "keywords": [
+ "ZendFramework",
+ "i18n",
+ "zf"
+ ],
+ "abandoned": "laminas/laminas-i18n",
+ "time": "2019-09-30T12:04:37+00:00"
+ },
+ {
+ "name": "zendframework/zend-json",
+ "version": "3.1.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-json.git",
+ "reference": "e9ddb1192d93fe7fff846ac895249c39db75132b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-json/zipball/e9ddb1192d93fe7fff846ac895249c39db75132b",
+ "reference": "e9ddb1192d93fe7fff846ac895249c39db75132b",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.6 || ^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^5.7.23 || ^6.4.3",
+ "zendframework/zend-coding-standard": "~1.0.0",
+ "zendframework/zend-stdlib": "^2.7.7 || ^3.1"
+ },
+ "suggest": {
+ "zendframework/zend-json-server": "For implementing JSON-RPC servers",
+ "zendframework/zend-xml2json": "For converting XML documents to JSON"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.1.x-dev",
+ "dev-develop": "3.2.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Zend\\Json\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP",
+ "keywords": [
+ "ZendFramework",
+ "json",
+ "zf"
+ ],
+ "abandoned": "laminas/laminas-json",
+ "time": "2019-10-09T13:56:13+00:00"
+ },
+ {
+ "name": "zendframework/zend-serializer",
+ "version": "2.9.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-serializer.git",
+ "reference": "6fb7ae016cfdf0cfcdfa2b989e6a65f351170e21"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-serializer/zipball/6fb7ae016cfdf0cfcdfa2b989e6a65f351170e21",
+ "reference": "6fb7ae016cfdf0cfcdfa2b989e6a65f351170e21",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.6 || ^7.0",
+ "zendframework/zend-json": "^2.5 || ^3.0",
+ "zendframework/zend-stdlib": "^2.7 || ^3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.16",
+ "zendframework/zend-coding-standard": "~1.0.0",
+ "zendframework/zend-math": "^2.6 || ^3.0",
+ "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3"
+ },
+ "suggest": {
+ "zendframework/zend-math": "(^2.6 || ^3.0) To support Python Pickle serialization",
+ "zendframework/zend-servicemanager": "(^2.7.5 || ^3.0.3) To support plugin manager support"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.9.x-dev",
+ "dev-develop": "2.10.x-dev"
+ },
+ "zf": {
+ "component": "Zend\\Serializer",
+ "config-provider": "Zend\\Serializer\\ConfigProvider"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Zend\\Serializer\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "Serialize and deserialize PHP structures to a variety of representations",
+ "keywords": [
+ "ZendFramework",
+ "serializer",
+ "zf"
+ ],
+ "abandoned": "laminas/laminas-serializer",
+ "time": "2019-10-19T08:06:30+00:00"
+ },
+ {
+ "name": "zendframework/zend-servicemanager",
+ "version": "2.7.11",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-servicemanager.git",
+ "reference": "99ec9ed5d0f15aed9876433c74c2709eb933d4c7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-servicemanager/zipball/99ec9ed5d0f15aed9876433c74c2709eb933d4c7",
+ "reference": "99ec9ed5d0f15aed9876433c74c2709eb933d4c7",
+ "shasum": ""
+ },
+ "require": {
+ "container-interop/container-interop": "~1.0",
+ "php": "^5.5 || ^7.0"
+ },
+ "require-dev": {
+ "athletic/athletic": "dev-master",
+ "fabpot/php-cs-fixer": "1.7.*",
+ "phpunit/phpunit": "~4.0",
+ "zendframework/zend-di": "~2.5",
+ "zendframework/zend-mvc": "~2.5"
+ },
+ "suggest": {
+ "ocramius/proxy-manager": "ProxyManager 0.5.* to handle lazy initialization of services",
+ "zendframework/zend-di": "Zend\\Di component"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.7-dev",
+ "dev-develop": "3.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Zend\\ServiceManager\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "homepage": "https://github.com/zendframework/zend-servicemanager",
+ "keywords": [
+ "servicemanager",
+ "zf2"
+ ],
+ "abandoned": "laminas/laminas-servicemanager",
+ "time": "2018-06-22T14:49:54+00:00"
+ },
+ {
+ "name": "zendframework/zend-stdlib",
+ "version": "2.7.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-stdlib.git",
+ "reference": "0e44eb46788f65e09e077eb7f44d2659143bcc1f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/0e44eb46788f65e09e077eb7f44d2659143bcc1f",
+ "reference": "0e44eb46788f65e09e077eb7f44d2659143bcc1f",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.5 || ^7.0",
+ "zendframework/zend-hydrator": "~1.1"
+ },
+ "require-dev": {
+ "athletic/athletic": "~0.1",
+ "fabpot/php-cs-fixer": "1.7.*",
+ "phpunit/phpunit": "~4.0",
+ "zendframework/zend-config": "~2.5",
+ "zendframework/zend-eventmanager": "~2.5",
+ "zendframework/zend-filter": "~2.5",
+ "zendframework/zend-inputfilter": "~2.5",
+ "zendframework/zend-serializer": "~2.5",
+ "zendframework/zend-servicemanager": "~2.5"
+ },
+ "suggest": {
+ "zendframework/zend-eventmanager": "To support aggregate hydrator usage",
+ "zendframework/zend-filter": "To support naming strategy hydrator usage",
+ "zendframework/zend-serializer": "Zend\\Serializer component",
+ "zendframework/zend-servicemanager": "To support hydrator plugin manager usage"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-release-2.7": "2.7-dev",
+ "dev-master": "3.0-dev",
+ "dev-develop": "3.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Zend\\Stdlib\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "homepage": "https://github.com/zendframework/zend-stdlib",
+ "keywords": [
+ "stdlib",
+ "zf2"
+ ],
+ "abandoned": "laminas/laminas-stdlib",
+ "time": "2016-04-12T21:17:31+00:00"
+ },
+ {
+ "name": "zetacomponents/base",
+ "version": "1.9.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zetacomponents/Base.git",
+ "reference": "489e20235989ddc97fdd793af31ac803972454f1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zetacomponents/Base/zipball/489e20235989ddc97fdd793af31ac803972454f1",
+ "reference": "489e20235989ddc97fdd793af31ac803972454f1",
+ "shasum": ""
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~5.7",
+ "zetacomponents/unit-test": "*"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "src"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "authors": [
+ {
+ "name": "Sergey Alexeev"
+ },
+ {
+ "name": "Sebastian Bergmann"
+ },
+ {
+ "name": "Jan Borsodi"
+ },
+ {
+ "name": "Raymond Bosman"
+ },
+ {
+ "name": "Frederik Holljen"
+ },
+ {
+ "name": "Kore Nordmann"
+ },
+ {
+ "name": "Derick Rethans"
+ },
+ {
+ "name": "Vadym Savchuk"
+ },
+ {
+ "name": "Tobias Schlitt"
+ },
+ {
+ "name": "Alexandru Stanoi"
+ }
+ ],
+ "description": "The Base package provides the basic infrastructure that all packages rely on. Therefore every component relies on this package.",
+ "homepage": "https://github.com/zetacomponents",
+ "time": "2017-11-28T11:30:00+00:00"
+ },
+ {
+ "name": "zetacomponents/document",
+ "version": "1.3.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zetacomponents/Document.git",
+ "reference": "688abfde573cf3fe0730f82538fbd7aa9fc95bc8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zetacomponents/Document/zipball/688abfde573cf3fe0730f82538fbd7aa9fc95bc8",
+ "reference": "688abfde573cf3fe0730f82538fbd7aa9fc95bc8",
+ "shasum": ""
+ },
+ "require": {
+ "zetacomponents/base": "*"
+ },
+ "require-dev": {
+ "zetacomponents/unit-test": "dev-master"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "src"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann"
+ },
+ {
+ "name": "Kore Nordmann"
+ },
+ {
+ "name": "Derick Rethans"
+ },
+ {
+ "name": "Tobias Schlitt"
+ },
+ {
+ "name": "Alexandru Stanoi"
+ }
+ ],
+ "description": "The Document components provides a general conversion framework for different semantic document markup languages like XHTML, Docbook, RST and similar.",
+ "homepage": "https://github.com/zetacomponents",
+ "time": "2013-12-19T11:40:00+00:00"
+ }
+ ],
+ "aliases": [],
+ "minimum-stability": "stable",
+ "stability-flags": [],
+ "prefer-stable": false,
+ "prefer-lowest": false,
+ "platform": {
+ "php": ">=5.3.0"
+ },
+ "platform-dev": [],
+ "plugin-api-version": "1.1.0"
+}
diff --git a/docu/README b/docu/README
index dc3ec47..7802509 100644
--- a/docu/README
+++ b/docu/README
@@ -1,4 +1,3 @@
-Run ../mkdoku.sh to generate the documentation of the PHP source.
-You will need NaturalDocs[1] for that.
+Run `composer install` to install phpdoc.
-[1]: http://www.naturaldocs.org/ \ No newline at end of file
+Run ../mkdoku.sh to generate the documentation of the PHP source using phpdoc.
diff --git a/docu/index.html b/docu/index.html
index 9780b44..fad93eb 100644
--- a/docu/index.html
+++ b/docu/index.html
@@ -30,7 +30,7 @@
<p>This documentation is splitted in two parts:</p>
<ol>
<li><a href="language_definition.html">The definition of the STE template language</a>, including the documentation of the <a href="language_definition.html#builtin">builtin tags</a> and the <a href="language_definition.html#stdlib">standard library</a></li>
- <li><a href="nd">The documentation of the PHP implementation</a></li>
+ <li><a href="phpdoc/index.html">The documentation of the PHP implementation</a></li>
</ol>
<p>It could also be helpful to take a look at the example program (the "example" directory).</p>
</body>
diff --git a/docu/language_definition.html b/docu/language_definition.html
index a296395..c99a4b9 100644
--- a/docu/language_definition.html
+++ b/docu/language_definition.html
@@ -24,12 +24,12 @@
background: #eee;
}
</style>
-
+
</head>
<body>
<h1>The <acronym>STE</acronym> Template Language</h1>
<p>This is the documentation of the Template Language of the <strong>S</strong>TE <strong>T</strong>emplate <strong>E</strong>ngine.</p>
-
+
<h2 id="toc">TOC</h2>
<ol>
<li>
@@ -84,10 +84,10 @@
</ol>
</li>
</ol>
-
+
<h2 id="basic_elems">Basic Elements</h2>
<p>The STE Template Language consists of four basic elements:</p>
-
+
<h3 id="basic_elems_text">Text</h3>
<p>Everything that is not a <a href="#basic_elems_variable">Variable</a>, a <a href="#basic_elems_tag">Tag</a> or a <a href="#basic_elems_pseudotag">Pseudotag</a> is Text.</p>
<p>Also everything that is wrapped in the <a href="#basic_elems_pseudotag_rawtext">ste:rawtext</a> <a href="#basic_elems_pseudotag">pseudotag</a> will be Text, whereby all <a href="#basic_elems_tag">Tags</a> and <a href="#basic_elems_variable">Variables</a> will not be parsed.</p>
@@ -98,14 +98,14 @@
<code><pre>Foo &lt;ste:bar&gt;$baz[herpdederp]&lt;/ste:baz&gt;</pre></code>
will result in one text-element and one tag-element containing one variable-element.
</p>
-
+
<h3 id="basic_elems_variable">Variable</h3>
<p>Variables start with a <code>$</code> or can be wrapped within <code>${</code> and <code>}</code>, so you can write this: <code>${foo}ish</code></p>
<p>Variable have names, these names can consist of letters (english alphabet; upper and lower case), numbers and underscores (<code>_</code>). As a regex: <code>[a-zA-Z0-9_]+</code></p>
<p>A variable can also be an array. To access an array, wrap the desired fieldname within <code>[</code> and <code>]</code>. A fieldname can be constructed of <a href="#basic_elems_text">Text</a> and other Variables. So you can dynamically access fields: <code>$foo[$bar]</code>. These fieldnames can also be nested or concatenated: <code>$foo[$bar[baz]][herp][$de[derp]]</code></p>
<p>If you want a literal <code>$</code> char, you can escape it: <code>\$</code></p>
<p>Variables in STE are typeless, everything is text. In a boolean context, empty text usually represents false, else true.</p>
-
+
<h3 id="basic_elems_tag">Tag</h3>
<p>A Tag can be compared to a function. A Tag can have parameters and children <a href="#basic_elems">elements</a>.</p>
<p>
@@ -124,14 +124,14 @@
When using variables in parameter values, they will be "replaced" by their value. Because many tags need the variable and not its content, they expect only the variable's name. If you then write <code>foo="$bar"</code>, the tag will not operate on the <code>bar</code> variable but on the Variable with the name stored in <code>$bar</code>! So read the instructions to the tag carefully!
</p>
<p>Example: <code>&lt;ste:foo bar="baz" herp="literal quote sign: \""&gt;de &lt;ste:derp hehe="hoho$wtf[xd]" /&gt;&lt;/ste:foo&gt;</code></p>
-
+
<h3 id="basic_elems_pseudotag">Pseudotag</h3>
<p>Pseudotags look like normal tags, but they perform special tasks. There are currently two pseudotags:</p>
<h4 id="basic_elems_pseudotag_comment">ste:comment</h4>
<p>With the ste:comment pseudotag you can comment your template/code. Everything between <code>&lt;ste:comment&gt;</code> and <code>&lt;/ste:comment&gt;</code> will be ignored, before the real tokenization of the code starts.</p>
<h4 id="basic_elems_pseudotag_rawtext">ste:rawtext</h4>
<p>The ste:rawtext pseudotag will output a <a href="#basic_elems_text">Text</a> element with its wrapped content. It will prevent parsing of the content. Useful if you are embedding another script language, which uses the <code>$</code> char or also has a XML-Like syntax. No <a href="#escaping">escape sequences</a> will be translated! Can not be used in <a href="#basic_elems_tag">Tag</a> parameter values!</p>
-
+
<h2 id="escaping">Escaping special chars</h2>
<p>To get a literal <code>$</code>, <code>"</code> or other special chars, STE gives you the following escape sequences:</p>
<table>
@@ -201,10 +201,10 @@
</tbody>
</table>
<p>Escape sequences are not translated in <a href="#basic_elems_pseudotag">Pseudotags</a></p>
-
+
<h2 id="builtin">Builtin Tags</h2>
<p><acronym>STE</acronym> has some builtin <a href="#basic_elems_tag">Tags</a>, that makes programming in STE possible.</p>
-
+
<h3 id="builtin_if">ste:if</h3>
<p>The ste:if Tag provides an if-clause to STE.</p>
<p>ste:if can have the subtags ste:then and ste:else. Everything between <code>&lt;ste:if&gt;</code> and <code>&lt;/ste:if&gt;</code>, that is <strong>not</strong> an ste:then or ste:else tag, will be used as the condition.</p>
@@ -223,7 +223,7 @@
<p><code>&lt;ste:if&gt;condition&lt;ste:then&gt;then&lt;/ste:then&gt;&lt;ste:else&gt;else&lt;/ste:else&gt;&lt;/ste:if&gt;</code></p>
<p><code>?</code>, <code>{</code>, <code>|</code> and <code>}</code> can be <a href="#escaping">escaped</a></p>
<p>In this variant, the else part <strong>is not optional</strong>!</p>
-
+
<h3 id="builtin_cmp">ste:cmp</h3>
<p>With the ste:cmp tag you can compare two values.</p>
<p>ste:cmp is selfclosing, the compared values are passed by parameters.</p>
@@ -285,7 +285,7 @@
<p>This is equivalent to:</p>
<p><code>&lt;ste:cmp text_a="a" op="operator" text_b="b" /&gt;</code></p>
<p><code>~</code>, <code>{</code>, <code>|</code> and <code>}</code> can be <a href="#escaping">escaped</a>.</p>
-
+
<h3 id="builtin_not">ste:not</h3>
<p>The ste:not Tag will logically invert its content. If it is an empty text (i.e. false), it will return a non-empty text (i.e. true) and vice versa.</p>
<p>
@@ -293,10 +293,10 @@
<code><pre>&lt;ste:if&gt;<br /> &lt;ste:not&gt;$foo&lt;/ste:not&gt;<br /> &lt;ste:then&gt;:-)&lt;/ste:then&gt;<br /> &lt;ste:else&gt;:-(&lt;/ste:else&gt;<br />&lt;/ste:if&gt;</pre></code>
If the variable <code>foo</code> is empty (i.e. false), <code>:-)</code> will be returned, <code>:-(</code> otherwise.
</p>
-
+
<h3 id="builtin_even">ste:even</h3>
<p>If the enclosed text is a number, and the number is even, this tag will return a non-empty text (i.e. true), an empty text (i.e. false) otherwise.</p>
-
+
<h3 id="builtin_for">ste:for</h3>
<p>ste:for provides a counter loop.</p>
<p>
@@ -338,7 +338,7 @@
<code><pre>&lt;ste:for start="10" stop="0" step="-1" counter="i"&gt;<br /> $i&lt;br /&gt;<br />&lt;/ste:for&gt;</pre></code>
Will count from 10 down to 0 and output the number followed by an HTML line break.
</p>
-
+
<h3 id="builtin_foreach">ste:foreach</h3>
<p>ste:foreach will loop through an array.</p>
<p>
@@ -388,7 +388,7 @@
<code><pre>&lt;ste:foreach array="foo" value="v"&gt;<br /> &lt;p&gt;$v&lt;/p&gt;<br /> &lt;ste:else&gt;<br /> Array \$foo is empty.<br /> &lt;/ste:else&gt;<br />&lt;/ste:foreach&gt;</pre></code>
This code will list all array elements or will display <code>Array $foo is empty</code> if the array <code>$foo</code> is empty.
</p>
-
+
<h3 id="builtin_infloop">ste:infloop</h3>
<p>Creates an infinitive loop. You can get out of the loop using the <a href="#builtin_break">ste:break</a> tag. Can be used to emulate other loop constructs like while loops.</p>
<p>
@@ -396,16 +396,16 @@
<code><pre>&lt;ste:infloop&gt;<br /> &lt;ste:if&gt;<br /> &lt;ste:foo /&gt;<br /> &lt;ste:then&gt;&lt;ste:break /&gt;&lt;/ste:then&gt;<br /> &lt;/ste:if&gt;<br /> ...<br />&lt;ste:infloop&gt;</pre></code>
This code will return <code>...</code> while <code>&lt;ste:foo /&gt;</code> returns an empty text (i.e. false).
</p>
-
+
<h3 id="builtin_break">ste:break</h3>
<p>When this self-closing tag is called, the current loop (<a href="builtin_for">ste:for</a>, <a href="builtin_foreach">ste:foreach</a>, <a href="builtin_infloop">ste:infloop</a>) will be aborted.</p>
-
+
<h3 id="builtin_continue">ste:continue</h3>
<p>When this self-closing tag is called, the current loop(<a href="builtin_for">ste:for</a>, <a href="builtin_foreach">ste:foreach</a>, <a href="builtin_infloop">ste:infloop</a>) will go to the next iteration, aborting the current iteration. </p>
-
+
<h3 id="builtin_load">ste:load</h3>
<p>This self-closing tag loads and executes another template. The <code>name</code> parameter (mandatory) defines the template to load.</p>
- <p>Because each template must be parseable and transcompilable by itself, this is not a inclusion of another template. So you can not do this:</p>
+ <p>Because each template must be parseable and compilable by itself, this is not a inclusion of another template. So you can not do this:</p>
<p>
slave.tpl:<br />
<code><pre>&lt;ste:foo&gt;<br /> bla</pre></code>
@@ -419,7 +419,7 @@
master.tpl<br />
<code><pre>&lt;ste:baz&gt;<br /> &lt;ste:load name="slave.tpl" /&gt;<br />&lt;/ste:baz&gt;</pre></code>
</p>
-
+
<h3 id="builtin_block">ste:block</h3>
<p>ste:block provides an easy way for writing master templates. Every block has a name. When a block is defined twice, the second one will overwrite the first one.</p>
<p>The name can be set with the <code>name</code> parameter.</p>
@@ -432,7 +432,7 @@
When executing slave.tpl, master.tpl will be loaded and its <code>content</code> block will be replaced with the new one (<code>Much cooler content :-)</code>) but leave the original <code>sidebar</code> block.
</p>
<p>Blocks can not be nested.</p>
-
+
<h3 id="builtin_set">ste:set</h3>
<p>ste:set will set a variable. The parameter <code>var</code> takes the name of the variable to set. The content of the <a href="#basic_elems_tag">Tag</a> will be the new content of the variable.</p>
<p>
@@ -444,10 +444,10 @@
<a href="#basic_elems_tag">Tag</a> parameter values can not contain Tags. ste:set can be used to bypass this:<br />
<code><pre>&lt;ste:set var="temp"&gt;&lt;ste:foo /&gt;&lt;/ste:set&gt;<br />&lt;ste:bar baz="$temp" /&gt;</pre></code>
</p>
-
+
<h3 id="builtin_setlocal">ste:set</h3>
<p>ste:setlocal is used like <a href="#builtin_set">ste:set</a>, but only a local variable will be set (ste:set would overwrite a variable, if it was declared in a parent scope).
-
+
<h3 id="builtin_get">ste:get</h3>
<p>ste:get will return the content of a variable. The parameter <code>var</code> takes the name of the variable to get. Useful, if you want to get a variable which name is stored in a variable.</p>
<p>
@@ -455,30 +455,30 @@
<code><pre>&lt;ste:get var="$foo" /&gt;</pre></code>
This will get the variable with the name that is stored in the variable <code>foo</code>.
</p>
-
+
<h3 id="builtin_calc">ste:calc</h3>
<p>To perform mathematical calculations, you can use ste:calc. ste:calc calculates the mathematical formula it is wrapped around and returns the result. The formula is in the usual <a href="http://en.wikipedia.org/wiki/Infix_notation">infix-notation [ext. Link]</a> and has these operators: <code>+</code>, <code>-</code>, <code>*</code>, <code>/</code> and <code>^</code>. Numbers are always decimal, the decimal mark is <code>.</code> and numbers can be prefixed with an <code>-</code> to indicate a negative number. It is a good idea to wrap a negative number in brackets to prevent wrong evaluation (because <code>-</code> is also an operator). Calculations can be grouped with brackets: <code>(</code> and <code>)</code>.</p>
<p>Real numbers are supported, complex numbers not.</p>
- <p>Formulas are evaluated at runtime, not during transcompilation.</p>
+ <p>Formulas are evaluated at runtime, not during compilation.</p>
<p>
Example:<br />
<code>&lt;ste:calc&gt;(2+3+4) * (1.5 - (-0.5))&lt;/ste:calc&gt;</code> will return <code>18</code>.
</p>
- <p>This Tag is pretty slow, because the formula is not transcompiled and only evaluated at runtime. For some simple increment and decrement operations it is better to use the <a href="#stdlib_inc">ste:inc</a> and <a href="#stdlib_dec">ste:dec</a> Tags from the <a href="#stdlib">standard library</a>.</p>
-
+ <p>This Tag is pretty slow, because the formula is not compiled and only evaluated at runtime. For some simple increment and decrement operations it is better to use the <a href="#stdlib_inc">ste:inc</a> and <a href="#stdlib_dec">ste:dec</a> Tags from the <a href="#stdlib">standard library</a>.</p>
+
<h3 id="builtin_mktag">ste:mktag</h3>
<p>ste:mktag allows you to define own <a href="#basic_elems_tag">Tags</a> using the STE Template Language.</p>
<p>The parameter <code>name</code> (mandatory) expects the name of the new tag. If your tag requires some parameters, you can specify them using the optional <code>mandatory</code> parameter. Names of the mandatory parameters are separated by <code>|</code>.</p>
<p>The <a href="#basic_elems_variable">Variable</a> <code>_tag_parameters</code> (associative array) will hold all given parameters and their values.</p>
<p>With the ste:tagcontent tag you can execute the tags content.</p>
- <p>ste:mktag will be transcompiled like any other code. So your custom tag will be almost as fast as a plugin coded in PHP.</p>
+ <p>ste:mktag will be compiled like any other code. So your custom tag will be almost as fast as a plugin coded in PHP.</p>
<p>
Example:
<code><pre>&lt;ste:mktag name="countdown" mandatory="from|counter"&gt;<br /> &lt;ste:for start="$_tag_parameters[from]" stop="0" step="-1" counter="$_tag_parameters[counter]"&gt;<br /> &lt;ste:tagcontent /&gt;<br /> &lt;/ste:for&gt;<br />&lt;/ste:mktag&gt;<br />&lt;ste:mktag name="double"&gt;<br /> &lt;ste:calc&gt;&lt;ste:tagcontent /&gt; * 2&lt;/ste:calc&gt;<br />&lt;/ste:mktag&gt;<br />&lt;ste:countdown from="5" counter="i"&gt;<br /> &lt;ste:double&gt;$i&lt;/ste:double&gt;&lt;br /&gt;<br />&lt;/ste:countdown&gt;</pre></code>
Will output:<br />
<code><pre>10&lt;br/&gt;<br />8&lt;br /&gt;<br />6&lt;br /&gt;<br />4&lt;br /&gt;<br />2&lt;br /&gt;<br />0&lt;br /&gt;</pre></code>
</p>
-
+
<h2 id="stdlib">Standard Library</h2>
<p>The Standard Library contains some useful tags, which are not <a href="#builtin">builtin</a> but still always available.</p>
<h3 id="stdlib_escape">ste:escape</h3>
@@ -492,19 +492,19 @@
<p>
If the optional parameter <code>lines</code> is true (i.e. not empty), then additionally line breaks are converted to <code>&lt;br /&gt;</code>.
</p>
-
+
<h3 id="stdlib_strlen">ste:strlen</h3>
<p>Returns the length of then content.</p>
-
+
<h3 id="stdlib_arraylen">ste:arraylen</h3>
<p>Returns the number of elements in the array (variable name given by parameter <code>array</code>).</p>
-
+
<h3 id="stdlib_inc">ste:inc</h3>
<p>Increments (i.e. add 1) a variable (variable name given by parameter <code>var</code>).</p>
-
+
<h3 id="stdlib_dec">ste:dec</h3>
<p>Decrements (i.e. subtract 1) a variable (variable name given by parameter <code>var</code>).</p>
-
+
<h3 id="stdlib_date">ste:date</h3>
<p>Formats a time using PHPs <a href="http://php.net/manual/en/function.strftime.php">strftime format [ext. Link]</a>. The format is given in the tag's content. You can specify a time (unix timestamp) using the <code>timestamp</code> parameter (defaults to the current time).</p>
<p>
@@ -513,21 +513,21 @@
Result:<br />
<code><pre>18. Sep. 2011, 16:49:20</pre></code>
</p>
-
+
<h3 id="stdlib_in_array">ste:in_array</h3>
<p>Check, if a value is in an array. The tag takes the variable name of the array by parameter <code>array</code>.The value to test with will be taken from the tags content.</p>
<p>Returns empty text, if the value is not in the array, otherwise a non-empty text.</p>
-
+
<h3 id="stdlib_join">ste:join</h3>
<p>Join parts of an array together. The array's variable name goes to the <code>array</code> parameter. The tag's content will be used as the glue, i.e. this will be between two elements.</p>
<p>Returns the joined array</p>
-
+
<h3 id="stdlib_split">ste:split</h3>
<p>Split a text and write the parts to an array. The <code>array</code> parameter takes the variable name of the resulting array, the <code>delim</code> parameter the text to split by. The tag's content will be the text to split.</p>
-
+
<h3 id="stdlib_array_add">ste:array_add</h3>
<p>Adding an element to an array. The <code>array</code> parameter takes the variable name of the array. The <code>key</code> parameter takes the array key to map the value to, if omitted, the value will be appended to the end of the array. The value is the tag's content.</p>
-
+
<h3 id="stdlib_array_filter">ste:array_filter</h3>
<p>Filter out array elements by multiple criterias.</p>
<p>All the parameters are names of array variables.</p>
diff --git a/example/index.php b/example/index.php
index 4a96410..caf57eb 100644
--- a/example/index.php
+++ b/example/index.php
@@ -9,7 +9,7 @@ use \kch42\ste;
$ste = new ste\STECore(
new ste\FilesystemStorageAccess( # The STECore needs a StorageAccess implementation, we are using the FilesystemStorageAccess, which comes with STE.
dirname(__FILE__) . "/templates/src", # FilesystemStorageAccess needs a directory, where the Templates are...
- dirname(__FILE__) . "/templates/transc" # ...and a directory for the transcompiled templates (write permissions needed).
+ dirname(__FILE__) . "/templates/transc" # ...and a directory for the compiled templates (write permissions needed).
)
);
diff --git a/mkdocu.sh b/mkdocu.sh
index 7f64e18..48b25b0 100755
--- a/mkdocu.sh
+++ b/mkdocu.sh
@@ -1,12 +1,4 @@
#!/bin/sh
-if ! ndpath=`which NaturalDocs 2>/dev/null`; then
-if ! ndpath=`which naturaldocs 2>/dev/null`; then
-echo "NaturalDocs could not be found!" >/dev/stderr
-exit 1
-fi; fi
-
-
-test -d docu/nd || mkdir docu/nd
-test -d docu/nd_project_dir || mkdir docu/nd_project_dir
-$ndpath -i src/ste -o html docu/nd -p docu/nd_project_dir
+[ -d docu/phpdoc ] || mkdir docu/phpdoc
+./vendor/bin/phpdoc -d src -t docu/phpdoc
diff --git a/src/ste/ASTNode.php b/src/ste/ASTNode.php
index 2163161..3e74635 100644
--- a/src/ste/ASTNode.php
+++ b/src/ste/ASTNode.php
@@ -4,8 +4,16 @@ namespace kch42\ste;
abstract class ASTNode
{
+ /** @var string */
public $tpl;
+
+ /** @var int */
public $offset;
+
+ /**
+ * @param string $tpl
+ * @param int $off
+ */
public function __construct($tpl, $off)
{
$this->tpl = $tpl;
diff --git a/src/ste/Calc.php b/src/ste/Calc.php
index 64d2b7a..2f2d09d 100644
--- a/src/ste/Calc.php
+++ b/src/ste/Calc.php
@@ -2,15 +2,25 @@
namespace kch42\ste;
-/* Class Calc contains static methods needed by <ste:calc /> */
+/**
+ * Class Calc contains static methods needed by <ste:calc />
+ */
class Calc
{
private function __construct()
{
}
- /* We could also just eval() the $infix_math code, but this is much cooler :-D (Parser inception) */
- public static function shunting_yard($infix_math)
+ /**
+ * Parse a mathematical expression with the shunting yard algorithm (https://en.wikipedia.org/wiki/Shunting-yard_algorithm)
+ *
+ * We could also just eval() the $infix_math code, but this is much cooler :-D (Parser inception)
+
+ * @param string $infix_math
+ * @return array
+ * @throws RuntimeError
+ */
+ private static function shunting_yard($infix_math)
{
$operators = array(
"+" => array("l", 2),
@@ -68,11 +78,17 @@ class Calc
} else {
$priority = $operators[$token][1];
if ($operators[$token][0] == "l") {
- while ((!empty($op_stack)) and ($priority <= $operators[$op_stack[count($op_stack)-1]][1])) {
+ while (
+ !empty($op_stack)
+ && $priority <= $operators[$op_stack[count($op_stack)-1]][1]
+ ) {
$output_queue[] = array_pop($op_stack);
}
} else {
- while ((!empty($op_stack)) and ($priority < $operators[$op_stack[count($op_stack)-1]][1])) {
+ while (
+ !empty($op_stack)
+ && $priority < $operators[$op_stack[count($op_stack)-1]][1]
+ ) {
$output_queue[] = array_pop($op_stack);
}
}
@@ -91,7 +107,12 @@ class Calc
return $output_queue;
}
- public static function pop2(&$array)
+ /**
+ * @param array $array
+ * @return array
+ * @throws RuntimeError
+ */
+ private static function pop2(&$array)
{
$rv = array(array_pop($array), array_pop($array));
if (array_search(null, $rv, true) !== false) {
@@ -100,7 +121,12 @@ class Calc
return $rv;
}
- public static function calc_rpn($rpn)
+ /**
+ * @param array $rpn A mathematical expression in reverse polish notation
+ * @return int|float
+ * @throws RuntimeError
+ */
+ private static function calc_rpn($rpn)
{
$stack = array();
foreach ($rpn as $token) {
@@ -140,6 +166,14 @@ class Calc
return array_pop($stack);
}
+ /**
+ * Calculate a simple mathematical expression. Supported operators are +, -, *, /, ^.
+ * You can use ( and ) to group expressions together.
+ *
+ * @param string $expr
+ * @return float|int
+ * @throws RuntimeError
+ */
public static function calc($expr)
{
return self::calc_rpn(self::shunting_yard($expr));
diff --git a/src/ste/CantLoadTemplate.php b/src/ste/CantLoadTemplate.php
index 20200d6..92604cc 100644
--- a/src/ste/CantLoadTemplate.php
+++ b/src/ste/CantLoadTemplate.php
@@ -1,13 +1,9 @@
<?php
-// File: CantLoadTemplate.php
-
-// Namespace: kch42\ste
namespace kch42\ste;
-/*
- * Class: CantLoadTemplate
- * An exception that a <StorageAccess> implementation can throw, if it is unable to load a template.
+/**
+ * An exception that a {@see StorageAccess} implementation can throw, if it is unable to load a template.
*/
class CantLoadTemplate extends StorageAccessFailure
{
diff --git a/src/ste/CantSaveTemplate.php b/src/ste/CantSaveTemplate.php
index edbb93e..92cdfe7 100644
--- a/src/ste/CantSaveTemplate.php
+++ b/src/ste/CantSaveTemplate.php
@@ -1,13 +1,9 @@
<?php
-// File: CantSaveTemplate.php
-
-// Namespace: kch42\ste
namespace kch42\ste;
-/*
- * Class: CantSaveTemplate
- * An exception that a <StorageAccess> implementation can throw, if it is unable to save a template.
+/**
+ * An exception that a {@see StorageAccess} implementation can throw, if it is unable to save a template.
*/
class CantSaveTemplate extends StorageAccessFailure
{
diff --git a/src/ste/FatalRuntimeError.php b/src/ste/FatalRuntimeError.php
index ab40af5..3f5183f 100644
--- a/src/ste/FatalRuntimeError.php
+++ b/src/ste/FatalRuntimeError.php
@@ -1,12 +1,8 @@
<?php
-// File: FatalRuntimeError.php
-
-// Namespace: kch42\ste
namespace kch42\ste;
-/*
- * Class: FatalRuntimeError
+/**
* An Exception a tag can throw, if a fatal (irreparable) runtime error occurred.
* This Exception will always "bubble up" so you probably want to catch them. Remember that this exception is also in the namespace ste!
*/
diff --git a/src/ste/FilesystemStorageAccess.php b/src/ste/FilesystemStorageAccess.php
index d477e36..cb2fe7f 100644
--- a/src/ste/FilesystemStorageAccess.php
+++ b/src/ste/FilesystemStorageAccess.php
@@ -1,25 +1,21 @@
<?php
-// File: FilesystemStorageAccess.php
-
-// Namespace: kch42\ste
namespace kch42\ste;
-/*
- * Class: FilesystemStorageAccess
- * The default <StorageAccess> implementation for loading / saving templates into a directory structure.
+/**
+ * The default {@see StorageAccess} implementation for loading / saving templates into a directory structure.
*/
class FilesystemStorageAccess implements StorageAccess
{
+ /** @var string */
protected $sourcedir;
+
+ /** @var string */
protected $transcompileddir;
- /*
- * Constructor: __construct
- *
- * Parameters:
- * $src - The directory with the sources (Writing permissions are not mandatory, because STE does not save template sources).
- * $transc - The directory with the transcompiled templates (the PHP instance / the HTTP Server needs writing permissions to this directory).
+ /**
+ * @param string $src - The directory with the sources (Writing permissions are not mandatory, because STE does not save template sources).
+ * @param string $transc - The directory with the compiled templates (the PHP instance / the HTTP Server needs writing permissions to this directory).
*/
public function __construct($src, $transc)
{
@@ -43,13 +39,16 @@ class FilesystemStorageAccess implements StorageAccess
$src_stat = @stat($src_fn);
$transc_stat = @stat($transc_fn);
- if (($src_stat === false) and ($transc_stat === false)) {
+ if ($src_stat === false && $transc_stat === false) {
throw new CantLoadTemplate("Template not found.");
} elseif ($transc_stat === false) {
$mode = StorageAccess::MODE_SOURCE;
return file_get_contents($src_fn);
} elseif ($src_stat === false) {
include($transc_fn);
+ if (!isset($transcompile_fx)) {
+ throw new CantLoadTemplate("Compiled template file $transc_fn does not set \$transcompile_fx");
+ }
return $transcompile_fx;
} else {
if ($src_stat["mtime"] > $transc_stat["mtime"]) {
@@ -57,6 +56,9 @@ class FilesystemStorageAccess implements StorageAccess
return file_get_contents($src_fn);
} else {
include($transc_fn);
+ if (!isset($transcompile_fx)) {
+ throw new CantLoadTemplate("Compiled template file $transc_fn does not set \$transcompile_fx");
+ }
return $transcompile_fx;
}
}
diff --git a/src/ste/Misc.php b/src/ste/Misc.php
index d017ee3..330b3d2 100644
--- a/src/ste/Misc.php
+++ b/src/ste/Misc.php
@@ -4,6 +4,10 @@ namespace kch42\ste;
class Misc
{
+ /**
+ * @param string $text
+ * @return string
+ */
public static function escape_text($text)
{
return addcslashes($text, "\r\n\t\$\0..\x1f\\\"\x7f..\xff");
diff --git a/src/ste/ParseCompileError.php b/src/ste/ParseCompileError.php
index f5f0272..29590da 100644
--- a/src/ste/ParseCompileError.php
+++ b/src/ste/ParseCompileError.php
@@ -2,6 +2,9 @@
namespace kch42\ste;
+/**
+ * An exception thrown by the parser or compiler
+ */
class ParseCompileError extends \Exception
{
public $msg;
@@ -16,10 +19,13 @@ class ParseCompileError extends \Exception
$this->message = "$msg (Template $tpl, Offset $offset)";
}
+ /**
+ * Update the message to include a human readable offset.
+ * @param string $code
+ */
public function rewrite($code)
{
$line = substr_count(str_replace("\r\n", "\n", substr($code, 0, $this->off)), "\n") + 1;
$this->message = "{$this->msg} (Template {$this->tpl}, Line $line)";
- $this->is_rewritten = true;
}
}
diff --git a/src/ste/Parser.php b/src/ste/Parser.php
index 40f5f20..0280f6d 100644
--- a/src/ste/Parser.php
+++ b/src/ste/Parser.php
@@ -1,20 +1,25 @@
<?php
-// File: Parser.php
-
-// Namespace: kch42\ste
namespace kch42\ste;
-/*
- * Class: Parser
+use LogicException;
+
+/**
* The class, where the parser lives in. Can not be constructed manually.
* Use the static method parse.
*/
class Parser
{
+ /** @var string */
private $text;
+
+ /** @var string */
private $name;
+
+ /** @var int */
private $off;
+
+ /** @var int */
private $len;
const PARSE_SHORT = 1;
@@ -22,6 +27,10 @@ class Parser
const ESCAPES_DEFAULT = '$?~{}|\\';
+ /**
+ * @param string $text
+ * @param string $name
+ */
private function __construct($text, $name)
{
$this->text = $text;
@@ -30,6 +39,10 @@ class Parser
$this->len = mb_strlen($text);
}
+ /**
+ * @param int $n
+ * @return string
+ */
private function next($n = 1)
{
if ($n <= 0) {
@@ -40,11 +53,17 @@ class Parser
return $c;
}
+ /**
+ * @return bool
+ */
private function eof()
{
return ($this->off == $this->len);
}
+ /**
+ * @param int $n
+ */
private function back($n = 1)
{
if ($n <= 0) {
@@ -53,11 +72,19 @@ class Parser
$this->off = max($this->off - $n, 0);
}
+ /**
+ * @param string $needle
+ * @return false|int
+ */
private function search_off($needle)
{
return mb_strpos($this->text, $needle, $this->off);
}
+ /**
+ * @param string[] $needles
+ * @return array 4-tuple of found key, offset, text preceding offset, old offset
+ */
private function search_multi($needles)
{
$oldoff = $this->off;
@@ -81,6 +108,10 @@ class Parser
return array($which, $minoff, mb_substr($this->text, $oldoff, $minoff - $oldoff), $oldoff);
}
+ /**
+ * @param string $needle
+ * @return array 3-tuple of offset (or false), text preceding offset, old offset
+ */
private function search($needle)
{
$oldoff = $this->off;
@@ -95,7 +126,11 @@ class Parser
return array($off, mb_substr($this->text, $oldoff, $off - $oldoff), $oldoff);
}
- private function take_while($cb)
+ /**
+ * @param callable $cb
+ * @return string
+ */
+ private function take_while(callable $cb)
{
$s = "";
while (($c = $this->next()) !== "") {
@@ -113,6 +148,10 @@ class Parser
$this->take_while("ctype_space");
}
+ /**
+ * @return string
+ * @throws ParseCompileError
+ */
private function get_name()
{
$off = $this->off;
@@ -125,21 +164,16 @@ class Parser
return $name;
}
- /*
- * Function: parse
+ /**
* Parses the input into an AST.
*
- * You only need this function, if you want to manually trnascompile a template.
+ * You only need this function, if you want to manually compile a template.
*
- * Parameters:
- * $text - The input code.
- * $name - The name of the template.
+ * @param string $text The input code.
+ * @param string $name The name of the template.
*
- * Returns:
- * An array of <ASTNode> objects.
- *
- * Throws:
- * <ParseCompileError>
+ * @return ASTNode[]
+ * @throws ParseCompileError
*/
public static function parse($text, $name)
{
@@ -151,10 +185,15 @@ class Parser
return self::tidyup_ast($res[0]);
}
+ /**
+ * @param ASTNode[] $ast
+ * @return ASTNode[]
+ */
private static function tidyup_ast($ast)
{
$out = array();
+ /** @var TextNode|null $prevtext */
$prevtext = null;
$first = true;
@@ -206,6 +245,17 @@ class Parser
return $out;
}
+ /**
+ * @param string $escapes
+ * @param int $flags
+ * @param string|null $breakon
+ * @param string|null $separator
+ * @param null $nullaction
+ * @param string|null $opentag
+ * @param int $openedat
+ * @return ASTNode[][]
+ * @throws ParseCompileError
+ */
private function parse_text($escapes, $flags, $breakon = null, $separator = null, $nullaction = null, $opentag = null, $openedat = -1)
{
$elems = array();
@@ -250,14 +300,14 @@ class Parser
}
break;
case "commentopen":
- list($off, $before, $offbefore) = $this->search("</ste:comment>");
+ list($off, , $offbefore) = $this->search("</ste:comment>");
if ($off === false) {
throw new ParseCompileError("ste:comment was not closed", $this->name, $offbefore);
}
break;
case "rawopen":
$off_start = $off;
- list($off, $before, $offbefore) = $this->search("</ste:rawtext>");
+ list($off, $before, ) = $this->search("</ste:rawtext>");
if ($off === false) {
throw new ParseCompileError("ste:rawtext was not closed", $this->name, $off_start);
}
@@ -352,6 +402,12 @@ class Parser
return $elems;
}
+ /**
+ * @param string $shortname
+ * @param int $openedat
+ * @return ASTNode[][]
+ * @throws ParseCompileError
+ */
private function parse_short($shortname, $openedat)
{
$tplname = $this->name;
@@ -369,6 +425,12 @@ class Parser
);
}
+ /**
+ * @param int $openedat
+ * @param bool $curly
+ * @return VariableNode
+ * @throws ParseCompileError
+ */
private function parse_var($openedat, $curly)
{
$varnode = new VariableNode($this->name, $openedat);
@@ -377,12 +439,16 @@ class Parser
$varnode->arrayfields = $this->parse_array();
}
- if (($curly) && ($this->next() != "}")) {
+ if ($curly && ($this->next() != "}")) {
throw new ParseCompileError("Unclosed '\${'", $this->name, $openedat);
}
return $varnode;
}
+ /**
+ * @return ASTNode[]
+ * @throws ParseCompileError
+ */
private function parse_array()
{
$tplname = $this->name;
@@ -409,6 +475,11 @@ class Parser
return $arrayfields;
}
+ /**
+ * @param int $openedat
+ * @return TagNode
+ * @throws ParseCompileError
+ */
private function parse_tag($openedat)
{
$tplname = $this->name;
@@ -475,5 +546,8 @@ class Parser
$tag->params[$param] = $paramval[0];
}
}
+
+ // Help PhpStorm detect that we shouldn't be here
+ throw new LogicException("Somehow we left the infinite loop?");
}
}
diff --git a/src/ste/RuntimeError.php b/src/ste/RuntimeError.php
index dace1d4..51fd29d 100644
--- a/src/ste/RuntimeError.php
+++ b/src/ste/RuntimeError.php
@@ -1,14 +1,10 @@
<?php
-// File: RuntimeError.php
-
-// Namespace: kch42\ste
namespace kch42\ste;
-/*
- * Class: RuntimeError
+/**
* An Exception that a tag can throw, if a non-fatal runtime error occurred.
- * By default this will return in no output at all. But if <STECore::$mute_runtime_errors> is false, this will generate a error message instead of the tag's output.
+ * By default this will return in no output at all. But if {@see STECore::$mute_runtime_errors} is false, this will generate a error message instead of the tag's output.
*/
class RuntimeError extends \Exception
{
diff --git a/src/ste/STECore.php b/src/ste/STECore.php
index 13fb2f6..40d680a 100644
--- a/src/ste/STECore.php
+++ b/src/ste/STECore.php
@@ -1,43 +1,64 @@
<?php
-// File: STECore.php
-
-// Namespace: kch42\ste
namespace kch42\ste;
-/*
- * Class: STECore
+use Exception;
+
+/**
* The Core of STE
*/
class STECore
{
+ /** @var callable[] */
private $tags;
+
+ /** @var StorageAccess */
private $storage_access;
+
+ /** @var string */
private $cur_tpl_dir;
+
+ /** @var Scope */
public $scope;
- /*
- * Variables: Public variables
- *
- * $blocks - Associative array of blocks (see the language definition).
- * $blockorder - The order of the blocks (an array)
- * $mute_runtime_errors - If true (default) a <RuntimeError> exception will result in no output from the tag, if false a error message will be written to output.
- * $fatal_error_on_missing_tag - If true, STE will throw a <FatalRuntimeError> if a tag was called that was not registered, otherwise (default) a regular <RuntimeError> will be thrown and automatically handled by STE (see <$mute_runtime_errors>).
- * $vars - Variables in the top scope of the template.
+ /**
+ * @var array
+ * Associative array of blocks (see the language definition).
*/
public $blocks;
+
+ /**
+ * @var array
+ * The order of the blocks (an array)
+ */
public $blockorder;
+
+ /**
+ * @var bool
+ * If true (default) a {@see RuntimeError} exception will result in no
+ * output from the tag, if false a error message will be written to output.
+ */
public $mute_runtime_errors = true;
+
+ /**
+ * @var bool
+ * If true, STE will throw a {@see FatalRuntimeError} if a tag was called
+ * that was not registered, otherwise (default) a regular
+ * {@see RuntimeError} will be thrown and automatically handled by STE
+ * (see {@see STECore::$mute_runtime_errors}).
+ */
public $fatal_error_on_missing_tag = false;
+
+ /**
+ * @var array
+ * Variables in the top scope of the template.
+ */
public $vars;
- /*
- * Constructor: __construct
- *
- * Parameters:
- * $storage_access - An Instance of a <StorageAccess> implementation.
+ /**
+ * @param StorageAccess $storage_access
*/
- public function __construct($storage_access)
+ public function __construct(StorageAccess $storage_access)
{
$this->storage_access = $storage_access;
$this->cur_tpl_dir = "/";
@@ -50,42 +71,47 @@ class STECore
$this->scope->vars =& $this->vars;
}
- /*
- * Function: register_tag
+ /**
* Register a custom tag.
*
* Parameters:
- * $name - The name of the tag.
- * $callback - A callable function (This must take three parameters: The <STECore> instance, an associative array of parameters, and a function representing the tags content(This expects the <STECore> instance as its only parameter and returns its text result, i.e to get the text, you neeed to call this function with the <STECore> instance as a parameter)).
+ * @param string $name The name of the tag.
+ * @param callable $callback A callable function
+ * Must take three parameters:
*
- * Throws:
- * An Exception if the tag could not be registered (if $callback is not callable or if $name is empty)
+ * The {@see STECore} instance,
+ * an associative array of parameters,
+ * and a function representing the tags content
+ * (This expects the {@see STECore} instance as
+ * its only parameter and returns its text result,
+ * i.e to get the text, you need to call this
+ * function with the {@see STECore} instance as a
+ * parameter).
+ *
+ * @throws Exception If the tag could not be registered (if $callback is not callable or if $name is empty)
*/
public function register_tag($name, $callback)
{
if (!is_callable($callback)) {
- throw new \Exception("Can not register tag \"$name\", not callable.");
+ throw new Exception("Can not register tag \"$name\", not callable.");
}
if (empty($name)) {
- throw new \Exception("Can not register tag, empty name.");
+ throw new Exception("Can not register tag, empty name.");
}
$this->tags[$name] = $callback;
}
- /*
- * Function: call_tag
+ /**
* Calling a custom tag (builtin ones can not be called)
*
- * Parameters:
- * $name - The Tag's name
- * $params - Associative array of parameters
- * $sub - A callable function (expecting an <STECore> instance as it's parameter) that represents the tag's content.
+ * @param string $name The Tag's name
+ * @param array $params Associative array of parameters
+ * @param callable $sub A callable function (expecting an {@see STECore} instance as it's parameter) that represents the tag's content.
*
- * Throws:
- * Might throw a <FatalRuntimeError> (see <$fatal_error_on_missing_tag>.
+ * @throws FatalRuntimeError see {@see STECore::$fatal_error_on_missing_tag}.
*
- * Returns:
- * The output of the tag or, if a <RuntimeError> was thrown, the appropiate result (see <$mute_runtime_errors>).
+ * @return string The output of the tag or, if a {@see RuntimeError} was thrown, the appropriate result
+ * (see {@see STECore::$mute_runtime_errors}).
*/
public function call_tag($name, $params, $sub)
{
@@ -103,28 +129,37 @@ class STECore
return "RuntimeError occurred on tag '$name': " . $e->getMessage();
}
}
+
+ return "";
}
+ /**
+ * {@see Calc::calc()}
+ *
+ * @param string $expression
+ * @return float|int
+ * @throws RuntimeError
+ */
public function calc($expression)
{
return Calc::calc($expression);
}
- /*
- * Function: exectemplate
- * Executes a template and returns the result. The huge difference to <load> is that this function will also output all blocks.
+ /**
+ * Executes a template and returns the result.
*
- * Parameters:
- * $tpl - The name of the template to execute.
+ * The huge difference to {@see STECore::load()} is that this function will also output all blocks.
*
- * Throws:
- * * A <CantLoadTemplate> exception if the template could not be loaded.
- * * A <ParseCompileError> if the template could not be parsed or transcompiled.
- * * A <FatalRuntimeError> if a tag threw it or if a tag was not found and <$fatal_error_on_missing_tag> is true.
- * * Might also throw different exceptions, if a external tag threw it (but they should use <RuntimeError> or <FatalRuntimeError> to make it possible for STE to handle them correctly).
+ * @param string $tpl The name of the template to execute.
*
- * Returns:
- * The output of the template.
+ * @throws CantLoadTemplate If the template could not be loaded.
+ * @throws ParseCompileError If the template could not be parsed or compiled.
+ * @throws FatalRuntimeError If a tag threw it or if a tag was not found and <$fatal_error_on_missing_tag> is true.
+ *
+ * Might also throw different exceptions, if a external tag threw it
+ * (but they should use {@see RuntimeError} or {@see FatalRuntimeError} to make it possible for STE to handle them correctly).
+ *
+ * @return string The output of the template.
*/
public function exectemplate($tpl)
{
@@ -211,22 +246,21 @@ class STECore
return $this->scope->get_var_by_name($name);
}
- /*
- * Function: load
- * Load a template and return its result (blocks not included, use <exectemplate> for this).
+ /**
+ * Load a template and return its result (blocks not included, use {@see STECore::exectemplate} for this).
*
- * Parameters:
- * $tpl - The name of the template to be loaded.
- * $quiet - If true, do not output anything and do not modify the blocks. This can be useful to load custom tags that are programmed in the STE Template Language. Default: false.
+ * @param string $tpl The name of the template to be loaded.
+ * @param bool $quiet If true, do not output anything and do not modify the blocks. This can be useful to load custom tags that are programmed in the STE Template Language. Default: false.
*
- * Throws:
- * * A <CantLoadTemplate> exception if the template could not be loaded.
- * * A <ParseCompileError> if the template could not be parsed or transcompiled.
- * * A <FatalRuntimeError> if a tag threw it or if a tag was not found and <$fatal_error_on_missing_tag> is true.
- * * Might also throw different exceptions, if a external tag threw it (but they should use <RuntimeError> or <FatalRuntimeError> to make it possible for STE to handle them correctly).
+ * @throws CantLoadTemplate If the template could not be loaded.
+ * @throws CantSaveTemplate If the template could not be saved.
+ * @throws ParseCompileError If the template could not be parsed or compiled.
+ * @throws FatalRuntimeError If a tag threw it or if a tag was not found and {@see STECore::$fatal_error_on_missing_tag} is true.
*
- * Returns:
- * The result of the template (if $quiet == false).
+ * Might also throw different exceptions, if a external tag threw it
+ * (but they should use {@see RuntimeError} or {@see FatalRuntimeError} to make it possible for STE to handle them correctly).
+ *
+ * @return string|null The result of the template (if $quiet == false).
*/
public function load($tpl, $quiet = false)
{
@@ -238,7 +272,7 @@ class STECore
$tpl = $this->cur_tpl_dir . "/" . $tpl;
}
$pathex = array_filter(explode("/", $tpl), function ($s) {
- return ($s != ".") and (!empty($s));
+ return $s != "." && !empty($s);
});
$pathex = array_merge($pathex);
while (($i = array_search("..", $pathex)) !== false) {
@@ -277,26 +311,31 @@ class STECore
if ($quiet) {
$this->blocks = $blocks_back;
$this->blockorder = $blockorder_back;
+
+ return null;
} else {
return $output;
}
}
/*
- * Function: evalbool
* Test, if a text represents false (an empty / only whitespace text) or true (everything else).
*
- * Parameters:
- * $txt - The text to test.
+ * @param string $txt The text to test.
*
- * Returns:
- * true/false.
+ * @return bool
*/
public function evalbool($txt)
{
return trim(@(string)$txt) != "";
}
+ /**
+ * Internal function for implementing tag content and custom tags.
+ *
+ * @param callable $fx
+ * @return \Closure
+ */
public function make_closure($fx)
{
$bound_scope = $this->scope;
@@ -312,7 +351,7 @@ class STECore
$result = call_user_func_array($fx, $args);
$ste->scope = $prev;
return $result;
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$ste->scope = $prev;
throw $e;
}
diff --git a/src/ste/STEStandardLibrary.php b/src/ste/STEStandardLibrary.php
index 9850afe..e39b7af 100644
--- a/src/ste/STEStandardLibrary.php
+++ b/src/ste/STEStandardLibrary.php
@@ -13,6 +13,12 @@ class STEStandardLibrary
}
}
+ /**
+ * @param STECore $ste
+ * @param array $params
+ * @param callable $sub
+ * @return string
+ */
public static function escape($ste, $params, $sub)
{
if ($ste->evalbool(@$params["lines"])) {
@@ -22,11 +28,24 @@ class STEStandardLibrary
}
}
+ /**
+ * @param STECore $ste
+ * @param array $params
+ * @param callable $sub
+ * @return string
+ */
public static function strlen($ste, $params, $sub)
{
return strlen($sub($ste));
}
+ /**
+ * @param STECore $ste
+ * @param array $params
+ * @param callable $sub
+ * @return string
+ * @throws RuntimeError
+ */
public static function arraylen($ste, $params, $sub)
{
if (empty($params["array"])) {
@@ -36,6 +55,13 @@ class STEStandardLibrary
return (is_array($a)) ? count($a) : "";
}
+ /**
+ * @param STECore $ste
+ * @param array $params
+ * @param callable $sub
+ * @return string
+ * @throws RuntimeError
+ */
public static function inc($ste, $params, $sub)
{
if (empty($params["var"])) {
@@ -45,6 +71,13 @@ class STEStandardLibrary
$ref++;
}
+ /**
+ * @param STECore $ste
+ * @param array $params
+ * @param callable $sub
+ * @return string
+ * @throws RuntimeError
+ */
public static function dec($ste, $params, $sub)
{
if (empty($params["var"])) {
@@ -54,11 +87,24 @@ class STEStandardLibrary
$ref--;
}
+ /**
+ * @param STECore $ste
+ * @param array $params
+ * @param callable $sub
+ * @return string
+ */
public static function date($ste, $params, $sub)
{
return @strftime($sub($ste), empty($params["timestamp"]) ? @time() : (int) $params["timestamp"]);
}
+ /**
+ * @param STECore $ste
+ * @param array $params
+ * @param callable $sub
+ * @return string
+ * @throws RuntimeError
+ */
public static function in_array($ste, $params, $sub)
{
if (empty($params["array"])) {
@@ -71,6 +117,13 @@ class STEStandardLibrary
return in_array($sub($ste), $ar) ? "y" : "";
}
+ /**
+ * @param STECore $ste
+ * @param array $params
+ * @param callable $sub
+ * @return string
+ * @throws RuntimeError
+ */
public static function join($ste, $params, $sub)
{
if (empty($params["array"])) {
@@ -79,6 +132,13 @@ class STEStandardLibrary
return implode($sub($ste), $ste->get_var_by_name($params["array"]));
}
+ /**
+ * @param STECore $ste
+ * @param array $params
+ * @param callable $sub
+ * @return string
+ * @throws RuntimeError
+ */
public static function split($ste, $params, $sub)
{
if (empty($params["array"])) {
@@ -90,6 +150,13 @@ class STEStandardLibrary
$ste->set_var_by_name($params["array"], explode($params["delim"], $sub($ste)));
}
+ /**
+ * @param STECore $ste
+ * @param array $params
+ * @param callable $sub
+ * @return string
+ * @throws RuntimeError
+ */
public static function array_add($ste, $params, $sub)
{
if (empty($params["array"])) {
@@ -104,6 +171,13 @@ class STEStandardLibrary
}
}
+ /**
+ * @param STECore $ste
+ * @param array $params
+ * @param callable $sub
+ * @return string
+ * @throws RuntimeError
+ */
public static function array_filter($ste, $params, $sub)
{
if (empty($params["array"])) {
diff --git a/src/ste/Scope.php b/src/ste/Scope.php
index e312876..afb2bfc 100644
--- a/src/ste/Scope.php
+++ b/src/ste/Scope.php
@@ -4,9 +4,17 @@ namespace kch42\ste;
class Scope implements \ArrayAccess
{
+ /** @var self|null */
private $parent = null;
+
+ /** @var array */
public $vars = array();
+ /**
+ * @param string $name
+ * @return string[]
+ * @throws RuntimeError
+ */
private static function parse_name($name)
{
$remain = $name;
@@ -44,6 +52,12 @@ class Scope implements \ArrayAccess
return $fields;
}
+ /**
+ * @param string $name
+ * @param bool $localonly
+ * @return mixed A reference to the resolved variable
+ * @throws VarNotInScope
+ */
private function &get_topvar_reference($name, $localonly)
{
if (array_key_exists($name, $this->vars)) {
@@ -59,6 +73,13 @@ class Scope implements \ArrayAccess
throw new VarNotInScope();
}
+ /**
+ * @param string $name
+ * @param bool $create_if_not_exist
+ * @param bool $localonly
+ * @return mixed A reference to the resolved variable
+ * @throws RuntimeError
+ */
public function &get_var_reference($name, $create_if_not_exist, $localonly=false)
{
$nullref = null;
@@ -107,24 +128,42 @@ class Scope implements \ArrayAccess
return $ref;
}
+ /**
+ * @param string $name
+ * @param mixed $val
+ * @throws RuntimeError
+ */
public function set_var_by_name($name, $val)
{
$ref = &$this->get_var_reference($name, true);
$ref = $val;
}
+ /**
+ * @param string $name
+ * @param mixed $val
+ * @throws RuntimeError
+ */
public function set_local_var($name, $val)
{
$ref = &$this->get_var_reference($name, true, true);
$ref = $val;
}
+ /**
+ * @param string $name
+ * @return mixed Returns an empty string, if not found or unset
+ * @throws RuntimeError
+ */
public function get_var_by_name($name)
{
$ref = $this->get_var_reference($name, false);
return $ref === null ? "" : $ref;
}
+ /**
+ * @return self
+ */
public function new_subscope()
{
$o = new self();
diff --git a/src/ste/StorageAccess.php b/src/ste/StorageAccess.php
index e2e8727..38dea7e 100644
--- a/src/ste/StorageAccess.php
+++ b/src/ste/StorageAccess.php
@@ -1,56 +1,45 @@
<?php
-// File: StorageAccess.php
-
-// Namespace: kch42\ste
namespace kch42\ste;
-/*
- * Class: StorageAccess
- * An interface.
+/**
* A StorageAccess implementation is used to access the templates from any storage.
* This means, that you are not limited to store the Templates inside directories, you can also use a database or something else.
*/
interface StorageAccess
{
- /*
- * Constants: Template modes
- *
- * MODE_SOURCE - The Templates source
- * MODE_TRANSCOMPILED - The transcompiled template
- */
+ /** @var int The template's source */
const MODE_SOURCE = 0;
+
+ /** @var int The compiled template */
const MODE_TRANSCOMPILED = 1;
- /*
- * Function: load
+ /**
* Loading a template.
*
- * Parameters:
- * $tpl - The name of the template.
- * &$mode - Which mode is preferred? One of the <Template modes>.
- * If <MODE_SOURCE>, the raw sourcecode is expected, if <MODE_TRANSCOMPILED> the transcompiled template *as a callable function* (expecting an <STECore> instance as first parameter) is expected.
- * If the transcompiled version is not available or older than the source, you can set this parameter to <MODE_SOURCE> and return the source.
+ * @param string $tpl The name of the template.
+ * @param string &$mode Which mode is preferred? One of the MODE_* constants.
+ * If {@see StorageAccess::MODE_SOURCE}, the raw sourcecode is expected,
+ * if {@see StorageAccess::MODE_TRANSCOMPILED} the compiled template
+ * *as a callable function* (expecting an {@see STECore} instance as first parameter) is expected.
+ *
+ * If the compiled version is not available or older than the source, you can set this
+ * parameter to {@see StorageAccess::MODE_SOURCE} and return the source.
*
- * Throws:
- * A <CantLoadTemplate> exception if the template could not be loaded.
+ * @throws CantLoadTemplate If the template could not be loaded.
*
- * Returns:
- * Either the sourcecode or a callable function (first, and only parameter: an <STECore> instance).
+ * @return string|callable Either the sourcecode or a callable function (first, and only parameter: an {@see STECore} instance).
*/
public function load($tpl, &$mode);
- /*
- * Function: save
+ /**
* Saves a template.
*
- * Throws:
- * A <CantSaveTemplate> exception if the template could not be saved.
+ * @param string $tpl -The name of the template.
+ * @param string $data - The data to be saved.
+ * @param int $mode - One of the MODE_* constants.
*
- * Parameters:
- * $tpl -The name of the template.
- * $data - The data to be saved.
- * $mode - A <Template mode> constant.
+ * @throws CantSaveTemplate If the template could not be saved.
*/
public function save($tpl, $data, $mode);
}
diff --git a/src/ste/TagNode.php b/src/ste/TagNode.php
index c1a14e5..18567b2 100644
--- a/src/ste/TagNode.php
+++ b/src/ste/TagNode.php
@@ -4,9 +4,20 @@ namespace kch42\ste;
class TagNode extends ASTNode
{
+ /** @var string */
public $name;
+
+ /** @var ASTNode[][] */
public $params = array();
+
+ /** @var ASTNode[] */
public $sub = array();
+
+ /**
+ * @param string $tpl
+ * @param int $off
+ * @param string $name
+ */
public function __construct($tpl, $off, $name = "")
{
parent::__construct($tpl, $off);
diff --git a/src/ste/TextNode.php b/src/ste/TextNode.php
index c68dd2f..199c203 100644
--- a/src/ste/TextNode.php
+++ b/src/ste/TextNode.php
@@ -4,7 +4,14 @@ namespace kch42\ste;
class TextNode extends ASTNode
{
+ /** @var string */
public $text;
+
+ /**
+ * @param string $tpl
+ * @param int $off
+ * @param string $text
+ */
public function __construct($tpl, $off, $text = "")
{
parent::__construct($tpl, $off);
diff --git a/src/ste/Transcompiler.php b/src/ste/Transcompiler.php
index d223b53..88c008e 100644
--- a/src/ste/Transcompiler.php
+++ b/src/ste/Transcompiler.php
@@ -1,13 +1,9 @@
<?php
-// File: Transcompiler.php
-
-// Namespace: kch42\ste
namespace kch42\ste;
-/*
- * Class: Transcompiler
- * Contains the STE transcompiler. You'll only need this, if you want to manually transcompile a STE template.
+/**
+ * Contains the STE compiler. You'll only need this, if you want to manually compile a STE template.
*/
class Transcompiler
{
@@ -18,33 +14,44 @@ class Transcompiler
return $typ . '_' . str_replace('.', '_', uniqid('', true));
}
+ private static function mark_builtin_callable(callable $c)
+ {
+ return $c;
+ }
+
public static function init_builtins()
{
if (self::$builtins !== null) {
return;
}
+ /** @var callable[] builtins */
self::$builtins = array(
- "if" => array("\\kch42\\ste\\Transcompiler", "builtin_if"),
- "cmp" => array("\\kch42\\ste\\Transcompiler", "builtin_cmp"),
- "not" => array("\\kch42\\ste\\Transcompiler", "builtin_not"),
- "even" => array("\\kch42\\ste\\Transcompiler", "builtin_even"),
- "for" => array("\\kch42\\ste\\Transcompiler", "builtin_for"),
- "foreach" => array("\\kch42\\ste\\Transcompiler", "builtin_foreach"),
- "infloop" => array("\\kch42\\ste\\Transcompiler", "builtin_infloop"),
- "break" => array("\\kch42\\ste\\Transcompiler", "builtin_break"),
- "continue" => array("\\kch42\\ste\\Transcompiler", "builtin_continue"),
- "block" => array("\\kch42\\ste\\Transcompiler", "builtin_block"),
- "load" => array("\\kch42\\ste\\Transcompiler", "builtin_load"),
- "mktag" => array("\\kch42\\ste\\Transcompiler", "builtin_mktag"),
- "tagcontent" => array("\\kch42\\ste\\Transcompiler", "builtin_tagcontent"),
- "set" => array("\\kch42\\ste\\Transcompiler", "builtin_set"),
- "setlocal" => array("\\kch42\\ste\\Transcompiler", "builtin_setlocal"),
- "get" => array("\\kch42\\ste\\Transcompiler", "builtin_get"),
- "calc" => array("\\kch42\\ste\\Transcompiler", "builtin_calc")
+ "if" => self::mark_builtin_callable(array("\\kch42\\ste\\Transcompiler", "builtin_if")),
+ "cmp" => self::mark_builtin_callable(array("\\kch42\\ste\\Transcompiler", "builtin_cmp")),
+ "not" => self::mark_builtin_callable(array("\\kch42\\ste\\Transcompiler", "builtin_not")),
+ "even" => self::mark_builtin_callable(array("\\kch42\\ste\\Transcompiler", "builtin_even")),
+ "for" => self::mark_builtin_callable(array("\\kch42\\ste\\Transcompiler", "builtin_for")),
+ "foreach" => self::mark_builtin_callable(array("\\kch42\\ste\\Transcompiler", "builtin_foreach")),
+ "infloop" => self::mark_builtin_callable(array("\\kch42\\ste\\Transcompiler", "builtin_infloop")),
+ "break" => self::mark_builtin_callable(array("\\kch42\\ste\\Transcompiler", "builtin_break")),
+ "continue" => self::mark_builtin_callable(array("\\kch42\\ste\\Transcompiler", "builtin_continue")),
+ "block" => self::mark_builtin_callable(array("\\kch42\\ste\\Transcompiler", "builtin_block")),
+ "load" => self::mark_builtin_callable(array("\\kch42\\ste\\Transcompiler", "builtin_load")),
+ "mktag" => self::mark_builtin_callable(array("\\kch42\\ste\\Transcompiler", "builtin_mktag")),
+ "tagcontent" => self::mark_builtin_callable(array("\\kch42\\ste\\Transcompiler", "builtin_tagcontent")),
+ "set" => self::mark_builtin_callable(array("\\kch42\\ste\\Transcompiler", "builtin_set")),
+ "setlocal" => self::mark_builtin_callable(array("\\kch42\\ste\\Transcompiler", "builtin_setlocal")),
+ "get" => self::mark_builtin_callable(array("\\kch42\\ste\\Transcompiler", "builtin_get")),
+ "calc" => self::mark_builtin_callable(array("\\kch42\\ste\\Transcompiler", "builtin_calc"))
);
}
+ /**
+ * @param TagNode $ast
+ * @return string
+ * @throws ParseCompileError
+ */
private static function builtin_if($ast)
{
$output = "";
@@ -53,9 +60,9 @@ class Transcompiler
$else = null;
foreach ($ast->sub as $node) {
- if (($node instanceof TagNode) and ($node->name == "then")) {
+ if (($node instanceof TagNode) && $node->name == "then") {
$then = $node->sub;
- } elseif (($node instanceof TagNode) and ($node->name == "else")) {
+ } elseif (($node instanceof TagNode) && $node->name == "else") {
$else = $node->sub;
} else {
$condition[] = $node;
@@ -78,6 +85,12 @@ class Transcompiler
}
return $output;
}
+
+ /**
+ * @param TagNode $ast
+ * @return string
+ * @throws ParseCompileError
+ */
private static function builtin_cmp($ast)
{
$operators = array(
@@ -116,7 +129,10 @@ class Transcompiler
if (!isset($ast->params["op"])) {
throw new ParseCompileError("self::Transcompile error: op not given in <ste:cmp>.", $ast->tpl, $ast->offset);
}
- if ((count($ast->params["op"]) == 1) and ($ast->params["op"][0] instanceof TextNode)) {
+ if (
+ count($ast->params["op"]) == 1
+ && ($ast->params["op"][0] instanceof TextNode)
+ ) {
/* Operator is known at compile time, this saves *a lot* of output code! */
$op = trim($ast->params["op"][0]->text);
$op_php = null;
@@ -144,6 +160,12 @@ class Transcompiler
}
return $code;
}
+
+ /**
+ * @param TagNode $ast
+ * @return string
+ * @throws ParseCompileError
+ */
private static function builtin_not($ast)
{
$code = "\$outputstack[] = '';\n\$outputstack_i++;\n";
@@ -151,6 +173,12 @@ class Transcompiler
$code .= "\$outputstack_i--;\n\$outputstack[\$outputstack_i] .= (!\$ste->evalbool(array_pop(\$outputstack))) ? 'yes' : '';\n";
return $code;
}
+
+ /**
+ * @param TagNode $ast
+ * @return string
+ * @throws ParseCompileError
+ */
private static function builtin_even($ast)
{
$code = "\$outputstack[] = '';\n\$outputstack_i++;\n";
@@ -158,6 +186,12 @@ class Transcompiler
$code .= "\$outputstack_i--;\n\$tmp_even = array_pop(\$outputstack);\n\$outputstack[\$outputstack_i] .= (is_numeric(\$tmp_even) and (\$tmp_even % 2 == 0)) ? 'yes' : '';\n";
return $code;
}
+
+ /**
+ * @param TagNode $ast
+ * @return string
+ * @throws ParseCompileError
+ */
private static function builtin_for($ast)
{
$code = "";
@@ -179,7 +213,10 @@ class Transcompiler
$step = null; /* i.e. not known at compilation time */
if (empty($ast->params["step"])) {
$step = 1;
- } elseif ((count($ast->params["step"]) == 1) and ($ast->params["step"][0] instanceof TextNode)) {
+ } elseif (
+ count($ast->params["step"]) == 1
+ && ($ast->params["step"][0] instanceof TextNode)
+ ) {
$step = $ast->params["step"][0]->text + 0;
} else {
list($val, $pre) = self::_transcompile($ast->params["step"], true);
@@ -216,6 +253,12 @@ class Transcompiler
return $code;
}
+
+ /**
+ * @param TagNode $ast
+ * @return string
+ * @throws ParseCompileError
+ */
private static function builtin_foreach($ast)
{
$loopname = self::tempvar("foreachloop");
@@ -282,18 +325,40 @@ class Transcompiler
return $code;
}
+
+ /**
+ * @param TagNode $ast
+ * @return string
+ * @throws ParseCompileError
+ */
private static function builtin_infloop($ast)
{
return "while(true)\n{\n" . self::indent_code(self::loopbody(self::indent_code(self::_transcompile($ast->sub)))) . "\n}\n";
}
+
+ /**
+ * @param TagNode $ast
+ * @return string
+ */
private static function builtin_break($ast)
{
return "throw new \\kch42\\ste\\BreakException();\n";
}
+
+ /**
+ * @param TagNode $ast
+ * @return string
+ */
private static function builtin_continue($ast)
{
return "throw new \\kch42\\ste\\ContinueException();\n";
}
+
+ /**
+ * @param TagNode $ast
+ * @return string
+ * @throws ParseCompileError
+ */
private static function builtin_block($ast)
{
if (empty($ast->params["name"])) {
@@ -315,6 +380,12 @@ class Transcompiler
return $code;
}
+
+ /**
+ * @param TagNode $ast
+ * @return string
+ * @throws ParseCompileError
+ */
private static function builtin_load($ast)
{
if (empty($ast->params["name"])) {
@@ -325,6 +396,12 @@ class Transcompiler
$code .= "\$outputstack[\$outputstack_i] .= \$ste->load(" . $val . ");\n";
return $code;
}
+
+ /**
+ * @param TagNode $ast
+ * @return string
+ * @throws ParseCompileError
+ */
private static function builtin_mktag($ast)
{
$code = "";
@@ -356,10 +433,21 @@ class Transcompiler
return $code;
}
+
+ /**
+ * @param TagNode $ast
+ * @return string
+ */
private static function builtin_tagcontent($ast)
{
return "\$outputstack[\$outputstack_i] .= \$sub(\$ste);";
}
+
+ /**
+ * @param TagNode $ast
+ * @return string
+ * @throws ParseCompileError
+ */
private static function builtin_set($ast)
{
if (empty($ast->params["var"])) {
@@ -376,6 +464,12 @@ class Transcompiler
return $code;
}
+
+ /**
+ * @param TagNode $ast
+ * @return string
+ * @throws ParseCompileError
+ */
private static function builtin_setlocal($ast)
{
if (empty($ast->params["var"])) {
@@ -392,6 +486,12 @@ class Transcompiler
return $code;
}
+
+ /**
+ * @param TagNode $ast
+ * @return string
+ * @throws ParseCompileError
+ */
private static function builtin_get($ast)
{
if (empty($ast->params["var"])) {
@@ -401,6 +501,12 @@ class Transcompiler
list($val, $pre) = self::_transcompile($ast->params["var"], true);
return "$pre\$outputstack[\$outputstack_i] .= \$ste->get_var_by_name(" . $val . ");";
}
+
+ /**
+ * @param TagNode $ast
+ * @return string
+ * @throws ParseCompileError
+ */
private static function builtin_calc($ast)
{
$code = "\$outputstack[] = '';\n\$outputstack_i++;\n";
@@ -425,6 +531,12 @@ class Transcompiler
return "try\n{\n" . self::indent_code($code) . "\n}\ncatch(\\kch42\\ste\\BreakException \$e) { break; }\ncatch(\\kch42\\ste\\ContinueException \$e) { continue; }\n";
}
+ /**
+ * @param ASTNode[] $ast
+ * @param bool $avoid_outputstack
+ * @return array|string
+ * @throws ParseCompileError
+ */
private static function _transcompile($ast, $avoid_outputstack = false)
{ /* The real self::transcompile function, does not add boilerplate code. */
$code = "";
@@ -477,16 +589,15 @@ class Transcompiler
return $code;
}
- /*
- * Function: transcompile
- * Transcompiles an abstract syntax tree to PHP.
- * You only need this function, if you want to manually transcompile a template.
+ /**
+ * Compiles an abstract syntax tree to PHP.
+ * You only need this function, if you want to manually compile a template.
*
- * Parameters:
- * $ast - The abstract syntax tree to transcompile.
+ * @param ASTNode[] $ast The abstract syntax tree to compile.
*
- * Returns:
- * PHP code. The PHP code is an anonymous function expecting a <STECore> instance as its parameter and returns a string (everything that was not pached into a section).
+ * @return string PHP code. The PHP code is an anonymous function expecting an {@see STECore} instance as its
+ * parameter and returns a string (everything that was not packed into a section).
+ * @throws ParseCompileError
*/
public static function transcompile($ast)
{ /* self::Transcompile and add some boilerplate code. */
diff --git a/src/ste/VariableNode.php b/src/ste/VariableNode.php
index d03fdce..9a4ced8 100644
--- a/src/ste/VariableNode.php
+++ b/src/ste/VariableNode.php
@@ -4,13 +4,24 @@ namespace kch42\ste;
class VariableNode extends ASTNode
{
+ /** @var string */
public $name;
+
+ /** @var ASTNode[][] */
public $arrayfields = array();
+
+ /**
+ * @return string
+ */
public function transcompile()
{
$varaccess = '@$ste->scope[' . (is_numeric($this->name) ? $this->name : '"' . Misc::escape_text($this->name) . '"'). ']';
foreach ($this->arrayfields as $af) {
- if ((count($af) == 1) and ($af[0] instanceof TextNode) and is_numeric($af[0]->text)) {
+ if (
+ count($af) == 1
+ && ($af[0] instanceof TextNode)
+ && is_numeric($af[0]->text)
+ ) {
$varaccess .= '[' . $af->text . ']';
} else {
$varaccess .= '[' . implode(".", array_map(function ($node) {
diff --git a/tests/dump_ast.php b/tests/dump_ast.php
index ef0a049..70a15af 100644
--- a/tests/dump_ast.php
+++ b/tests/dump_ast.php
@@ -2,4 +2,5 @@
require(dirname(__FILE__) . "/../ste.php");
+ini_set("xdebug.var_display_max_depth", 1000);
var_dump(\ste\Parser::parse(file_get_contents("php://stdin"), "-"));