diff --git a/.gitignore b/.gitignore index cf664bc..f46cbaa 100755 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ /.idea/ # COMPOSER -/vendor/ \ No newline at end of file +/vendor/ + +*.lock \ No newline at end of file diff --git a/composer.lock b/composer.lock deleted file mode 100755 index 3bc78b3..0000000 --- a/composer.lock +++ /dev/null @@ -1,1262 +0,0 @@ -{ - "_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#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "hash": "a820c17e6693bc5bdc009fa50ad3d972", - "content-hash": "e887e3cd6126eabc0b4308138d307a1a", - "packages": [ - { - "name": "doctrine/annotations", - "version": "v1.3.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "bd4461328621bde0ae6b1b2675fbc6aca4ceb558" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/bd4461328621bde0ae6b1b2675fbc6aca4ceb558", - "reference": "bd4461328621bde0ae6b1b2675fbc6aca4ceb558", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "^5.6.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "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": "2016-12-30 15:59:45" - }, - { - "name": "doctrine/cache", - "version": "v1.6.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/cache.git", - "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/b6f544a20f4807e81f7044d31e679ccbb1866dc3", - "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3", - "shasum": "" - }, - "require": { - "php": "~5.5|~7.0" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4" - }, - "require-dev": { - "phpunit/phpunit": "~4.8|~5.0", - "predis/predis": "~1.0", - "satooshi/php-coveralls": "~0.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Caching library offering an object-oriented API for many cache backends", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "cache", - "caching" - ], - "time": "2016-10-29 11:16:17" - }, - { - "name": "doctrine/instantiator", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", - "shasum": "" - }, - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.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://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2015-06-14 21:17:01" - }, - { - "name": "doctrine/lexer", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "lexer", - "parser" - ], - "time": "2014-09-09 13:34:57" - }, - { - "name": "fguillot/json-rpc", - "version": "v1.2.4", - "source": { - "type": "git", - "url": "https://github.com/fguillot/JsonRPC.git", - "reference": "ea2720b13e986bbf23e832b135c84c91ead7259f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fguillot/JsonRPC/zipball/ea2720b13e986bbf23e832b135c84c91ead7259f", - "reference": "ea2720b13e986bbf23e832b135c84c91ead7259f", - "shasum": "" - }, - "require": { - "php": ">=5.3.4" - }, - "require-dev": { - "phpunit/phpunit": "4.8.*" - }, - "type": "library", - "autoload": { - "psr-0": { - "JsonRPC": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Frédéric Guillot" - } - ], - "description": "Simple Json-RPC client/server library that just works", - "homepage": "https://github.com/fguillot/JsonRPC", - "time": "2017-01-12 21:31:30" - }, - { - "name": "jms/metadata", - "version": "1.6.0", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/metadata.git", - "reference": "6a06970a10e0a532fb52d3959547123b84a3b3ab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/6a06970a10e0a532fb52d3959547123b84a3b3ab", - "reference": "6a06970a10e0a532fb52d3959547123b84a3b3ab", - "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": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Class/method/property metadata management in PHP", - "keywords": [ - "annotations", - "metadata", - "xml", - "yaml" - ], - "time": "2016-12-05 10:18:33" - }, - { - "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-18 18:08:43" - }, - { - "name": "jms/serializer", - "version": "1.4.2", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/serializer.git", - "reference": "f39d8b4660d5cef43b0c3265ce642173d9b2c58b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/f39d8b4660d5cef43b0c3265ce642173d9b2c58b", - "reference": "f39d8b4660d5cef43b0c3265ce642173d9b2c58b", - "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": { - "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/filesystem": "^2.1", - "symfony/form": "~2.1", - "symfony/translation": "^2.1", - "symfony/validator": "^2.2", - "symfony/yaml": "^2.1", - "twig/twig": "~1.12|~2.0" - }, - "suggest": { - "symfony/yaml": "Required if you'd like to serialize data to YAML format." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-0": { - "JMS\\Serializer": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache2" - ], - "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": "2016-11-13 10:20:11" - }, - { - "name": "memio/linter", - "version": "v1.0.2", - "source": { - "type": "git", - "url": "https://github.com/memio/linter.git", - "reference": "76286a4ea75c457946a2b5b68d793d6362d870b4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/memio/linter/zipball/76286a4ea75c457946a2b5b68d793d6362d870b4", - "reference": "76286a4ea75c457946a2b5b68d793d6362d870b4", - "shasum": "" - }, - "require": { - "memio/model": "^1.0", - "memio/validator": "^1.0", - "php": "^5.3|^7.0" - }, - "require-dev": { - "fabpot/php-cs-fixer": "^1.6", - "phpspec/phpspec": "^2.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Memio\\Linter\\": "src/Memio/Linter" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Loïc Faugeron", - "email": "faugeron.loic@gmail.com", - "homepage": "http://gnugat.github.io", - "role": "Developer" - } - ], - "description": "Memio's linter, a set of constraint that check models for syntax errors", - "homepage": "http://memio.github.io/memio", - "keywords": [ - "code", - "generator", - "php" - ], - "time": "2015-12-01 16:44:02" - }, - { - "name": "memio/memio", - "version": "v1.1.1", - "source": { - "type": "git", - "url": "https://github.com/memio/memio.git", - "reference": "370d1fc0568a8eb4bc4bf25f7114a590b2717cb9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/memio/memio/zipball/370d1fc0568a8eb4bc4bf25f7114a590b2717cb9", - "reference": "370d1fc0568a8eb4bc4bf25f7114a590b2717cb9", - "shasum": "" - }, - "require": { - "memio/linter": "^1.0", - "memio/model": "^1.3", - "memio/pretty-printer": "^1.0", - "memio/twig-template-engine": "^1.2", - "memio/validator": "^1.0", - "php": "^5.3|^7.0" - }, - "require-dev": { - "fabpot/php-cs-fixer": "^1.6", - "phpunit/phpunit": "^4.6|^5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Memio\\Memio\\": "src/Memio/Memio", - "Memio\\Memio\\Config\\": "config" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Loïc Faugeron", - "email": "faugeron.loic@gmail.com", - "homepage": "http://gnugat.github.io", - "role": "Developer" - } - ], - "description": "A highly opinionated PHP code generator library", - "homepage": "http://memio.github.io/memio", - "keywords": [ - "code", - "generator", - "php" - ], - "time": "2015-12-01 17:28:21" - }, - { - "name": "memio/model", - "version": "v1.4.1", - "source": { - "type": "git", - "url": "https://github.com/memio/model.git", - "reference": "fbf1a4e4f610424b0600ec0d58e8ab9b55ba53e7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/memio/model/zipball/fbf1a4e4f610424b0600ec0d58e8ab9b55ba53e7", - "reference": "fbf1a4e4f610424b0600ec0d58e8ab9b55ba53e7", - "shasum": "" - }, - "require": { - "php": "^5.3|^7.0" - }, - "require-dev": { - "fabpot/php-cs-fixer": "^1.6", - "phpspec/phpspec": "^2.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Memio\\Model\\": "src/Memio/Model" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Loïc Faugeron", - "email": "faugeron.loic@gmail.com", - "homepage": "http://gnugat.github.io", - "role": "Developer" - } - ], - "description": "Memio's models, used to describe the code to generate", - "homepage": "http://memio.github.io/memio", - "keywords": [ - "code", - "generator", - "php" - ], - "time": "2015-12-01 17:21:08" - }, - { - "name": "memio/pretty-printer", - "version": "v1.0.3", - "source": { - "type": "git", - "url": "https://github.com/memio/pretty-printer.git", - "reference": "d0365eb3afbd1fd417698b89002e31afa9ce3174" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/memio/pretty-printer/zipball/d0365eb3afbd1fd417698b89002e31afa9ce3174", - "reference": "d0365eb3afbd1fd417698b89002e31afa9ce3174", - "shasum": "" - }, - "require": { - "memio/model": "^1.0", - "php": "^5.3|^7.0" - }, - "require-dev": { - "fabpot/php-cs-fixer": "^1.6", - "phpspec/phpspec": "^2.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Memio\\PrettyPrinter\\": "src/Memio/PrettyPrinter" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Loïc Faugeron", - "email": "faugeron.loic@gmail.com", - "homepage": "http://gnugat.github.io", - "role": "Developer" - } - ], - "description": "Memio's PrettyPrinter, used to generate PHP code from given Model", - "homepage": "http://memio.github.io/memio", - "keywords": [ - "code", - "generator", - "php" - ], - "time": "2015-12-01 11:11:18" - }, - { - "name": "memio/twig-template-engine", - "version": "v1.2.7", - "source": { - "type": "git", - "url": "https://github.com/memio/twig-template-engine.git", - "reference": "661b1e560c68963dbe84727710bdfb0f5004965e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/memio/twig-template-engine/zipball/661b1e560c68963dbe84727710bdfb0f5004965e", - "reference": "661b1e560c68963dbe84727710bdfb0f5004965e", - "shasum": "" - }, - "require": { - "memio/model": "^1.3", - "memio/pretty-printer": "^1.0", - "php": "^5.3 || ^7.0", - "twig/twig": "^1.18 || ^2.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^1.6", - "phpspec/phpspec": "^2.4 || ^3.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Memio\\TwigTemplateEngine\\": "src/Memio/TwigTemplateEngine", - "Memio\\TwigTemplateEngine\\Config\\": "config" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Loïc Faugeron", - "email": "faugeron.loic@gmail.com", - "homepage": "http://gnugat.github.io", - "role": "Developer" - } - ], - "description": "Memio's Twig templates, used to generate PHP code from given Model", - "homepage": "http://memio.github.io/memio", - "keywords": [ - "code", - "generator", - "php", - "templates", - "twig" - ], - "time": "2017-01-12 12:01:49" - }, - { - "name": "memio/validator", - "version": "v1.0.2", - "source": { - "type": "git", - "url": "https://github.com/memio/validator.git", - "reference": "5424fd8b43c833bfa634551fc5cb46962124900d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/memio/validator/zipball/5424fd8b43c833bfa634551fc5cb46962124900d", - "reference": "5424fd8b43c833bfa634551fc5cb46962124900d", - "shasum": "" - }, - "require": { - "memio/model": "^1.0", - "php": "^5.3|^7.0" - }, - "require-dev": { - "fabpot/php-cs-fixer": "^1.6", - "phpspec/phpspec": "^2.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Memio\\Validator\\": "src/Memio/Validator" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Loïc Faugeron", - "email": "faugeron.loic@gmail.com", - "homepage": "http://gnugat.github.io", - "role": "Developer" - } - ], - "description": "Memio's validator, used to check built models again a pre-defined set of rules", - "homepage": "http://memio.github.io/memio", - "keywords": [ - "code", - "generator", - "php" - ], - "time": "2015-12-01 16:49:43" - }, - { - "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-17 12:39:23" - }, - { - "name": "phpoption/phpoption", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/php-option.git", - "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed", - "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "4.7.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-0": { - "PhpOption\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache2" - ], - "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Option Type for PHP", - "keywords": [ - "language", - "option", - "php", - "type" - ], - "time": "2015-07-25 16:39:46" - }, - { - "name": "psr/log", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.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": "2016-10-10 12:19:37" - }, - { - "name": "symfony/console", - "version": "v3.2.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "4f9e449e76996adf310498a8ca955c6deebe29dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/4f9e449e76996adf310498a8ca955c6deebe29dd", - "reference": "4f9e449e76996adf310498a8ca955c6deebe29dd", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "symfony/debug": "~2.8|~3.0", - "symfony/polyfill-mbstring": "~1.0" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/filesystem": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/filesystem": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-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": "2017-01-08 20:47:33" - }, - { - "name": "symfony/debug", - "version": "v3.2.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "810ba5c1c5352a4ddb15d4719e8936751dff0b05" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/810ba5c1c5352a4ddb15d4719e8936751dff0b05", - "reference": "810ba5c1c5352a4ddb15d4719e8936751dff0b05", - "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.2-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": "2017-01-02 20:32:22" - }, - { - "name": "symfony/filesystem", - "version": "v3.2.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "a0c6ef2dc78d33b58d91d3a49f49797a184d06f4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/a0c6ef2dc78d33b58d91d3a49f49797a184d06f4", - "reference": "a0c6ef2dc78d33b58d91d3a49f49797a184d06f4", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-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": "2017-01-08 20:47:33" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", - "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-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" - ], - "time": "2016-11-14 01:06:16" - }, - { - "name": "symfony/yaml", - "version": "v3.2.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "50eadbd7926e31842893c957eca362b21592a97d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/50eadbd7926e31842893c957eca362b21592a97d", - "reference": "50eadbd7926e31842893c957eca362b21592a97d", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "symfony/console": "~2.8|~3.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "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 Yaml Component", - "homepage": "https://symfony.com", - "time": "2017-01-03 13:51:32" - }, - { - "name": "twig/twig", - "version": "v1.31.0", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "ddc9e3e20ee9c0b6908f401ac8353635b750eca7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/ddc9e3e20ee9c0b6908f401ac8353635b750eca7", - "reference": "ddc9e3e20ee9c0b6908f401ac8353635b750eca7", - "shasum": "" - }, - "require": { - "php": ">=5.2.7" - }, - "require-dev": { - "symfony/debug": "~2.7", - "symfony/phpunit-bridge": "~3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.31-dev" - } - }, - "autoload": { - "psr-0": { - "Twig_": "lib/" - } - }, - "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": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - }, - { - "name": "Twig Team", - "homepage": "http://twig.sensiolabs.org/contributors", - "role": "Contributors" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "http://twig.sensiolabs.org", - "keywords": [ - "templating" - ], - "time": "2017-01-11 19:36:15" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": { - "fguillot/json-rpc": 0 - }, - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": "~5.6|~7.0" - }, - "platform-dev": [] -} diff --git a/docs/BasicUsage/Configuration.md b/docs/BasicUsage/Configuration.md index dd2d049..8911185 100755 --- a/docs/BasicUsage/Configuration.md +++ b/docs/BasicUsage/Configuration.md @@ -32,6 +32,29 @@ The recommended configuration is when you have an default and an admin configura ] ``` +if you want to change the path schme, for example if your domain is not webuntis.com you can use this config. The keywords {school} and {server} will be replaced with the server name and school, you can also leave them out if you don't have such a thing. In summary you can build your own domain/url. + +```php + 'default' => [ + //f.e. thalia, cissa etc. + 'server' => 'yourserver', + 'school' => 'yourschool', + 'username' => 'yourusername', + 'password' => 'yourpassword', + //this is the default path scheme + 'path_scheme' => 'https://{server}.webuntis.com/WebUntis/jsonrpc.do?school={school}' + ], + 'admin' => [ + //f.e. thalia, cissa etc. + 'server' => 'yourserver', + 'school' => 'yourschool', + 'username' => 'youradminusername', + 'password' => 'youradminpassword', + //this is the default path scheme + 'path_scheme' => 'https://{server}.webuntis.com/WebUntis/jsonrpc.do?school={school}' + ] +``` + if you want to turn off caching (which is not recommended) take this configuration: ```php diff --git a/src/Webuntis.php b/src/Webuntis.php index 139facf..cd9e927 100755 --- a/src/Webuntis.php +++ b/src/Webuntis.php @@ -60,7 +60,7 @@ class Webuntis { /** * @var string */ - const PATH_SCHEME = 'https://{server}.webuntis.com/WebUntis/jsonrpc.do?school='; + const DEFAULT_PATH_SCHEME = 'https://{server}.webuntis.com/WebUntis/jsonrpc.do?school={school}'; /** * @var array @@ -72,7 +72,13 @@ class Webuntis { * @param array $config */ public function __construct(array $config) { - $this->path = str_replace('{server}', $config['server'], static::PATH_SCHEME) . $config['school']; + + $pathScheme = static::DEFAULT_PATH_SCHEME; + + if(isset($config['path_scheme'])) { + $pathScheme = $config['path_scheme']; + } + $this->path = str_replace(['{server}', '{school}'], [$config['server'], $config['school']], $pathScheme); $this->user['username'] = $config['username']; $this->user['password'] = $config['password'];