From 1d3e8e31173e97d3c4c15203caee6ccb48076ce7 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 15 Apr 2016 21:38:56 -0400 Subject: [PATCH] initial commit --- .env-testing | 19 + .gitignore | 2 + README.md | 3 + codeception.yml | 21 + composer.json | 23 + composer.lock | 3625 +++++++++++++++++ database/migrations/.gitkeep | 0 .../2014_10_12_000000_create_users_table.php | 34 + ...12_100000_create_password_resets_table.php | 31 + ...15_11_07_012716_create_parseabc_tables.php | 135 + .../2016_03_06_021725_create_jobs_table.php | 37 + ..._03_06_021806_create_failed_jobs_table.php | 33 + src/AbstractBuilder.php | 31 + src/Factory.php | 23 + src/Interfaces/Builder.php | 26 + src/Interfaces/Exporter.php | 9 + src/Interfaces/Manipulator.php | 9 + src/Models/Arr/Abc.php | 93 + src/Models/Laravel5/Abc.php | 133 + src/Models/Laravel5/AttributesTrait.php | 75 + src/Models/Laravel5/Collection.php | 228 ++ src/Models/Laravel5/CollectionAttribute.php | 190 + src/Models/Laravel5/Person.php | 34 + src/Models/Laravel5/Tune.php | 121 + src/Models/Laravel5/TuneAttribute.php | 134 + src/Models/Laravel5/TuneSetting.php | 168 + src/Models/Laravel5/TuneSettingAttribute.php | 145 + src/Models/Laravel5/ValidatingModel.php | 28 + src/Models/Memory/Abc.php | 67 + src/Models/Memory/BaseIterator.php | 113 + src/Models/Memory/BaseObject.php | 34 + src/Models/Memory/Person.php | 130 + src/Models/Memory/Setting.php | 281 ++ src/Models/Memory/Tune.php | 254 ++ src/Models/Memory/TuneCollection.php | 271 ++ src/Parser.php | 149 + src/Traits/ValidationTrait.php | 60 + tests/_bootstrap.php | 4 + tests/_data/abc/valid_abc_1.abc | 9 + tests/_data/abc/valid_abc_2.abc | 28 + tests/_data/abc/valid_abc_3.abc | 19 + tests/_data/dump.sql | 1 + tests/_support/AcceptanceTester.php | 26 + tests/_support/FunctionalTester.php | 26 + tests/_support/Helper/Acceptance.php | 10 + tests/_support/Helper/ExtraAsserts.php | 36 + tests/_support/Helper/Functional.php | 10 + tests/_support/Helper/Unit.php | 10 + tests/_support/UnitTester.php | 26 + .../_generated/AcceptanceTesterActions.php | 2173 ++++++++++ .../_generated/FunctionalTesterActions.php | 2861 +++++++++++++ .../_support/_generated/UnitTesterActions.php | 391 ++ tests/acceptance.suite.yml | 12 + tests/acceptance/_bootstrap.php | 2 + tests/functional.suite.yml | 13 + tests/functional/_bootstrap.php | 2 + tests/functional/laravel5/AbcParserCest.php | 160 + tests/functional/laravel5/CollectionCest.php | 20 + .../functional/laravel5/TuneAttributeCest.php | 28 + tests/unit.suite.yml | 10 + tests/unit/AbcParserCest.php | 78 + tests/unit/Laravel5/AbcParserCest.php | 156 + .../unit/Laravel5/CollectionAttributeTest.php | 155 + tests/unit/Laravel5/CollectionTest.php | 522 +++ tests/unit/Laravel5/PersonTest.php | 86 + tests/unit/Laravel5/TuneAttributeTest.php | 156 + .../Laravel5/TuneSettingAttributeTest.php | 156 + tests/unit/Laravel5/TuneSettingTest.php | 378 ++ tests/unit/Laravel5/TuneTest.php | 319 ++ .../unit/Laravel5/factories/ModelFactory.php | 56 + .../Laravel5/factories/TuneSettingFactory.php | 24 + tests/unit/_bootstrap.php | 2 + tests/unit/arr/AbcParserCest.php | 154 + tests/unit/memory/AbcParserTest.php | 158 + tests/unit/memory/PabcTest.php | 104 + tests/unit/memory/PersonTest.php | 189 + tests/unit/memory/SettingTest.php | 364 ++ tests/unit/memory/TuneCollectionTest.php | 210 + tests/unit/memory/TuneTest.php | 310 ++ 79 files changed, 16223 insertions(+) create mode 100644 .env-testing create mode 100644 .gitignore create mode 100644 README.md create mode 100644 codeception.yml create mode 100644 composer.json create mode 100644 composer.lock create mode 100644 database/migrations/.gitkeep create mode 100644 database/migrations/2014_10_12_000000_create_users_table.php create mode 100644 database/migrations/2014_10_12_100000_create_password_resets_table.php create mode 100644 database/migrations/2015_11_07_012716_create_parseabc_tables.php create mode 100644 database/migrations/2016_03_06_021725_create_jobs_table.php create mode 100644 database/migrations/2016_03_06_021806_create_failed_jobs_table.php create mode 100644 src/AbstractBuilder.php create mode 100644 src/Factory.php create mode 100644 src/Interfaces/Builder.php create mode 100644 src/Interfaces/Exporter.php create mode 100644 src/Interfaces/Manipulator.php create mode 100644 src/Models/Arr/Abc.php create mode 100644 src/Models/Laravel5/Abc.php create mode 100644 src/Models/Laravel5/AttributesTrait.php create mode 100644 src/Models/Laravel5/Collection.php create mode 100644 src/Models/Laravel5/CollectionAttribute.php create mode 100644 src/Models/Laravel5/Person.php create mode 100644 src/Models/Laravel5/Tune.php create mode 100644 src/Models/Laravel5/TuneAttribute.php create mode 100644 src/Models/Laravel5/TuneSetting.php create mode 100644 src/Models/Laravel5/TuneSettingAttribute.php create mode 100644 src/Models/Laravel5/ValidatingModel.php create mode 100644 src/Models/Memory/Abc.php create mode 100644 src/Models/Memory/BaseIterator.php create mode 100644 src/Models/Memory/BaseObject.php create mode 100644 src/Models/Memory/Person.php create mode 100644 src/Models/Memory/Setting.php create mode 100644 src/Models/Memory/Tune.php create mode 100644 src/Models/Memory/TuneCollection.php create mode 100644 src/Parser.php create mode 100644 src/Traits/ValidationTrait.php create mode 100644 tests/_bootstrap.php create mode 100644 tests/_data/abc/valid_abc_1.abc create mode 100644 tests/_data/abc/valid_abc_2.abc create mode 100644 tests/_data/abc/valid_abc_3.abc create mode 100644 tests/_data/dump.sql create mode 100644 tests/_support/AcceptanceTester.php create mode 100644 tests/_support/FunctionalTester.php create mode 100644 tests/_support/Helper/Acceptance.php create mode 100644 tests/_support/Helper/ExtraAsserts.php create mode 100644 tests/_support/Helper/Functional.php create mode 100644 tests/_support/Helper/Unit.php create mode 100644 tests/_support/UnitTester.php create mode 100644 tests/_support/_generated/AcceptanceTesterActions.php create mode 100644 tests/_support/_generated/FunctionalTesterActions.php create mode 100644 tests/_support/_generated/UnitTesterActions.php create mode 100644 tests/acceptance.suite.yml create mode 100644 tests/acceptance/_bootstrap.php create mode 100644 tests/functional.suite.yml create mode 100644 tests/functional/_bootstrap.php create mode 100644 tests/functional/laravel5/AbcParserCest.php create mode 100644 tests/functional/laravel5/CollectionCest.php create mode 100644 tests/functional/laravel5/TuneAttributeCest.php create mode 100644 tests/unit.suite.yml create mode 100644 tests/unit/AbcParserCest.php create mode 100644 tests/unit/Laravel5/AbcParserCest.php create mode 100644 tests/unit/Laravel5/CollectionAttributeTest.php create mode 100644 tests/unit/Laravel5/CollectionTest.php create mode 100644 tests/unit/Laravel5/PersonTest.php create mode 100644 tests/unit/Laravel5/TuneAttributeTest.php create mode 100644 tests/unit/Laravel5/TuneSettingAttributeTest.php create mode 100644 tests/unit/Laravel5/TuneSettingTest.php create mode 100644 tests/unit/Laravel5/TuneTest.php create mode 100644 tests/unit/Laravel5/factories/ModelFactory.php create mode 100644 tests/unit/Laravel5/factories/TuneSettingFactory.php create mode 100644 tests/unit/_bootstrap.php create mode 100644 tests/unit/arr/AbcParserCest.php create mode 100644 tests/unit/memory/AbcParserTest.php create mode 100644 tests/unit/memory/PabcTest.php create mode 100644 tests/unit/memory/PersonTest.php create mode 100644 tests/unit/memory/SettingTest.php create mode 100644 tests/unit/memory/TuneCollectionTest.php create mode 100644 tests/unit/memory/TuneTest.php diff --git a/.env-testing b/.env-testing new file mode 100644 index 0000000..eaef9b0 --- /dev/null +++ b/.env-testing @@ -0,0 +1,19 @@ +APP_ENV=local +APP_DEBUG=true +APP_KEY=S6JJudOP9dL7UMcES84rim02cW2tKKQl + +DB_HOST=localhost +DB_DATABASE=abc-api +DB_USERNAME=abc-api +DB_PASSWORD=sio2nf0d + +#CACHE_DRIVER=file +#SESSION_DRIVER=file +#QUEUE_DRIVER=sync + +#MAIL_DRIVER=smtp +#MAIL_HOST=mailtrap.io +#AIL_PORT=2525 +#MAIL_USERNAME=null +#MAIL_PASSWORD=null +#MAIL_ENCRYPTION=null diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f417e74 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/.idea +/vendor diff --git a/README.md b/README.md new file mode 100644 index 0000000..6809f17 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +AbcParser Library + +convert abc music to and from php objects \ No newline at end of file diff --git a/codeception.yml b/codeception.yml new file mode 100644 index 0000000..3a8fca8 --- /dev/null +++ b/codeception.yml @@ -0,0 +1,21 @@ +actor: Tester +paths: + tests: tests + log: tests/_output + data: tests/_data + support: tests/_support + envs: tests/_envs +settings: + bootstrap: _bootstrap.php + colors: true + memory_limit: 1024M +extensions: + enabled: + - Codeception\Extension\RunFailed +modules: + config: + Db: + dsn: '' + user: '' + password: '' + dump: tests/_data/dump.sql diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..1c08e6f --- /dev/null +++ b/composer.json @@ -0,0 +1,23 @@ +{ + "name": "xai-corp/abc-parser", + "description": "convert abc music to and from php objects", + "minimum-stability": "stable", + "license": "proprietary", + "authors": [ + { + "name": "Richard Morgan", + "email": "richard@xai-corp.net" + } + ], + "require": { + "codeception/codeception": "2.1.6", + "laravel/laravel": "^5.2", + "aedart/testing-laravel": "1.6.*" + }, + "autoload": { + "psr-4": { + "XaiCorp\\AbcParser\\": "src/" + } + } + +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..2f7025e --- /dev/null +++ b/composer.lock @@ -0,0 +1,3625 @@ +{ + "_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": "595334937903fee0b5963d39ace649c5", + "content-hash": "c085143f5b8abf98dc7f105acef9b0bb", + "packages": [ + { + "name": "aedart/testing-laravel", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/aedart/testing-laravel.git", + "reference": "3613aabadd8ec9112607d9cb411741078958be22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aedart/testing-laravel/zipball/3613aabadd8ec9112607d9cb411741078958be22", + "reference": "3613aabadd8ec9112607d9cb411741078958be22", + "shasum": "" + }, + "require": { + "codeception/codeception": "~2.1", + "fzaninotto/faker": "~1.5", + "mockery/mockery": "~0.9", + "orchestra/testbench": "~3.2", + "php": ">=5.5.9" + }, + "require-dev": { + "aedart/license": "1.*", + "aedart/license-file-manager": "~1.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Aedart\\Testing\\Laravel\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Alin Eugen Deac", + "email": "aedart@gmail.com" + } + ], + "description": "Utilities that allows you to test Laravel dependent packages. At its core, this package is a wrapper for the Orchestral Testbench. However, you can make use of this with whatever testing framework you wish; it does not impose you to use neither Orchestral's nor Laravel's TestCase classes.", + "homepage": "https://github.com/aedart/testing-laravel", + "keywords": [ + "laravel", + "orchestral", + "testing" + ], + "time": "2016-01-03 12:05:20" + }, + { + "name": "classpreloader/classpreloader", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/ClassPreloader/ClassPreloader.git", + "reference": "9b10b913c2bdf90c3d2e0d726b454fb7f77c552a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ClassPreloader/ClassPreloader/zipball/9b10b913c2bdf90c3d2e0d726b454fb7f77c552a", + "reference": "9b10b913c2bdf90c3d2e0d726b454fb7f77c552a", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^1.0|^2.0", + "php": ">=5.5.9" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "ClassPreloader\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com" + } + ], + "description": "Helps class loading performance by generating a single PHP file containing all of the autoloaded files for a specific use case", + "keywords": [ + "autoload", + "class", + "preload" + ], + "time": "2015-11-09 22:51:51" + }, + { + "name": "codeception/codeception", + "version": "2.1.6", + "source": { + "type": "git", + "url": "https://github.com/Codeception/Codeception.git", + "reference": "b199941f5e59d1e7fd32d78296c8ab98db873d89" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Codeception/Codeception/zipball/b199941f5e59d1e7fd32d78296c8ab98db873d89", + "reference": "b199941f5e59d1e7fd32d78296c8ab98db873d89", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "facebook/webdriver": ">=1.0.1", + "guzzlehttp/guzzle": ">=4.1.4 <7.0", + "guzzlehttp/psr7": "~1.0", + "php": ">=5.4.0", + "phpunit/phpunit": "~4.8.0", + "symfony/browser-kit": ">=2.4|<3.1", + "symfony/console": ">=2.4|<3.1", + "symfony/css-selector": ">=2.4|<3.1", + "symfony/dom-crawler": ">=2.4|<3.1", + "symfony/event-dispatcher": ">=2.4|<3.1", + "symfony/finder": ">=2.4|<3.1", + "symfony/yaml": ">=2.4|<3.1" + }, + "require-dev": { + "codeception/specify": "~0.3", + "facebook/php-sdk-v4": "~4.0", + "flow/jsonpath": "~0.2", + "monolog/monolog": "~1.8", + "pda/pheanstalk": "~2.0", + "videlalvaro/php-amqplib": "~2.4" + }, + "suggest": { + "codeception/phpbuiltinserver": "Extension to start and stop PHP built-in web server for your tests", + "codeception/specify": "BDD-style code blocks", + "codeception/verify": "BDD-style assertions", + "monolog/monolog": "Log test steps", + "phpseclib/phpseclib": "Extension required to use the SFTP option in the FTP Module." + }, + "bin": [ + "codecept" + ], + "type": "library", + "extra": { + "branch-alias": [] + }, + "autoload": { + "psr-4": { + "Codeception\\": "src\\Codeception", + "Codeception\\Extension\\": "ext" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Bodnarchuk", + "email": "davert@mail.ua", + "homepage": "http://codegyre.com" + } + ], + "description": "BDD-style testing framework", + "homepage": "http://codeception.com/", + "keywords": [ + "BDD", + "TDD", + "acceptance testing", + "functional testing", + "unit testing" + ], + "time": "2016-02-09 22:27:48" + }, + { + "name": "dnoegel/php-xdg-base-dir", + "version": "0.1", + "source": { + "type": "git", + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/265b8593498b997dc2d31e75b89f053b5cc9621a", + "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "@stable" + }, + "type": "project", + "autoload": { + "psr-4": { + "XdgBaseDir\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "implementation of xdg base directory specification for php", + "time": "2014-10-24 07:27:01" + }, + { + "name": "doctrine/inflector", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Inflector\\": "lib/" + } + }, + "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": "Common String Manipulations with regard to casing and singular/plural rules.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "inflection", + "pluralize", + "singularize", + "string" + ], + "time": "2015-11-06 14:35:42" + }, + { + "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": "facebook/webdriver", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/facebook/php-webdriver.git", + "reference": "1c98108ba3eb435b681655764de11502a0653705" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/1c98108ba3eb435b681655764de11502a0653705", + "reference": "1c98108ba3eb435b681655764de11502a0653705", + "shasum": "" + }, + "require": { + "php": ">=5.3.19" + }, + "require-dev": { + "phpunit/phpunit": "4.6.*" + }, + "suggest": { + "phpdocumentor/phpdocumentor": "2.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "Facebook\\WebDriver\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "description": "A PHP client for WebDriver", + "homepage": "https://github.com/facebook/php-webdriver", + "keywords": [ + "facebook", + "php", + "selenium", + "webdriver" + ], + "time": "2015-12-31 15:58:49" + }, + { + "name": "fzaninotto/faker", + "version": "v1.5.0", + "source": { + "type": "git", + "url": "https://github.com/fzaninotto/Faker.git", + "reference": "d0190b156bcca848d401fb80f31f504f37141c8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/d0190b156bcca848d401fb80f31f504f37141c8d", + "reference": "d0190b156bcca848d401fb80f31f504f37141c8d", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "suggest": { + "ext-intl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5.x-dev" + } + }, + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "time": "2015-05-29 06:29:14" + }, + { + "name": "guzzlehttp/guzzle", + "version": "6.2.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "d094e337976dff9d8e2424e8485872194e768662" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d094e337976dff9d8e2424e8485872194e768662", + "reference": "d094e337976dff9d8e2424e8485872194e768662", + "shasum": "" + }, + "require": { + "guzzlehttp/promises": "~1.0", + "guzzlehttp/psr7": "~1.1", + "php": ">=5.5.0" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "~4.0", + "psr/log": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.2-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2016-03-21 20:02:09" + }, + { + "name": "guzzlehttp/promises", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "bb9024c526b22f3fe6ae55a561fd70653d470aa8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/bb9024c526b22f3fe6ae55a561fd70653d470aa8", + "reference": "bb9024c526b22f3fe6ae55a561fd70653d470aa8", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-03-08 01:15:46" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "2e89629ff057ebb49492ba08e6995d3a6a80021b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/2e89629ff057ebb49492ba08e6995d3a6a80021b", + "reference": "2e89629ff057ebb49492ba08e6995d3a6a80021b", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "PSR-7 message implementation", + "keywords": [ + "http", + "message", + "stream", + "uri" + ], + "time": "2016-02-18 21:54:00" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v1.2.2", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/b37020aa976fa52d3de9aa904aa2522dc518f79c", + "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "1.3.3", + "satooshi/php-coveralls": "dev-master" + }, + "type": "library", + "autoload": { + "classmap": [ + "hamcrest" + ], + "files": [ + "hamcrest/Hamcrest.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "time": "2015-05-11 14:41:42" + }, + { + "name": "jakub-onderka/php-console-color", + "version": "0.1", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", + "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1", + "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "jakub-onderka/php-code-style": "1.0", + "jakub-onderka/php-parallel-lint": "0.*", + "jakub-onderka/php-var-dump-check": "0.*", + "phpunit/phpunit": "3.7.*", + "squizlabs/php_codesniffer": "1.*" + }, + "type": "library", + "autoload": { + "psr-0": { + "JakubOnderka\\PhpConsoleColor": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "jakub.onderka@gmail.com", + "homepage": "http://www.acci.cz" + } + ], + "time": "2014-04-08 15:00:19" + }, + { + "name": "jakub-onderka/php-console-highlighter", + "version": "v0.3.2", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", + "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/7daa75df45242c8d5b75a22c00a201e7954e4fb5", + "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5", + "shasum": "" + }, + "require": { + "jakub-onderka/php-console-color": "~0.1", + "php": ">=5.3.0" + }, + "require-dev": { + "jakub-onderka/php-code-style": "~1.0", + "jakub-onderka/php-parallel-lint": "~0.5", + "jakub-onderka/php-var-dump-check": "~0.1", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "type": "library", + "autoload": { + "psr-0": { + "JakubOnderka\\PhpConsoleHighlighter": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "acci@acci.cz", + "homepage": "http://www.acci.cz/" + } + ], + "time": "2015-04-20 18:58:01" + }, + { + "name": "jeremeamia/SuperClosure", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/jeremeamia/super_closure.git", + "reference": "29a88be2a4846d27c1613aed0c9071dfad7b5938" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jeremeamia/super_closure/zipball/29a88be2a4846d27c1613aed0c9071dfad7b5938", + "reference": "29a88be2a4846d27c1613aed0c9071dfad7b5938", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^1.2|^2.0", + "php": ">=5.4", + "symfony/polyfill-php56": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "autoload": { + "psr-4": { + "SuperClosure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia", + "role": "Developer" + } + ], + "description": "Serialize Closure objects, including their context and binding", + "homepage": "https://github.com/jeremeamia/super_closure", + "keywords": [ + "closure", + "function", + "lambda", + "parser", + "serializable", + "serialize", + "tokenizer" + ], + "time": "2015-12-05 17:17:57" + }, + { + "name": "laravel/framework", + "version": "v5.2.26", + "source": { + "type": "git", + "url": "https://github.com/laravel/framework.git", + "reference": "b73ac62506c5c2bd49d87fcb1089f7759431e173" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/framework/zipball/b73ac62506c5c2bd49d87fcb1089f7759431e173", + "reference": "b73ac62506c5c2bd49d87fcb1089f7759431e173", + "shasum": "" + }, + "require": { + "classpreloader/classpreloader": "~3.0", + "doctrine/inflector": "~1.0", + "ext-mbstring": "*", + "ext-openssl": "*", + "jeremeamia/superclosure": "~2.2", + "league/flysystem": "~1.0", + "monolog/monolog": "~1.11", + "mtdowling/cron-expression": "~1.0", + "nesbot/carbon": "~1.20", + "paragonie/random_compat": "~1.4", + "php": ">=5.5.9", + "psy/psysh": "0.7.*", + "swiftmailer/swiftmailer": "~5.1", + "symfony/console": "2.8.*|3.0.*", + "symfony/debug": "2.8.*|3.0.*", + "symfony/finder": "2.8.*|3.0.*", + "symfony/http-foundation": "2.8.*|3.0.*", + "symfony/http-kernel": "2.8.*|3.0.*", + "symfony/polyfill-php56": "~1.0", + "symfony/process": "2.8.*|3.0.*", + "symfony/routing": "2.8.*|3.0.*", + "symfony/translation": "2.8.*|3.0.*", + "symfony/var-dumper": "2.8.*|3.0.*", + "vlucas/phpdotenv": "~2.2" + }, + "replace": { + "illuminate/auth": "self.version", + "illuminate/broadcasting": "self.version", + "illuminate/bus": "self.version", + "illuminate/cache": "self.version", + "illuminate/config": "self.version", + "illuminate/console": "self.version", + "illuminate/container": "self.version", + "illuminate/contracts": "self.version", + "illuminate/cookie": "self.version", + "illuminate/database": "self.version", + "illuminate/encryption": "self.version", + "illuminate/events": "self.version", + "illuminate/exception": "self.version", + "illuminate/filesystem": "self.version", + "illuminate/hashing": "self.version", + "illuminate/http": "self.version", + "illuminate/log": "self.version", + "illuminate/mail": "self.version", + "illuminate/pagination": "self.version", + "illuminate/pipeline": "self.version", + "illuminate/queue": "self.version", + "illuminate/redis": "self.version", + "illuminate/routing": "self.version", + "illuminate/session": "self.version", + "illuminate/support": "self.version", + "illuminate/translation": "self.version", + "illuminate/validation": "self.version", + "illuminate/view": "self.version" + }, + "require-dev": { + "aws/aws-sdk-php": "~3.0", + "mockery/mockery": "~0.9.2", + "pda/pheanstalk": "~3.0", + "phpunit/phpunit": "~4.1", + "predis/predis": "~1.0", + "symfony/css-selector": "2.8.*|3.0.*", + "symfony/dom-crawler": "2.8.*|3.0.*" + }, + "suggest": { + "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.4).", + "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", + "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~5.3|~6.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", + "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).", + "predis/predis": "Required to use the redis cache and queue drivers (~1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0).", + "symfony/css-selector": "Required to use some of the crawler integration testing tools (2.8.*|3.0.*).", + "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (2.8.*|3.0.*)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/Illuminate/Queue/IlluminateQueueClosure.php" + ], + "files": [ + "src/Illuminate/Foundation/helpers.php", + "src/Illuminate/Support/helpers.php" + ], + "psr-4": { + "Illuminate\\": "src/Illuminate/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Laravel Framework.", + "homepage": "http://laravel.com", + "keywords": [ + "framework", + "laravel" + ], + "time": "2016-03-25 17:12:52" + }, + { + "name": "laravel/laravel", + "version": "v5.2.24", + "source": { + "type": "git", + "url": "https://github.com/laravel/laravel.git", + "reference": "1d5e88d0fb687d8ea57a85f9e5d11e7e63685ae2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/laravel/zipball/1d5e88d0fb687d8ea57a85f9e5d11e7e63685ae2", + "reference": "1d5e88d0fb687d8ea57a85f9e5d11e7e63685ae2", + "shasum": "" + }, + "require": { + "laravel/framework": "5.2.*", + "php": ">=5.5.9" + }, + "require-dev": { + "fzaninotto/faker": "~1.4", + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "~4.0", + "symfony/css-selector": "2.8.*|3.0.*", + "symfony/dom-crawler": "2.8.*|3.0.*" + }, + "type": "project", + "autoload": { + "classmap": [ + "database" + ], + "psr-4": { + "App\\": "app/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "The Laravel Framework.", + "keywords": [ + "framework", + "laravel" + ], + "time": "2016-03-22 18:49:35" + }, + { + "name": "league/flysystem", + "version": "1.0.20", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "e87a786e3ae12a25cf78a71bb07b4b384bfaa83a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/e87a786e3ae12a25cf78a71bb07b4b384bfaa83a", + "reference": "e87a786e3ae12a25cf78a71bb07b4b384bfaa83a", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "ext-fileinfo": "*", + "mockery/mockery": "~0.9", + "phpspec/phpspec": "^2.2", + "phpunit/phpunit": "~4.8 || ~5.0" + }, + "suggest": { + "ext-fileinfo": "Required for MimeType", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-copy": "Allows you to use Copy.com storage", + "league/flysystem-dropbox": "Allows you to use Dropbox storage", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ], + "time": "2016-03-14 21:54:11" + }, + { + "name": "mockery/mockery", + "version": "0.9.4", + "source": { + "type": "git", + "url": "https://github.com/padraic/mockery.git", + "reference": "70bba85e4aabc9449626651f48b9018ede04f86b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/padraic/mockery/zipball/70bba85e4aabc9449626651f48b9018ede04f86b", + "reference": "70bba85e4aabc9449626651f48b9018ede04f86b", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "~1.1", + "lib-pcre": ">=7.0", + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.9.x-dev" + } + }, + "autoload": { + "psr-0": { + "Mockery": "library/" + } + }, + "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": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", + "homepage": "http://github.com/padraic/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "time": "2015-04-02 19:54:00" + }, + { + "name": "monolog/monolog", + "version": "1.18.1", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "a5f2734e8c16f3aa21b3da09715d10e15b4d2d45" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/a5f2734e8c16f3aa21b3da09715d10e15b4d2d45", + "reference": "a5f2734e8c16f3aa21b3da09715d10e15b4d2d45", + "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", + "doctrine/couchdb": "~1.0@dev", + "graylog2/gelf-php": "~1.0", + "jakub-onderka/php-parallel-lint": "0.9", + "php-console/php-console": "^3.1.3", + "phpunit/phpunit": "~4.5", + "phpunit/phpunit-mock-objects": "2.3.0", + "raven/raven": "^0.13", + "ruflin/elastica": ">=0.90 <3.0", + "swiftmailer/swiftmailer": "~5.3", + "videlalvaro/php-amqplib": "~2.4" + }, + "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-console/php-console": "Allow sending log messages to Google Chrome", + "raven/raven": "Allow sending log messages to a Sentry server", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "videlalvaro/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib" + }, + "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": "2016-03-13 16:08:35" + }, + { + "name": "mtdowling/cron-expression", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/mtdowling/cron-expression.git", + "reference": "c9ee7886f5a12902b225a1a12f36bb45f9ab89e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mtdowling/cron-expression/zipball/c9ee7886f5a12902b225a1a12f36bb45f9ab89e5", + "reference": "c9ee7886f5a12902b225a1a12f36bb45f9ab89e5", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "Cron": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", + "keywords": [ + "cron", + "schedule" + ], + "time": "2016-01-26 21:23:30" + }, + { + "name": "nesbot/carbon", + "version": "1.21.0", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "7b08ec6f75791e130012f206e3f7b0e76e18e3d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7b08ec6f75791e130012f206e3f7b0e76e18e3d7", + "reference": "7b08ec6f75791e130012f206e3f7b0e76e18e3d7", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "symfony/translation": "~2.6|~3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "http://nesbot.com" + } + ], + "description": "A simple API extension for DateTime.", + "homepage": "http://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "time": "2015-11-04 20:07:17" + }, + { + "name": "nikic/php-parser", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "ce5be709d59b32dd8a88c80259028759991a4206" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ce5be709d59b32dd8a88c80259028759991a4206", + "reference": "ce5be709d59b32dd8a88c80259028759991a4206", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.4" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "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": "2016-02-28 19:48:28" + }, + { + "name": "orchestra/database", + "version": "v3.2.2", + "source": { + "type": "git", + "url": "https://github.com/orchestral/database.git", + "reference": "7bdcd44a722dd1afb9ad7fe1f2154059e325b275" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/orchestral/database/zipball/7bdcd44a722dd1afb9ad7fe1f2154059e325b275", + "reference": "7bdcd44a722dd1afb9ad7fe1f2154059e325b275", + "shasum": "" + }, + "require": { + "illuminate/contracts": "~5.2.0", + "illuminate/database": "~5.2.0", + "php": ">=5.5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Orchestra\\Database\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mior Muhammad Zaki", + "email": "crynobone@gmail.com", + "homepage": "https://github.com/crynobone" + }, + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com", + "homepage": "https://github.com/taylorotwell" + } + ], + "description": "Database Component for Orchestra Platform", + "keywords": [ + "database", + "orchestra-platform", + "orchestral" + ], + "time": "2016-03-01 13:50:22" + }, + { + "name": "orchestra/testbench", + "version": "v3.2.3", + "source": { + "type": "git", + "url": "https://github.com/orchestral/testbench.git", + "reference": "86e105a11087a91dc5a863ed82a9a185bdb2716a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/orchestral/testbench/zipball/86e105a11087a91dc5a863ed82a9a185bdb2716a", + "reference": "86e105a11087a91dc5a863ed82a9a185bdb2716a", + "shasum": "" + }, + "require": { + "fzaninotto/faker": "~1.4", + "laravel/framework": "~5.2.15", + "orchestra/database": "~3.2.0", + "php": ">=5.5.0", + "symfony/css-selector": "2.8.*|3.0.*", + "symfony/dom-crawler": "2.8.*|3.0.*" + }, + "require-dev": { + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "~4.0|~5.0" + }, + "suggest": { + "phpunit/phpunit": "Allow to use PHPUnit for testing your Laravel Application/Package (~4.0|~5.0)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Orchestra\\Testbench\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mior Muhammad Zaki", + "email": "crynobone@gmail.com", + "homepage": "https://github.com/crynobone" + } + ], + "description": "Laravel Package Unit Testing Helper", + "homepage": "http://orchestraplatform.com/docs/latest/components/testbench/", + "keywords": [ + "BDD", + "TDD", + "laravel", + "orchestra-platform", + "orchestral", + "testing" + ], + "time": "2016-03-04 01:20:59" + }, + { + "name": "paragonie/random_compat", + "version": "v1.4.1", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "c7e26a21ba357863de030f0b9e701c7d04593774" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/c7e26a21ba357863de030f0b9e701c7d04593774", + "reference": "c7e26a21ba357863de030f0b9e701c7d04593774", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "pseudorandom", + "random" + ], + "time": "2016-03-18 20:34:03" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "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": "2015-02-03 12:10:50" + }, + { + "name": "phpspec/prophecy", + "version": "v1.6.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "3c91bdf81797d725b14cb62906f9a4ce44235972" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/3c91bdf81797d725b14cb62906f9a4ce44235972", + "reference": "3c91bdf81797d725b14cb62906f9a4ce44235972", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "~2.0", + "sebastian/comparator": "~1.1", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "phpspec/phpspec": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2016-02-15 07:46:21" + }, + { + "name": "phpunit/php-code-coverage", + "version": "2.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2015-10-06 15:47:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2015-06-21 13:08:43" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21 13:50:34" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b", + "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2015-06-21 08:01:12" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2015-09-15 10:49:45" + }, + { + "name": "phpunit/phpunit", + "version": "4.8.24", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "a1066c562c52900a142a0e2bbf0582994671385e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1066c562c52900a142a0e2bbf0582994671385e", + "reference": "a1066c562c52900a142a0e2bbf0582994671385e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "~2.1", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": ">=1.0.6", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.1", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.3", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.8.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2016-03-14 06:16:08" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "2.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2015-10-02 06:51:40" + }, + { + "name": "psr/http-message", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2015-05-04 20:22:00" + }, + { + "name": "psr/log", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "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", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2012-12-21 11:40:51" + }, + { + "name": "psy/psysh", + "version": "v0.7.2", + "source": { + "type": "git", + "url": "https://github.com/bobthecow/psysh.git", + "reference": "e64e10b20f8d229cac76399e1f3edddb57a0f280" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/e64e10b20f8d229cac76399e1f3edddb57a0f280", + "reference": "e64e10b20f8d229cac76399e1f3edddb57a0f280", + "shasum": "" + }, + "require": { + "dnoegel/php-xdg-base-dir": "0.1", + "jakub-onderka/php-console-highlighter": "0.3.*", + "nikic/php-parser": "^1.2.1|~2.0", + "php": ">=5.3.9", + "symfony/console": "~2.3.10|^2.4.2|~3.0", + "symfony/var-dumper": "~2.7|~3.0" + }, + "require-dev": { + "fabpot/php-cs-fixer": "~1.5", + "phpunit/phpunit": "~3.7|~4.0|~5.0", + "squizlabs/php_codesniffer": "~2.0", + "symfony/finder": "~2.1|~3.0" + }, + "suggest": { + "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", + "ext-pdo-sqlite": "The doc command requires SQLite to work.", + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", + "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history." + }, + "bin": [ + "bin/psysh" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "0.8.x-dev" + } + }, + "autoload": { + "files": [ + "src/Psy/functions.php" + ], + "psr-4": { + "Psy\\": "src/Psy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Justin Hileman", + "email": "justin@justinhileman.info", + "homepage": "http://justinhileman.com" + } + ], + "description": "An interactive shell for modern PHP.", + "homepage": "http://psysh.org", + "keywords": [ + "REPL", + "console", + "interactive", + "shell" + ], + "time": "2016-03-09 05:03:14" + }, + { + "name": "sebastian/comparator", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2015-07-26 15:48:44" + }, + { + "name": "sebastian/diff", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2015-12-08 07:14:41" + }, + { + "name": "sebastian/environment", + "version": "1.3.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf", + "reference": "dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-02-26 18:40:46" + }, + { + "name": "sebastian/exporter", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "7ae5513327cb536431847bcc0c10edba2701064e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", + "reference": "7ae5513327cb536431847bcc0c10edba2701064e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2015-06-21 07:55:53" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12 03:26:01" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2015-11-11 19:50:13" + }, + { + "name": "sebastian/version", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2015-06-21 13:59:46" + }, + { + "name": "swiftmailer/swiftmailer", + "version": "v5.4.1", + "source": { + "type": "git", + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "0697e6aa65c83edf97bb0f23d8763f94e3f11421" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/0697e6aa65c83edf97bb0f23d8763f94e3f11421", + "reference": "0697e6aa65c83edf97bb0f23d8763f94e3f11421", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "mockery/mockery": "~0.9.1,<0.9.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "autoload": { + "files": [ + "lib/swift_required.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "http://swiftmailer.org", + "keywords": [ + "email", + "mail", + "mailer" + ], + "time": "2015-06-06 14:19:39" + }, + { + "name": "symfony/browser-kit", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/browser-kit.git", + "reference": "dde849a0485b70a24b36f826ed3fb95b904d80c3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/dde849a0485b70a24b36f826ed3fb95b904d80c3", + "reference": "dde849a0485b70a24b36f826ed3fb95b904d80c3", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/dom-crawler": "~2.8|~3.0" + }, + "require-dev": { + "symfony/css-selector": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0" + }, + "suggest": { + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\BrowserKit\\": "" + }, + "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 BrowserKit Component", + "homepage": "https://symfony.com", + "time": "2016-01-27 11:34:55" + }, + { + "name": "symfony/console", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "2ed5e2706ce92313d120b8fe50d1063bcfd12e04" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/2ed5e2706ce92313d120b8fe50d1063bcfd12e04", + "reference": "2ed5e2706ce92313d120b8fe50d1063bcfd12e04", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-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": "2016-02-28 16:24:34" + }, + { + "name": "symfony/css-selector", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "6605602690578496091ac20ec7a5cbd160d4dff4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/6605602690578496091ac20ec7a5cbd160d4dff4", + "reference": "6605602690578496091ac20ec7a5cbd160d4dff4", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony CssSelector Component", + "homepage": "https://symfony.com", + "time": "2016-01-27 05:14:46" + }, + { + "name": "symfony/debug", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "29606049ced1ec715475f88d1bbe587252a3476e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/29606049ced1ec715475f88d1bbe587252a3476e", + "reference": "29606049ced1ec715475f88d1bbe587252a3476e", + "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-01-27 05:14:46" + }, + { + "name": "symfony/dom-crawler", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/dom-crawler.git", + "reference": "981c8edb4538f88ba976ed44bdcaa683fce3d6c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/981c8edb4538f88ba976ed44bdcaa683fce3d6c6", + "reference": "981c8edb4538f88ba976ed44bdcaa683fce3d6c6", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "symfony/css-selector": "~2.8|~3.0" + }, + "suggest": { + "symfony/css-selector": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\DomCrawler\\": "" + }, + "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 DomCrawler Component", + "homepage": "https://symfony.com", + "time": "2016-02-28 16:24:34" + }, + { + "name": "symfony/event-dispatcher", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "4dd5df31a28c0f82b41cb1e1599b74b5dcdbdafa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4dd5df31a28c0f82b41cb1e1599b74b5dcdbdafa", + "reference": "4dd5df31a28c0f82b41cb1e1599b74b5dcdbdafa", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-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": "2016-01-27 05:14:46" + }, + { + "name": "symfony/finder", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "623bda0abd9aa29e529c8e9c08b3b84171914723" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/623bda0abd9aa29e529c8e9c08b3b84171914723", + "reference": "623bda0abd9aa29e529c8e9c08b3b84171914723", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-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": "2016-01-27 05:14:46" + }, + { + "name": "symfony/http-foundation", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "52065702c71743c05d415a8facfcad6d4257e8d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/52065702c71743c05d415a8facfcad6d4257e8d7", + "reference": "52065702c71743c05d415a8facfcad6d4257e8d7", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "symfony/expression-language": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "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 HttpFoundation Component", + "homepage": "https://symfony.com", + "time": "2016-02-28 16:24:34" + }, + { + "name": "symfony/http-kernel", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "59c0a1972e9aad87b7a56bbe1ccee26b7535a0db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/59c0a1972e9aad87b7a56bbe1ccee26b7535a0db", + "reference": "59c0a1972e9aad87b7a56bbe1ccee26b7535a0db", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/log": "~1.0", + "symfony/debug": "~2.8|~3.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/http-foundation": "~2.8|~3.0" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "require-dev": { + "symfony/browser-kit": "~2.8|~3.0", + "symfony/class-loader": "~2.8|~3.0", + "symfony/config": "~2.8|~3.0", + "symfony/console": "~2.8|~3.0", + "symfony/css-selector": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/dom-crawler": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/finder": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0", + "symfony/routing": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0", + "symfony/templating": "~2.8|~3.0", + "symfony/translation": "~2.8|~3.0", + "symfony/var-dumper": "~2.8|~3.0" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/class-loader": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "", + "symfony/finder": "", + "symfony/var-dumper": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "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 HttpKernel Component", + "homepage": "https://symfony.com", + "time": "2016-02-28 21:33:13" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "1289d16209491b584839022f29257ad859b8532d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/1289d16209491b584839022f29257ad859b8532d", + "reference": "1289d16209491b584839022f29257ad859b8532d", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-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-01-20 09:13:37" + }, + { + "name": "symfony/polyfill-php56", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php56.git", + "reference": "4d891fff050101a53a4caabb03277284942d1ad9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/4d891fff050101a53a4caabb03277284942d1ad9", + "reference": "4d891fff050101a53a4caabb03277284942d1ad9", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-util": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php56\\": "" + }, + "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 backporting some PHP 5.6+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2016-01-20 09:13:37" + }, + { + "name": "symfony/polyfill-util", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-util.git", + "reference": "8de62801aa12bc4dfcf85eef5d21981ae7bb3cc4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/8de62801aa12bc4dfcf85eef5d21981ae7bb3cc4", + "reference": "8de62801aa12bc4dfcf85eef5d21981ae7bb3cc4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Util\\": "" + } + }, + "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 utilities for portability of PHP codes", + "homepage": "https://symfony.com", + "keywords": [ + "compat", + "compatibility", + "polyfill", + "shim" + ], + "time": "2016-01-20 09:13:37" + }, + { + "name": "symfony/process", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "dfecef47506179db2501430e732adbf3793099c8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/dfecef47506179db2501430e732adbf3793099c8", + "reference": "dfecef47506179db2501430e732adbf3793099c8", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-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": "2016-02-02 13:44:19" + }, + { + "name": "symfony/routing", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "fa1e9a8173cf0077dd995205da453eacd758fdf6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/fa1e9a8173cf0077dd995205da453eacd758fdf6", + "reference": "fa1e9a8173cf0077dd995205da453eacd758fdf6", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "doctrine/common": "~2.2", + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/http-foundation": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation loader", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/dependency-injection": "For loading routes from a service", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "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 Routing Component", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "time": "2016-02-04 13:53:13" + }, + { + "name": "symfony/translation", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "2de0b6f7ebe43cffd8a06996ebec6aab79ea9e91" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/2de0b6f7ebe43cffd8a06996ebec6aab79ea9e91", + "reference": "2de0b6f7ebe43cffd8a06996ebec6aab79ea9e91", + "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-02-02 13:44:19" + }, + { + "name": "symfony/var-dumper", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "9a6a883c48acb215d4825ce9de61dccf93d62074" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/9a6a883c48acb215d4825ce9de61dccf93d62074", + "reference": "9a6a883c48acb215d4825ce9de61dccf93d62074", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "twig/twig": "~1.20|~2.0" + }, + "suggest": { + "ext-symfony_debug": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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 mechanism for exploring and dumping PHP variables", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "time": "2016-02-13 09:23:44" + }, + { + "name": "symfony/yaml", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "b5ba64cd67ecd6887f63868fa781ca094bd1377c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/b5ba64cd67ecd6887f63868fa781ca094bd1377c", + "reference": "b5ba64cd67ecd6887f63868fa781ca094bd1377c", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-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": "2016-02-23 15:16:06" + }, + { + "name": "vlucas/phpdotenv", + "version": "v2.2.0", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "9caf304153dc2288e4970caec6f1f3b3bc205412" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/9caf304153dc2288e4970caec6f1f3b3bc205412", + "reference": "9caf304153dc2288e4970caec6f1f3b3bc205412", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD" + ], + "authors": [ + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "http://www.vancelucas.com" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "homepage": "http://github.com/vlucas/phpdotenv", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "time": "2015-12-29 15:10:30" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/database/migrations/.gitkeep b/database/migrations/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php new file mode 100644 index 0000000..65d3d08 --- /dev/null +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -0,0 +1,34 @@ +increments('id'); + $table->string('name'); + $table->string('email')->unique(); + $table->string('password', 60); + $table->rememberToken(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('users'); + } +} diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php new file mode 100644 index 0000000..00057f9 --- /dev/null +++ b/database/migrations/2014_10_12_100000_create_password_resets_table.php @@ -0,0 +1,31 @@ +string('email')->index(); + $table->string('token')->index(); + $table->timestamp('created_at'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('password_resets'); + } +} diff --git a/database/migrations/2015_11_07_012716_create_parseabc_tables.php b/database/migrations/2015_11_07_012716_create_parseabc_tables.php new file mode 100644 index 0000000..eea6de2 --- /dev/null +++ b/database/migrations/2015_11_07_012716_create_parseabc_tables.php @@ -0,0 +1,135 @@ +bigIncrements('id'); + $table->string('name', 255)->unique(); + $table->timestamps(); + }); + Schema::create('collection_attributes', function (Blueprint $table) { + $table->bigInteger('collection_id')->unsigned(); + $table->enum('type', ['Author','Composer','Discography','Rhythm','History','File','Book','Note','Source','Transcriber']); + $table->string('string', 255); + $table->tinyInteger('ordering')->unsigned()->default(0); + $table->timestamps(); + $table->primary(['collection_id','type','ordering']); + $table->foreign('collection_id')->references('id')->on('collections')->onUpdate('cascade')->onDelete('cascade'); + }); + + // user profiles/roles/groups + // Schema::create('Groups', function (Blueprint $table) { + // $table->bigIncrements('id'); + // $table->string('name', 20); + // $table->string('description', 100); + // $table->timestamps(); + // }); + + Schema::create('persons', function (Blueprint $table) { + $table->bigIncrements('id'); + $table->string('name', 63); + $table->string('email', 255); + $table->timestamps(); + }); + + Schema::create('tunes', function (Blueprint $table) { + $table->bigIncrements('id'); + $table->tinyInteger('x_id')->default('1'); + $table->timestamps(); + + }); + + Schema::create('tune_settings', function (Blueprint $table) { + $table->bigIncrements('id'); + $table->bigInteger('tune_id')->unsigned(); + $table->string('meter', 3)->default('C'); + $table->string('keysig',5)->default('C'); + $table->string('filename', 255)->nullable(); + $table->string('tempo', 10)->nullable(); + $table->string('L', 5)->nullable(); + $table->text('music')->nullable(); + $table->string('parts', 255)->nullable(); + $table->timestamps(); + $table->foreign('tune_id')->references('id')->on('tunes')->onUpdate('cascade')->onDelete('cascade'); + }); + Schema::create('tune_attributes', function (Blueprint $table) { + $table->bigInteger('tune_id')->unsigned(); + $table->enum('type', ['Title','Group','Origin','Rhythm','History']); + $table->string('string', 255); + $table->tinyInteger('ordering')->unsigned()->default(0); + $table->timestamps(); + $table->primary(['tune_id','type','ordering']); + $table->foreign('tune_id')->references('id')->on('tunes')->onUpdate('cascade')->onDelete('cascade'); + }); + + Schema::create('tune_books', function (Blueprint $table) { + $table->bigInteger('collection_id')->unsigned(); + $table->bigInteger('setting_id')->unsigned(); + $table->timestamps(); + $table->primary(['collection_id','setting_id']); + $table->foreign('collection_id')->references('id')->on('collections')->onUpdate('cascade')->onDelete('cascade'); + $table->foreign('setting_id')->references('id')->on('tune_settings')->onUpdate('cascade')->onDelete('cascade'); + }); + + Schema::create('tune_persons', function (Blueprint $table) { + $table->bigInteger('tune_id')->unsigned(); + $table->bigInteger('person_id')->unsigned(); + $table->enum('type', ['Author','Composer','Transcriber','']); + $table->tinyInteger('ordering')->unsigned()->default(0); + $table->timestamps(); + $table->primary(['tune_id','person_id','type','ordering']); + $table->foreign('tune_id')->references('id')->on('tunes')->onUpdate('cascade')->onDelete('cascade'); + $table->foreign('person_id')->references('id')->on('persons')->onUpdate('cascade')->onDelete('cascade'); + }); + + Schema::create('tune_setting_attributes', function (Blueprint $table) { + $table->bigInteger('setting_id')->unsigned(); + $table->enum('type', ['Transcriber','Note','Discography','Source','Word','Book']); + $table->string('string', 255); + $table->tinyInteger('ordering')->unsigned()->default(0); + $table->timestamps(); + $table->primary(['setting_id','type','ordering']); + $table->foreign('setting_id')->references('id')->on('tune_settings')->onUpdate('cascade')->onDelete('cascade'); + }); + + Schema::create('tune_setting_persons', function (Blueprint $table) { + $table->bigInteger('setting_id')->unsigned(); + $table->bigInteger('person_id')->unsigned(); + $table->tinyInteger('ordering')->unsigned()->default(0); + $table->timestamps(); + $table->primary(['setting_id','person_id','ordering']); + $table->foreign('setting_id')->references('id')->on('tune_settings')->onUpdate('cascade')->onDelete('cascade'); + $table->foreign('person_id')->references('id')->on('persons')->onUpdate('cascade')->onDelete('cascade'); + }); + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('tune_setting_persons'); + Schema::drop('tune_setting_attributes'); + Schema::drop('tune_persons'); + Schema::drop('tune_books'); + Schema::drop('tune_attributes'); + // Schema::drop('Groups'); + Schema::drop('tune_settings'); + Schema::drop('tunes'); + Schema::drop('persons'); + Schema::drop('collections'); + } +} diff --git a/database/migrations/2016_03_06_021725_create_jobs_table.php b/database/migrations/2016_03_06_021725_create_jobs_table.php new file mode 100644 index 0000000..81b2d29 --- /dev/null +++ b/database/migrations/2016_03_06_021725_create_jobs_table.php @@ -0,0 +1,37 @@ +bigIncrements('id'); + $table->string('queue'); + $table->longText('payload'); + $table->tinyInteger('attempts')->unsigned(); + $table->tinyInteger('reserved')->unsigned(); + $table->unsignedInteger('reserved_at')->nullable(); + $table->unsignedInteger('available_at'); + $table->unsignedInteger('created_at'); + $table->index(['queue', 'reserved', 'reserved_at']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('jobs'); + } +} diff --git a/database/migrations/2016_03_06_021806_create_failed_jobs_table.php b/database/migrations/2016_03_06_021806_create_failed_jobs_table.php new file mode 100644 index 0000000..c1ba41b --- /dev/null +++ b/database/migrations/2016_03_06_021806_create_failed_jobs_table.php @@ -0,0 +1,33 @@ +increments('id'); + $table->text('connection'); + $table->text('queue'); + $table->longText('payload'); + $table->timestamp('failed_at'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('failed_jobs'); + } +} diff --git a/src/AbstractBuilder.php b/src/AbstractBuilder.php new file mode 100644 index 0000000..e32f9a7 --- /dev/null +++ b/src/AbstractBuilder.php @@ -0,0 +1,31 @@ +appendToCollection('tune', $this->tune); + } +} \ No newline at end of file diff --git a/src/Factory.php b/src/Factory.php new file mode 100644 index 0000000..863c1cc --- /dev/null +++ b/src/Factory.php @@ -0,0 +1,23 @@ + null, + ]; + + public function __construct(array $config = []) + { + } + + public static function create($type) + { + return call_user_func([self, 'createInstance']); + } + + public function createInstance($type) + { + return isset($this->classMap[$type])? new $this->classMap[$type]() : null; + } +} \ No newline at end of file diff --git a/src/Interfaces/Builder.php b/src/Interfaces/Builder.php new file mode 100644 index 0000000..1ff493c --- /dev/null +++ b/src/Interfaces/Builder.php @@ -0,0 +1,26 @@ +abc = []; + } + + public function appendToCollection($key, $data) + { + $this->abc[$key][] = $data; + } + + public function setOnCollection($key, $data) + { + $this->abc[$key] = $data; + } + + public function getCollection() + { + return $this->abc; + } + + public function newTune() + { + $this->abc[++$this->tunedIdx] = []; + } + + public function appendToTune($key, $data) + { + $this->abc[$this->tunedIdx][$key][] = $data; + } + + public function setOnTune($key, $data) + { + $this->abc[$this->tunedIdx][$key] = $data; + } + + public function newSetting() + { + // + } + + public function appendToSetting($key, $data) + { + $this->appendToTune($key, $data); + } + + public function setOnSetting($key, $data) + { + $this->setOnTune($key, $data); + } + + public function newPerson(array $data) + { + return $data['name']; + } + + public function getTunes() + { + return $this->abc; + } + + public function removeTune($tuneIndex) + { + unset($this->abc[$tuneIndex]); + } + + public function toAbc() + { + //TODO: translate to abc not json; + return json_encode($this->abc); + } + + public function toJson() + { + return json_encode($this->abc); + } + + public function storeTune($music) + { + $this->abc[$this->tunedIdx]['music'] = trim($music); + } +} diff --git a/src/Models/Laravel5/Abc.php b/src/Models/Laravel5/Abc.php new file mode 100644 index 0000000..604c172 --- /dev/null +++ b/src/Models/Laravel5/Abc.php @@ -0,0 +1,133 @@ +collection = new Collection(); + } + + public function newCollection() + { + $this->collection = new Collection(); + } + public function appendToCollection($key, $data) + { + $allowedKeys = ['A', 'C', 'D', 'H', 'R', 'F', 'B', 'M', 'L', 'N', 'O', 'S', 'Z']; + + if (in_array($key, $allowedKeys)) { + $array = $this->collection->$key; + $array[] = $data; + $this->setOnCollection($key, $array); + } + } + + public function setOnCollection($key, $data) + { + $allowedKeys = ['A', 'C', 'D', 'H', 'R', 'F', 'B', 'M', 'L', 'N', 'O', 'S', 'Z']; + + if (in_array($key, $allowedKeys)) { + $this->collection->$key = $data; + } + } + + public function getCollection() + { + return $this->collection; + } + + + public function newTune() + { + $this->tune = new Tune(); + } + + public function appendToTune($key, $data) + { + $array = $this->tune->$key; + $array[] = $data; + $this->setOnTune($key, $array); + } + + public function setOnTune($key, $data) + { + $this->tune->$key = $data; + } + + + public function newSetting() + { + $this->setting = new TuneSetting(); + } + + public function appendToSetting($key, $data) + { + $array = $this->setting->$key; + $array[] = $data; + $this->setOnSetting($key, $array); + } + + public function setOnSetting($key, $data) + { + $this->setting->$key = $data; + } + + + public function newPerson(array $data) + { + $person = new Person(); + foreach ($data as $key => $value) { + $person->{$key} = $value; + } + + return $person; + } + + public function storeTune($music) + { + $this->setting->music = $music; + $this->setting->tune = $this->tune; + $this->collection->appendSetting($this->setting); + } + + + public function getTunes() + { + $this->collection->getSettings(); + } + + public function removeTune($tuneIndex) + {} + + public function toAbc() + { + $this->toJson(); + } + + public function toJson() + { + $this->collection->toJson(); + } + +} diff --git a/src/Models/Laravel5/AttributesTrait.php b/src/Models/Laravel5/AttributesTrait.php new file mode 100644 index 0000000..de104b3 --- /dev/null +++ b/src/Models/Laravel5/AttributesTrait.php @@ -0,0 +1,75 @@ +$type; + } + + public function loadAttr($type) + { + $result = []; + call_user_func([$this->attributesClass, $type.'s'], [$this->id]) + ->get() + ->each(function ($item, $key) use (&$result) { + $result[] = $item->string; + }); + if (! empty($result)) { + $this->setAttr($type, $result); + } + return $this; + } + + public function setAttr($type, array $values) + { + $this->$type = $values; + } + + public function saveAttr($type) + { + $values = $this->$type; + if (! empty($values)) { + $instance = new $this->attributesClass(); + foreach ($values as $key => $value) { + $attr = $instance->attr($type, $value, $this)->first(); + if (!$attr) { + $attr = new $this->attributesClass(); + } + + $attr->fill([ + 'tune_id' => $this->id, + 'setting_id' => $this->id, + 'collection_id' => $this->id, + 'type' => $type, + 'string' => $value, + 'ordering' => $key, + ]); + $attr->save(); + } + } + } + + public function newFromBuilder($attributes = [], $connection = null) + { + $class = new \ReflectionClass($this->attributesClass); + $model = parent::newFromBuilder($attributes, $connection); + foreach ($class->getStaticPropertyValue('types') as $attribute) { + $model = $model->loadAttr($attribute); + } + return $model; + } + + public function save(array $options = []) + { + $class = new \ReflectionClass($this->attributesClass); + foreach ($class->getStaticPropertyValue('types') as $attribute) { + $this->saveAttr($attribute); + } + $saved = parent::save($options); + + return $saved; + } +} diff --git a/src/Models/Laravel5/Collection.php b/src/Models/Laravel5/Collection.php new file mode 100644 index 0000000..c55e667 --- /dev/null +++ b/src/Models/Laravel5/Collection.php @@ -0,0 +1,228 @@ +settings) { + $this->settings = new \Illuminate\Support\Collection(); + } + + $this->settings->push($setting); + return $this->settings; + } + + public function getSettings() + { + return $this->settings; + } + + + /************************************************************** + * mutators and accessors + */ + + protected $Author; + public function getAAttribute() + { + return $this->getAttr('Author'); + } + + public function setAAttribute(array $values) + { + $this->setAttr('Author', $values); + } + + protected $Composer; + public function getCAttribute() + { + return $this->getAttr('Composer'); + } + + public function setCAttribute(array $values) + { + $this->setAttr('Composer', $values); + } + + protected $Discography; + public function getDAttribute() + { + return $this->getAttr('Discography'); + } + + public function setDAttribute(array $values) + { + $this->setAttr('Discography', $values); + } + + protected $Rhythm; + public function getRAttribute() + { + return $this->getAttr('Rhythm'); + } + + public function setRAttribute(array $values) + { + $this->setAttr('Rhythm', $values); + } + + protected $History; + public function getHAttribute() + { + return $this->getAttr('History'); + } + + public function setHAttribute(array $values) + { + $this->setAttr('History', $values); + } + + protected $File; + public function getFAttribute() + { + return $this->getAttr('File'); + } + + public function setFAttribute(array $values) + { + $this->setAttr('File', $values); + } + + protected $Book; + public function getBAttribute() + { + return $this->getAttr('Book'); + } + + public function setBAttribute(array $values) + { + $this->setAttr('Book', $values); + } + + protected $Note; + public function getNAttribute() + { + return $this->getAttr('Note'); + } + + public function setNAttribute(array $values) + { + $this->setAttr('Note', $values); + } + + protected $Origin; + public function getOAttribute() + { + return $this->getAttr('Origin'); + } + + public function setOAttribute(array $values) + { + $this->setAttr('Origin', $values); + } + + protected $Source; + public function getSAttribute() + { + return $this->getAttr('Source'); + } + + public function setSAttribute(array $values) + { + $this->setAttr('Source', $values); + } + + protected $Transcriber; + public function getZAttribute() + { + return $this->getAttr('Transcriber'); + } + + public function setZAttribute(array $values) + { + $this->setAttr('Transcriber', $values); + } + + + /** + * implementation of Countable::count() + * + * @return int the number of tunes in the collection + */ + public function count() + { + return count($this->settings); + } + + public function toArray() + { + $arr = parent::toArray(); + + foreach ($this->settings->toArray() as $key => $setting) { + $arr[$key+1] = $setting; + } + + foreach (['A', 'C', 'Z'] as $attr) { + if (isset($arr[$attr])) { + foreach ($arr[$attr] as $key => $person) { + $arr[$attr][$key] = $person->name; + } + } + } + + foreach ($arr as $key => $val) { + if (empty($val)) { + unset($arr[$key]); + } + } + + return $arr; + } + +} diff --git a/src/Models/Laravel5/CollectionAttribute.php b/src/Models/Laravel5/CollectionAttribute.php new file mode 100644 index 0000000..2f07975 --- /dev/null +++ b/src/Models/Laravel5/CollectionAttribute.php @@ -0,0 +1,190 @@ + 'required|integer|exists:collections,id', + 'type' => 'required|string|in:Author,Composer,Discography,Rhythm,History,File,Book,Note,Source,Transcriber', + 'string' => 'required|string|max:255', + 'ordering' => 'required|integer' + ]; + + /** + * supported attribute types + * @var array + */ + public static $types = [ + 'Author', + 'Composer', + 'Discography', + 'Rhythm', + 'History', + 'File', + 'Book', + 'Note', + 'Origin', + 'Source', + 'Transcriber', + ]; + + /** + * The attributes that are mass assignable. + * + * @var array + */ + protected $fillable = ['collection_id', 'type', 'string', 'ordering']; + + /** + * The attributes that should be hidden for arrays. + * + * @var array + */ + protected $hidden = ['collection_id', 'type', 'ordering']; + + public static function getTypes() + { + return self::$types; + } + + /***************************************************************** + * Scopes + */ + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeAuthors($query, $id) + { + return $query->where('type', 'Author')->where('collection_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeComposers($query, $id) + { + return $query->where('type', 'Composer')->where('collection_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeDiscographys($query, $id) + { + return $query->where('type', 'Discography')->where('collection_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeFiles($query, $id) + { + return $query->where('type', 'File')->where('collection_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeRhythms($query, $id) + { + return $query->where('type', 'Rhythm')->where('collection_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeHistorys($query, $id) + { + return $query->where('type', 'History')->where('collection_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeBooks($query, $id) + { + return $query->where('type', 'Book')->where('collection_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeNotes($query, $id) + { + return $query->where('type', 'Note')->where('collection_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeOrigins($query, $id) + { + return $query->where('type', 'Origin')->where('collection_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeSources($query, $id) + { + return $query->where('type', 'Source')->where('collection_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeTranscribers($query, $id) + { + return $query->where('type', 'Transcriber')->where('collection_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param string $attr + * @param mixed $value + * @param \XaiCorp\AbcParser\Models\Laravel5\Tune|null $collection + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeAttr($query, $attr, $value, Collection $collection = null) + { + if ($collection) { + $query = $query->where('collection_id', $collection->id); + } + return $query->where('type', strtolower($attr))->where('string', $value); + } +} diff --git a/src/Models/Laravel5/Person.php b/src/Models/Laravel5/Person.php new file mode 100644 index 0000000..3707673 --- /dev/null +++ b/src/Models/Laravel5/Person.php @@ -0,0 +1,34 @@ +name; + } +} diff --git a/src/Models/Laravel5/Tune.php b/src/Models/Laravel5/Tune.php new file mode 100644 index 0000000..f03f598 --- /dev/null +++ b/src/Models/Laravel5/Tune.php @@ -0,0 +1,121 @@ + 'integer|min:1', + ]; + + /** + * The attributes that are mass assignable. + * + * @var array + */ + protected $fillable = ['x_id', 'X', 'T']; + + protected $hidden = ['x_id', 'Title', 'Group', 'Origin', 'Rhythm', 'History']; + + protected $appends = ['T', 'G', 'O', 'R', 'H']; + + + /************************************************************** + * mutators and accessors + */ + + protected $Title; + public function getTAttribute() + { + return $this->getAttr('Title'); + } + + public function setTAttribute(array $values) + { + $this->setAttr('Title', $values); + } + + protected $Group; + public function getGAttribute() + { + return $this->getAttr('Group'); + } + public function setGAttribute(array $values) + { + $this->setAttr('Group', $values); + } + + public function getOAttribute() + { + return $this->getAttr('Origin'); + } + + protected $Origin; + public function setOAttribute(array $values) + { + $this->setAttr('Origin', $values); + } + + protected $Rhythm; + public function getRAttribute() + { + return $this->getAttr('Rhythm'); + } + + public function setRAttribute(array $values) + { + $this->setAttr('Rhythm', $values); + } + + protected $History; + public function getHAttribute() + { + return $this->getAttr('History'); + } + + public function setHAttribute(array $values) + { + $this->setAttr('History', $values); + } + + public function toArray() + { + $arr = parent::toArray(); + + foreach (['A','C'] as $attr) { + if (isset($arr[$attr])) { + foreach ($arr[$attr] as $key => $person) { + $arr[$attr][$key] = $person->name; + } + } + } + + foreach ($arr as $key => $val) { + if (empty($val)) { + unset($arr[$key]); + } + } + + return $arr; + } +} diff --git a/src/Models/Laravel5/TuneAttribute.php b/src/Models/Laravel5/TuneAttribute.php new file mode 100644 index 0000000..d7dc32d --- /dev/null +++ b/src/Models/Laravel5/TuneAttribute.php @@ -0,0 +1,134 @@ + 'required|integer|exists:tunes,id', + 'type' => 'required|string|in:Title,Group,Origin,Rhythm,History', + 'string' => 'required|string|max:255', + 'ordering' => 'required|integer' + ]; + + /** + * supported attribute types + * @var array + */ + public static $types = [ + 'Title', + 'Group', + 'Origin', + 'Rhythm', + 'History' + ]; + + /** + * The attributes that are mass assignable. + * + * @var array + */ + protected $fillable = ['tune_id', 'type', 'string', 'ordering']; + + /** + * The attributes that should be hidden for arrays. + * + * @var array + */ + protected $hidden = ['tune_id', 'type', 'ordering']; + + public static function getTypes() + { + return self::$types; + } + + /***************************************************************** + * Scopes + */ + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeTitle($query, $value) + { + return $query->where('type', 'Title')->where('string', $value); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeTitles($query, $id) + { + return $query->where('type', 'Title')->where('tune_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeGroups($query, $id) + { + return $query->where('type', 'Group')->where('tune_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeOrigins($query, $id) + { + return $query->where('type', 'Origin')->where('tune_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeRhythms($query, $id) + { + return $query->where('type', 'Rhythm')->where('tune_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeHistorys($query, $id) + { + return $query->where('type', 'History')->where('tune_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param string $attr + * @param mixed $value + * @param \XaiCorp\AbcParser\Models\Laravel5\Tune|null $tune + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeAttr($query, $attr, $value, Tune $tune = null) + { + if ($tune) { + $query = $query->where('tune_id', $tune->id); + } + return $query->where('type', strtolower($attr))->where('string', $value); + } +} diff --git a/src/Models/Laravel5/TuneSetting.php b/src/Models/Laravel5/TuneSetting.php new file mode 100644 index 0000000..670a7c6 --- /dev/null +++ b/src/Models/Laravel5/TuneSetting.php @@ -0,0 +1,168 @@ + 'required|integer|min:1|exists:tunes,id', + 'meter' => 'string|max:3', + 'keysig' => 'string|max:5', + 'filename' => 'string|max:255', + 'tempo' => 'string|max:10', + 'L' => 'string|max:5', + 'music' => 'string', + 'parts' => 'string|max:255' + ]; + + public static $regex_Q = '/\d\/\d\d?=\d{2,3}/i'; + public static $regex_L = '/\d\/\d{1,2}/i'; + public static $regex_M = '/((C|C\|)|\d{1,2}\/\d{1,3})/i'; + public static $regex_K = '/[a-zA-G]{1,5}/i'; + + /** + * The attributes that are mass assignable. + * + * @var array + */ + protected $fillable = ['tune_id', 'meter', 'keysig', 'filename', 'tempo', 'L', 'music', 'parts']; + + protected $hidden = ['Transcriber', 'Note', 'Discography', 'Source', 'Word', 'Book']; + + protected $appends = ['Z', 'N', 'D', 'S', 'W', 'B']; + + + /************************************************************** + * mutators and accessors + */ + + public function setMusicAttribute($value) + { + $this->attributes['music'] = trim($value); + } + + /** + * @var Tune + */ + protected $tune; + + public function setTuneAttribute(Tune $tune) + { + $this->tune = $tune; + } + + public function getTuneAttribute() + { + return $this->tune; + } + + protected $Transcriber; + public function getZAttribute() + { + return $this->getAttr('Transcriber'); + } + + public function setZAttribute(array $values) + { + $this->setAttr('Transcriber', $values); + } + + protected $Note; + public function getNAttribute() + { + return $this->getAttr('Note'); + } + + public function setNAttribute(array $values) + { + $this->setAttr('Note', $values); + } + + protected $Discography; + public function getDAttribute() + { + return $this->getAttr('Discography'); + } + + public function setDAttribute(array $values) + { + $this->setAttr('Discography', $values); + } + + protected $Source; + public function getSAttribute() + { + return $this->getAttr('Source'); + } + + public function setSAttribute(array $values) + { + $this->setAttr('Source', $values); + } + + protected $Word; + public function getWAttribute() + { + return $this->getAttr('Word'); + } + + public function setWAttribute(array $values) + { + $this->setAttr('Word', $values); + } + + protected $Book; + public function getBAttribute() + { + return $this->getAttr('Book'); + } + + public function setBAttribute(array $values) + { + $this->setAttr('Book', $values); + } + + + /** + * @return array + */ + public function toArray() + { + $arr = parent::toArray(); + + if (isset($arr['Z'])) { + foreach ($arr['Z'] as $key => $person) { + $arr['Z'][$key] = $person->name; + } + } + + foreach ($arr as $key => $val) { + if (empty($val)) { + unset($arr[$key]); + } + } + + $tune = $this->tune->toArray(); + return array_merge($this->tune->toArray(), $arr); + } +} diff --git a/src/Models/Laravel5/TuneSettingAttribute.php b/src/Models/Laravel5/TuneSettingAttribute.php new file mode 100644 index 0000000..5eb67b0 --- /dev/null +++ b/src/Models/Laravel5/TuneSettingAttribute.php @@ -0,0 +1,145 @@ + 'required|integer|exists:tune_settings,id', + 'type' => 'required|string|in:Transcriber,Note,Discography,Source,Word,Book', + 'string' => 'required|string|max:255', + 'ordering' => 'required|integer' + ]; + + /** + * supported attribute types + * @var array + */ + public static $types = [ + 'Transcriber', + 'Note', + 'Discography', + 'Source', + 'Word', + 'Book' + ]; + + /** + * The attributes that are mass assignable. + * + * @var array + */ + protected $fillable = ['setting_id', 'type', 'string', 'ordering']; + + /** + * The attributes that should be hidden for arrays. + * + * @var array + */ + protected $hidden = ['setting_id', 'type', 'ordering']; + + public static function getTypes() + { + return self::$types; + } + + /***************************************************************** + * Scopes + */ + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeTranscriber($query, $value) + { + return $query->where('type', 'Transcriber')->where('string', $value); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeTranscribers($query, $id) + { + return $query->where('type', 'Transcriber')->where('setting_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeNotes($query, $id) + { + return $query->where('type', 'Note')->where('setting_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeDiscographys($query, $id) + { + return $query->where('type', 'Discography')->where('setting_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeSources($query, $id) + { + return $query->where('type', 'Source')->where('setting_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeWords($query, $id) + { + return $query->where('type', 'Word')->where('setting_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param integer $id + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeBooks($query, $id) + { + return $query->where('type', 'Book')->where('setting_id', $id); + } + + /** + * @param \Illuminate\Database\Eloquent\Builder $query + * @param string $attr + * @param mixed $value + * @param \XaiCorp\AbcParser\Models\Laravel5\Tune|null $setting + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeAttr($query, $attr, $value, TuneSetting $setting = null) + { + if ($setting) { + $query = $query->where('setting_id', $setting->id); + } + return $query->where('type', strtolower($attr))->where('string', $value); + } +} diff --git a/src/Models/Laravel5/ValidatingModel.php b/src/Models/Laravel5/ValidatingModel.php new file mode 100644 index 0000000..74cfc25 --- /dev/null +++ b/src/Models/Laravel5/ValidatingModel.php @@ -0,0 +1,28 @@ +validate()) { + return parent::save($options); + } + return false; + } +} diff --git a/src/Models/Memory/Abc.php b/src/Models/Memory/Abc.php new file mode 100644 index 0000000..e5e2f88 --- /dev/null +++ b/src/Models/Memory/Abc.php @@ -0,0 +1,67 @@ +collection = new TuneCollection(); + } + + public function appendToCollection($key, $data) + { + $this->collection->append($key, $data); + } + + public function getCollection() + { + return count($this->collection) ? $this->collection : FALSE; + } + + public function newTune() + { + $this->currentTune = new Tune(); + } + + public function appendToTune($key, $data) + { + $this->currentTune->append($key, $data); + } + + public function setOnTune($key, $data) + { + $this->currentTune->set($key, $data); + } + + public function newSetting() + { + $this->currentSetting = new Setting(); + } + + public function appendToSetting($key, $data) + { + $this->currentSetting->append($key, $data); + } + + public function newPerson(array $data) + { + return new Person($data); + } + + public function storeTune($music) + { + $this->currentSetting->set('music', trim($music)); + $this->currentTune->append('collection', $this->currentSetting); + $this->collection->append('collection', $this->currentTune); + } +} \ No newline at end of file diff --git a/src/Models/Memory/BaseIterator.php b/src/Models/Memory/BaseIterator.php new file mode 100644 index 0000000..c63eaa8 --- /dev/null +++ b/src/Models/Memory/BaseIterator.php @@ -0,0 +1,113 @@ +collection); + } + + /******************************************************** + * + * Implementation of ArrayAccess + * + ********************************************************/ + + public function offsetExists ( $offset ) + { + return isset($this->collection[$offset]); + } + + public function offsetGet ( $offset ) + { + return isset($this->collection[$offset])? $this->collection[$offset] : null; + } + + public function offsetSet ( $offset, $value ) + { + $offset = ($offset === NULL) ? count($this->collection) : $offset; + if(is_a($value, BaseObject::class)) { $this->collection[$offset] = $value; } + } + + public function offsetUnset ( $offset ) + { + unset($this->collection[$offset]); + } + + /******************************************************** + * + * Implementation of Iterator + * + ********************************************************/ + + /** + * implementation of Iterator::current() + * + * @return Tune + */ + public function current () + { + return $this->collection[$this->position]; + } + + /** + * implementation of Iterator::key() + * + * @return Scalar the current index + */ + public function key () + { + return $this->position; + } + + /** + * implementation of Iterator::next() + * + * sets the position to the next index + */ + public function next () + { + ++$this->position; + } + + /** + * implementation of Iterator::rewind() + * + * sets the position to the beginning of the collection + */ + public function rewind () + { + $this->position = 0; + } + + /** + * implementation of Iterator::valid() + * + * tests that there is a tune at the current position + * @return boolean + */ + public function valid () + { + $is_valid = isset($this->collection[$this->position]); + if(! $is_valid) { $this->rewind(); } + return $is_valid; + } + + + +} diff --git a/src/Models/Memory/BaseObject.php b/src/Models/Memory/BaseObject.php new file mode 100644 index 0000000..f60725d --- /dev/null +++ b/src/Models/Memory/BaseObject.php @@ -0,0 +1,34 @@ +change_hash = $this->generate_hash(); + } + + public static function propertyNames() + { + return static::propertyNames; + } + + protected abstract function generate_hash(); + +} diff --git a/src/Models/Memory/Person.php b/src/Models/Memory/Person.php new file mode 100644 index 0000000..d189ff4 --- /dev/null +++ b/src/Models/Memory/Person.php @@ -0,0 +1,130 @@ +$val) + { + $this->set($key, $val); + } + + $this->change_hash = $this->generate_hash(); + } + + /** + * magic setter + * just passes to regular set method which contains validation + */ + public function __set($key, $value) + { + $this->set($key, $value); + } + + public function set($key, $value) + { + $retVar = FALSE; + switch($key) + { + case 'person_id' : + if( $this->person_id === 0 && is_numeric($value) && intval($value) > 0 ) + { + $this->{$key} = intval($value); + $retVar = TRUE; + } + break; + + case 'name': + if(is_string($value) && ! is_null($value)) + { + $this->{$key} = $value; + $retVar = TRUE; + } + break; + case 'email': + if(filter_var($value, FILTER_VALIDATE_EMAIL)) { + $this->{$key} = $value; + $retVar = TRUE; + } + break; + default: + } + + return $retVar; + } + + public function get($key) + { + if ( is_string($key) && isset($this->$key) ) + { + return $this->$key; + } + return FALSE; + } + + /** + * set default values for the person + * used when creating a new person from scratch + */ + // public function init() + // { + // $this->change_hash = $this->generate_hash(); + // } + + /** + * Test if the data has changed + * + * @return (bool) True if the data has changed since last load/save + */ + public function is_changed() + { + return $this->change_hash !== $this->generate_hash(); + } + + /******************************************************** + * + * Private functions + * + ********************************************************/ + + /** + * generate hash for the whole person object + * + * @returns (string) md5 hash of all attributes + */ + protected function generate_hash() + { + $data = array( + $this->person_id, + $this->name, + $this->email + ); + + return md5(serialize($data)); + } + + + + + + /******************************************************** + * + * Static functions + * + ********************************************************/ + + +} diff --git a/src/Models/Memory/Setting.php b/src/Models/Memory/Setting.php new file mode 100644 index 0000000..87be30f --- /dev/null +++ b/src/Models/Memory/Setting.php @@ -0,0 +1,281 @@ + 'Transcriber', + 'N' => 'Notes', + 'D' => 'Discography', + 'S' => 'Source', + 'W' => 'Words,', + 'B' => 'Book', + 'F' => 'Filename', + 'P' => 'Parts', + 'Q' => 'Tempo,', + 'L' => 'default note length', + 'M' => 'Meter', + 'K' => 'Key', + ); + + /** + * Tune constructor + * + * @param $params (array) list of parameters to set at initialization + */ + function __construct(array $params = array()) { + //Init parameters + foreach($params as $key=>$val) + { + $this->set($key, $val); + } + + $this->change_hash = $this->generate_hash(); + } + + + /******************************************************** + * + * public functions + * + ********************************************************/ + + /** + * get the value of a private property + * + * @return (mixed) value of the property or FALSE if property does not exist + */ + public function get($property) + { + if(isset($this->{$property})) { return $this->{$property}; } + return FALSE; + } + + + /** + * magic setter + * just passes to regular set method which contains validation + */ + public function __set($key, $value) + { + $this->set($key, $value); + } + + /** + * set new value for a property + * overwrites the existing value + * + * @return (boolean) TRUE on success, FALSE otherwise + */ + public function set($property, $value) + { + $retVar = FALSE; + + switch($property) + { + case 'settingID': + if($this->settingID !== 0) { // if settingID is not 0 don't allow setting it + $retVar = FALSE; + break; + } + //follow through since this is also a numeric value + case 'tuneID': + if(is_numeric($value) && $value > 0) + { + $this->{$property} = (int)$value; + $retVar = TRUE; + } + break; + + case 'Q': + case 'L': + case 'M': + if ( ! Setting::validate_line($property, $value) ) { return FALSE; } + case 'K': + case 'P': + case 'music': + if( ! is_array($value) && ! is_int($value) ) + { + $this->{$property} = $value; + $retVar = TRUE; + } + break; + + case 'Z': + if( is_array($value) && count($value) > 0) + { + $contains_only = TRUE; + foreach($value as $person) + { + if(! is_a($person, __NAMESPACE__."\Person")) + { + $contains_only = FALSE; + break; + } + } + + if( $contains_only ) + { + $this->{$property} = $value; + $retVar = TRUE; + } + } + break; + + case 'F': + case 'N': + case 'D': + case 'S': + case 'W': + case 'B': + if( is_array($value) ) + { + $this->{$property} = $value; + $retVar = TRUE; + } + break; + + default: // non-existant or non-editable property + break; + } + + return $retVar; + } + + /** + * append a value to a property's array + * + * @param (string) $property name + * @param (mixed) $value to add to the array + * + * @return (Boolean) TRUE on success, FALSE otherwise + */ public function append($property, $value) + { + if( ! is_array($value) ) + { + switch($property) + { + case 'Z': + if( ! is_a($value, __NAMESPACE__."\Person") ) { + break; + } + case 'N': + case 'D': + case 'S': + case 'W': + case 'B': + case 'F': + $this->{$property}[] = $value; + return TRUE; + break; + + default: + $this->set($property, $value); + } + } + return FALSE; + } + + /** + * Test if the data has changed + * + * @return (bool) True if the data has changed since last load/save + */ + public function is_changed() + { + return $this->change_hash !== $this->generate_hash(); + } + + // public function init() + // { + // $this->change_hash = $this->generate_hash(); + // } + + + /******************************************************** + * + * Private functions + * + ********************************************************/ + + + /** + * generate hash for the whole person object + * + * @returns (string) md5 hash of all attributes + */ + protected function generate_hash() + { + $data = array( + $this->tuneID, + $this->settingID, + //TODO: take into account the transcribers + //$this->Z, + $this->N, + $this->D, + $this->S, + $this->W, + $this->B, + $this->F, + $this->P, + $this->Q, + $this->L, + $this->M, + $this->K, + $this->music, + ); + + return md5(serialize($data)); + } + + /******************************************************** + * + * Static functions + * + ********************************************************/ + + + + protected static function validate_line($key, $data) + { + $result = TRUE; + if(isset(Setting::${"regex_$key"})) + { + $regex = Setting::${"regex_$key"}; + $result = preg_match($regex, serialize($data)); + } + + return $result; + } + + +} diff --git a/src/Models/Memory/Tune.php b/src/Models/Memory/Tune.php new file mode 100644 index 0000000..72a9acb --- /dev/null +++ b/src/Models/Memory/Tune.php @@ -0,0 +1,254 @@ + 'id', + 'T' => 'Title', + 'A' => 'Author', + 'C' => 'Composer', + 'G' => 'Group,', + 'H' => 'History', + 'O' => 'Origin', + 'R' => 'Rhythm', + ); + + /** + * Tune constructor + * + * @param $params (array) list of parameters to set at initialization + */ + function __construct(array $params = array()) { + //Init parameters + foreach($params as $key=>$val) + { + $this->set($key, $val); + } + + $this->change_hash = $this->generate_hash(); + } + + + /******************************************************** + * + * public functions + * + ********************************************************/ + + /** + * get the value of a private property + * + * @return (mixed) value of the property or FALSE if property does not exist + */ + public function get($property) + { + if(isset($this->{$property})) { return $this->{$property}; } + return FALSE; + } + + /** + * magic setter + * just passes to regular set method which contains validation + */ + public function __set($key, $value) + { + $this->set($key, $value); + } + + /** + * set new value for a property + * overwrites the existing value + * + * @return (boolean) TRUE on success, FALSE otherwise + */ + public function set($property, $value) + { + $retVar = FALSE; + + switch($property) + { + case 'tuneID': + if($this->tuneID !== 0) { // if tuneID is not 0 don't allow setting it + $retVar = FALSE; + break; + } + //follow through since this is also a numeric value + case 'X': + if(is_numeric($value) && $value > 0) + { + $this->{$property} = $value; + $retVar = TRUE; + } + break; + + case 'A': + case 'C': + if( is_array($value) && count($value) > 0) + { + $contains_only = TRUE; + foreach($value as $key=>$person) + { + if(! is_a($person, __NAMESPACE__ . '\\' ."Person")) + { + $contains_only = FALSE; + break; + } + } + + if( $contains_only ) + { + $this->{$property} = $value; + $retVar = TRUE; + } + } + break; + + case 'T': + case 'G': + case 'H': + case 'O': + case 'R': + if(is_array($value)) + { + $this->{$property} = $value; + $retVar = TRUE; + } + break; + + case 'collection': + if( is_array($value) && count($value) > 0) + { + $only_settings = TRUE; + foreach($value as $key=>$setting) + { + if(! is_a($setting, __NAMESPACE__ . '\\' ."Setting")) + { + $only_settings = FALSE; + break; + } + } + + if( $only_settings ) + { + $this->{$property} = $value; + $retVar = TRUE; + } + } + break; + + + default: // non-existant or non-editable property + break; + } + + return $retVar; + } + + /** + * append a value to a property's array + * + * @param (string) $property name + * @param (mixed) $value to add to the array + * + * @return (Boolean) TRUE on success, FALSE otherwise + */ public function append($property, $value) + { + if( ! is_array($value) ) + { + switch($property) + { + case 'T': + case 'A': + case 'C': + case 'G': + case 'H': + case 'O': + case 'R': + $this->{$property}[] = $value; + return TRUE; + break; + + case 'collection': + if( is_a($value, __NAMESPACE__ . '\\' ."Setting") ) + { + $this->{$property}[] = $value; + return TRUE; + } + break; + + default: + $this->set($property, $value); + break; + } + } + return FALSE; + } + + + /** + * Test if the data has changed + * + * @return (bool) True if the data has changed since last load/save + */ + public function is_changed() + { + return $this->change_hash !== $this->generate_hash(); + } + + /******************************************************** + * + * Private functions + * + ********************************************************/ + + + /** + * generate hash for the whole person object + * + * @returns (string) md5 hash of all attributes + */ + protected function generate_hash() + { + $data = array( + $this->tuneID, + $this->X, + $this->T, + // $this->A, + // $this->C, + $this->G, + $this->H, + $this->O, + $this->R, + // $this->collection, + ); + + return md5(serialize($data)); + } + + /******************************************************** + * + * Static functions + * + ********************************************************/ + + + +} diff --git a/src/Models/Memory/TuneCollection.php b/src/Models/Memory/TuneCollection.php new file mode 100644 index 0000000..e8be1b9 --- /dev/null +++ b/src/Models/Memory/TuneCollection.php @@ -0,0 +1,271 @@ +collection[] = $tune; + } + + /** + * pop last tune from the end of the collection + * + * @return Tune + */ + public function pop() + { + return array_pop($this->collection); + } + + + /** + * magic setter + * just passes to regular set method which contains validation + */ + public function __set($key, $value) + { + $this->set($key, $value); + } + + /** + * set new value for a property + * overwrites the existing value + * + * @return (boolean) TRUE on success, FALSE otherwise + */ + public function set($property, $value) + { + $retVar = FALSE; + + switch($property) + { + case 'change_hash': + $this->generate_hash(); + break; + + case 'tc_id': + if($this->tc_id !== 0) { // if tc_ID is not 0 don't allow setting it + $retVar = FALSE; + break; + } + + if(is_numeric($value) && $value > 0) + { + $this->{$property} = $value; + $retVar = TRUE; + } + break; + + case 'A': + case 'C': + case 'Z': + if( is_array($value) && count($value) > 0) + { + $contains_only = TRUE; + foreach($value as $key=>$person) + { + if(! is_a($person, __NAMESPACE__ . '\\' ."Person")) + { + $contains_only = FALSE; + break; + } + } + + if( $contains_only ) + { + $this->{$property} = $value; + $retVar = TRUE; + } + } + break; + + case 'B': + case 'D': + case 'F': + case 'H': + case 'N': + case 'O': + case 'S': + if(is_array($value)) + { + $this->{$property} = $value; + $retVar = TRUE; + } + break; + + case 'collection': + if( is_array($value) && count($value) > 0) + { + $contains_only_tunes = TRUE; + foreach($value as $key=>$tune) + { + if(! is_a($tune, __NAMESPACE__ . '\\' ."Tune")) + { + $contains_only_tunes = FALSE; + break; + } + } + + if( $contains_only_tunes ) + { + $this->{$property} = $value; + $retVar = TRUE; + } + } + break; + + case 'L' : + case 'M' : + case 'R' : + if(is_numeric($value)) { break; } + case 'cOwner' : + if(! is_array($value) ) + { + $this->{$property} = $value; + $retVar = TRUE; + } + break; + + default: // non-existant or non-editable property + break; + } + + return $retVar; + } + + /** + * append a value to a property's array + * + * @param (string) $property name + * @param (mixed) $value to add to the array + * + * @return (Boolean) TRUE on success, FALSE otherwise + */ + public function append($property, $value) + { + switch($property) + { + case 'A': + case 'C': + case 'Z': + if(! is_a($value, __NAMESPACE__ . '\\' .'Person')) { break; } + //Fall through if we pass the check + case 'B': + case 'D': + case 'F': + case 'H': + case 'N': + case 'O': + case 'S': + $this->{$property}[] = $value; + return TRUE; + break; + + case 'collection': + if( is_a($value, __NAMESPACE__."\Tune") ) + { + $this->{$property}[] = $value; + return TRUE; + } + break; + + default: + return $this->set($property, $value); + break; + } + return FALSE; + } + + /** + * get the value of a private property + * + * @return (mixed) value of the property or FALSE if property does not exist + */ + public function get($property) + { + if(isset($this->{$property})) { return $this->{$property}; } + return FALSE; + } + + + + /******************************************************** + * + * private functions + * + ********************************************************/ + + /** + * generate hash for the whole person object + * + * @returns (string) md5 hash of all attributes + */ + protected function generate_hash() + { + $data = array( + $this->tc_id, + $this->cOwner, + $this->A, + $this->B, + $this->C, + $this->D, + $this->F, + $this->H, + $this->L, + $this->M, + $this->N, + $this->O, + $this->R, + $this->S, + $this->Z, + // $this->collection, + ); + + return md5(serialize($data)); + } + + +} \ No newline at end of file diff --git a/src/Parser.php b/src/Parser.php new file mode 100644 index 0000000..07b7dd6 --- /dev/null +++ b/src/Parser.php @@ -0,0 +1,149 @@ +builder = $builder; + } + + /** + * extract the attibutes from the raw abc + * @param $abc string containing the raw abc + * + * @return + */ + public function parseABC($abc) { + //tune is either new or existing data has been loaded + //create new setting + $mode = self::MODE_FILE_HEADER; + $this->builder->newCollection(); + $tune = null; + $setting = null; + $inHistory = false; + $inTunes = false; + $music = ""; + $keys_for_Settings = '/K|L|M|P|Q|B|N|D|S|W|Z|F/'; + $keys_for_Tunes = '/H|A|C|G|R|T|O/'; + //scan abc by line and see what the first char is + foreach (preg_split("/(\r?\n)/", $abc) as $line) { + + if (preg_match(self::LN_BLANK, $line)) { + if ($mode === self::MODE_TUNE_BODY || $mode === self::MODE_TUNE_HEADER) { + $this->builder->storeTune($music); + $music = ''; + } + + $mode = self::MODE_NO_DATA; + } else if ($mode === self::MODE_TUNE_BODY) { + $music .= $line . PHP_EOL; + } else if (preg_match(self::LN_VERSION, $line)) { + //this line might contain the abc version. + //What do we want to do with it? + } else if (preg_match(self::LN_FIELD, $line) || $inHistory) { + if (preg_match(self::LN_FIELD, $line)) { $inHistory = FALSE; } + //split the line "key:data" + if($inHistory) { + $key = 'H'; + $data = $line; + } else { + $key = substr($line, 0, 1); + $data = trim(substr($line, 2)); + } + + if ($key === 'X') { + $mode = self::MODE_TUNE_HEADER; + $inTunes = true; + $this->builder->newTune(); + $this->builder->newSetting(); + $music = ''; + + $this->builder->setOnTune('X', $data); + + } else if (preg_match($keys_for_Tunes, $key)) { + if ($key === 'H') { + $inHistory = TRUE; + } else { + $inHistory = FALSE; + } + if ($key === 'A' || $key === 'C') { + $data = $this->builder->newPerson(['name'=>$data]); + } + if ($mode === self::MODE_FILE_HEADER) { + if (in_array($key, self::SINGLE_VALUE_KEYS)) { + $this->builder->setOnCollection($key, $data); + } else { + $this->builder->appendToCollection($key, $data); + } + } else if($inTunes) { + if (in_array($key, self::SINGLE_VALUE_KEYS)) { + $this->builder->setOnTune($key, $data); + } else { + $this->builder->appendToTune($key, $data); + } + } + + } else if (preg_match($keys_for_Settings, $key)) { + if ($key === 'K' && $mode === self::MODE_TUNE_HEADER) { + $mode = self::MODE_TUNE_BODY; + } + + if ($key === 'Z') { + $data = $this->builder->newPerson(['name'=>$data]); + } + + + if ($mode == self::MODE_FILE_HEADER) { + if (in_array($key, self::SINGLE_VALUE_KEYS)) { + $this->builder->setOnCollection($key, $data); + } else { + $this->builder->appendToCollection($key, $data); + } + } else if($inTunes){ + if (in_array($key, self::SINGLE_VALUE_KEYS)) { + $this->builder->setOnSetting($key, $data); + } else { + $this->builder->appendToSetting($key, $data); + } + } + } + + } + } + + return $this->builder->getCollection(); + } + +// private static function _storeTune($music, &$setting, &$tune, &$tuneCollection) { +// $setting -> set('music', trim($music)); +// $tune -> append('collection', $setting); +// $tuneCollection -> append('collection', $tune); +// } + +} diff --git a/src/Traits/ValidationTrait.php b/src/Traits/ValidationTrait.php new file mode 100644 index 0000000..3669dc2 --- /dev/null +++ b/src/Traits/ValidationTrait.php @@ -0,0 +1,60 @@ +getAttributes(); + + $validator = Validator::make($data, $this->validationRules); + + if ($validator->fails()) { + if (! $this->messages) { + $this->messages = new MessageBag(); + } + $this->messages = $validator->getMessageBag(); + return false; + } + + return true; + } + + /** + * @return array|MessageBag + */ + public function getMessages() + { + return $this->messages?$this->messages->toArray():[]; + } + + /** + * @return array + */ + public function getValidationRules() + { + return $this->validationRules; + } + + /** + * fetch the validation rules for a model class + * + * @return array + */ + public static function getRules() + { + $class = get_called_class(); + $instance = new $class(); + return $instance->getValidationRules(); + } +} diff --git a/tests/_bootstrap.php b/tests/_bootstrap.php new file mode 100644 index 0000000..1f234e0 --- /dev/null +++ b/tests/_bootstrap.php @@ -0,0 +1,4 @@ +save(), json_encode($model->getMessages())); + } + + public function assertCanNotSave(Model $model, $message = '') + { + \PHPUnit_Framework_Assert::assertNotTrue($model->save(), $message); + } + + public function haveNotFinishedTest() + { + \PHPUnit_Framework_Assert::markTestIncomplete(); + } +} diff --git a/tests/_support/Helper/Functional.php b/tests/_support/Helper/Functional.php new file mode 100644 index 0000000..4183cb0 --- /dev/null +++ b/tests/_support/Helper/Functional.php @@ -0,0 +1,10 @@ +setHeader('X-Requested-With', 'Codeception'); + * $I->amOnPage('test-headers.php'); + * ?> + * ``` + * + * @param string $name the name of the request header + * @param string $value the value to set it to for subsequent + * requests + * @see \Codeception\Module\PhpBrowser::setHeader() + */ + public function setHeader($name, $value) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('setHeader', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Deletes the header with the passed name. Subsequent requests + * will not have the deleted header in its request. + * + * Example: + * ```php + * setHeader('X-Requested-With', 'Codeception'); + * $I->amOnPage('test-headers.php'); + * // ... + * $I->deleteHeader('X-Requested-With'); + * $I->amOnPage('some-other-page.php'); + * ?> + * ``` + * + * @param string $name the name of the header to delete. + * @see \Codeception\Module\PhpBrowser::deleteHeader() + */ + public function deleteHeader($name) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('deleteHeader', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Authenticates user for HTTP_AUTH + * + * @param $username + * @param $password + * @see \Codeception\Module\PhpBrowser::amHttpAuthenticated() + */ + public function amHttpAuthenticated($username, $password) { + return $this->getScenario()->runStep(new \Codeception\Step\Condition('amHttpAuthenticated', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Open web page at the given absolute URL and sets its hostname as the base host. + * + * ``` php + * amOnUrl('http://codeception.com'); + * $I->amOnPage('/quickstart'); // moves to http://codeception.com/quickstart + * ?> + * ``` + * @see \Codeception\Module\PhpBrowser::amOnUrl() + */ + public function amOnUrl($url) { + return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnUrl', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Changes the subdomain for the 'url' configuration parameter. + * Does not open a page; use `amOnPage` for that. + * + * ``` php + * amOnSubdomain('user'); + * $I->amOnPage('/'); + * // moves to http://user.mysite.com/ + * ?> + * ``` + * + * @param $subdomain + * + * @return mixed + * @see \Codeception\Module\PhpBrowser::amOnSubdomain() + */ + public function amOnSubdomain($subdomain) { + return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnSubdomain', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Low-level API method. + * If Codeception commands are not enough, use [Guzzle HTTP Client](http://guzzlephp.org/) methods directly + * + * Example: + * + * ``` php + * executeInGuzzle(function (\GuzzleHttp\Client $client) { + * $client->get('/get', ['query' => ['foo' => 'bar']]); + * }); + * ?> + * ``` + * + * It is not recommended to use this command on a regular basis. + * If Codeception lacks important Guzzle Client methods, implement them and submit patches. + * + * @param callable $function + * @see \Codeception\Module\PhpBrowser::executeInGuzzle() + */ + public function executeInGuzzle($function) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('executeInGuzzle', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Opens the page for the given relative URI. + * + * ``` php + * amOnPage('/'); + * // opens /register page + * $I->amOnPage('/register'); + * ``` + * + * @param $page + * @see \Codeception\Lib\InnerBrowser::amOnPage() + */ + public function amOnPage($page) { + return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnPage', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Perform a click on a link or a button, given by a locator. + * If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string. + * For buttons, the "value" attribute, "name" attribute, and inner text are searched. + * For links, the link text is searched. + * For images, the "alt" attribute and inner text of any parent links are searched. + * + * The second parameter is a context (CSS or XPath locator) to narrow the search. + * + * Note that if the locator matches a button of type `submit`, the form will be submitted. + * + * ``` php + * click('Logout'); + * // button of form + * $I->click('Submit'); + * // CSS button + * $I->click('#form input[type=submit]'); + * // XPath + * $I->click('//form/*[@type=submit]'); + * // link in context + * $I->click('Logout', '#nav'); + * // using strict locator + * $I->click(['link' => 'Login']); + * ?> + * ``` + * + * @param $link + * @param $context + * @see \Codeception\Lib\InnerBrowser::click() + */ + public function click($link, $context = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('click', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current page contains the given string (case insensitive). + * + * You can specify a specific HTML element (via CSS or XPath) as the second + * parameter to only search within that element. + * + * ``` php + * see('Logout'); // I can suppose user is logged in + * $I->see('Sign Up', 'h1'); // I can suppose it's a signup page + * $I->see('Sign Up', '//body/h1'); // with XPath + * ``` + * + * Note that the search is done after stripping all HTML tags from the body, + * so `$I->see('strong')` will return true for strings like: + * + * - `

I am Stronger than thou

` + * - `` + * + * But will *not* be true for strings like: + * + * - `Home` + * - `
Home` + * - `` + * + * For checking the raw source code, use `seeInSource()`. + * + * @param $text + * @param null $selector + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::see() + */ + public function canSee($text, $selector = null) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('see', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current page contains the given string (case insensitive). + * + * You can specify a specific HTML element (via CSS or XPath) as the second + * parameter to only search within that element. + * + * ``` php + * see('Logout'); // I can suppose user is logged in + * $I->see('Sign Up', 'h1'); // I can suppose it's a signup page + * $I->see('Sign Up', '//body/h1'); // with XPath + * ``` + * + * Note that the search is done after stripping all HTML tags from the body, + * so `$I->see('strong')` will return true for strings like: + * + * - `

I am Stronger than thou

` + * - `` + * + * But will *not* be true for strings like: + * + * - `Home` + * - `
Home` + * - `` + * + * For checking the raw source code, use `seeInSource()`. + * + * @param $text + * @param null $selector + * @see \Codeception\Lib\InnerBrowser::see() + */ + public function see($text, $selector = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('see', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current page doesn't contain the text specified (case insensitive). + * Give a locator as the second parameter to match a specific region. + * + * ```php + * dontSee('Login'); // I can suppose user is already logged in + * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page + * $I->dontSee('Sign Up','//body/h1'); // with XPath + * ``` + * + * Note that the search is done after stripping all HTML tags from the body, + * so `$I->dontSee('strong')` will fail on strings like: + * + * - `

I am Stronger than thou

` + * - `` + * + * But will ignore strings like: + * + * - `Home` + * - `
Home` + * - `` + * + * For checking the raw source code, use `seeInSource()`. + * + * @param $text + * @param null $selector + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::dontSee() + */ + public function cantSee($text, $selector = null) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSee', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current page doesn't contain the text specified (case insensitive). + * Give a locator as the second parameter to match a specific region. + * + * ```php + * dontSee('Login'); // I can suppose user is already logged in + * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page + * $I->dontSee('Sign Up','//body/h1'); // with XPath + * ``` + * + * Note that the search is done after stripping all HTML tags from the body, + * so `$I->dontSee('strong')` will fail on strings like: + * + * - `

I am Stronger than thou

` + * - `` + * + * But will ignore strings like: + * + * - `Home` + * - `
Home` + * - `` + * + * For checking the raw source code, use `seeInSource()`. + * + * @param $text + * @param null $selector + * @see \Codeception\Lib\InnerBrowser::dontSee() + */ + public function dontSee($text, $selector = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSee', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current page contains the given string in its + * raw source code. + * + * ``` php + * seeInSource('

Green eggs & ham

'); + * ``` + * + * @param $raw + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::seeInSource() + */ + public function canSeeInSource($raw) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInSource', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current page contains the given string in its + * raw source code. + * + * ``` php + * seeInSource('

Green eggs & ham

'); + * ``` + * + * @param $raw + * @see \Codeception\Lib\InnerBrowser::seeInSource() + */ + public function seeInSource($raw) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInSource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current page contains the given string in its + * raw source code. + * + * ```php + * dontSeeInSource('

Green eggs & ham

'); + * ``` + * + * @param $raw + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::dontSeeInSource() + */ + public function cantSeeInSource($raw) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInSource', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current page contains the given string in its + * raw source code. + * + * ```php + * dontSeeInSource('

Green eggs & ham

'); + * ``` + * + * @param $raw + * @see \Codeception\Lib\InnerBrowser::dontSeeInSource() + */ + public function dontSeeInSource($raw) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInSource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that there's a link with the specified text. + * Give a full URL as the second parameter to match links with that exact URL. + * + * ``` php + * seeLink('Logout'); // matches Logout + * $I->seeLink('Logout','/logout'); // matches Logout + * ?> + * ``` + * + * @param $text + * @param null $url + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::seeLink() + */ + public function canSeeLink($text, $url = null) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeLink', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that there's a link with the specified text. + * Give a full URL as the second parameter to match links with that exact URL. + * + * ``` php + * seeLink('Logout'); // matches Logout + * $I->seeLink('Logout','/logout'); // matches Logout + * ?> + * ``` + * + * @param $text + * @param null $url + * @see \Codeception\Lib\InnerBrowser::seeLink() + */ + public function seeLink($text, $url = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeLink', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the page doesn't contain a link with the given string. + * If the second parameter is given, only links with a matching "href" attribute will be checked. + * + * ``` php + * dontSeeLink('Logout'); // I suppose user is not logged in + * $I->dontSeeLink('Checkout now', '/store/cart.php'); + * ?> + * ``` + * + * @param $text + * @param null $url + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::dontSeeLink() + */ + public function cantSeeLink($text, $url = null) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeLink', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the page doesn't contain a link with the given string. + * If the second parameter is given, only links with a matching "href" attribute will be checked. + * + * ``` php + * dontSeeLink('Logout'); // I suppose user is not logged in + * $I->dontSeeLink('Checkout now', '/store/cart.php'); + * ?> + * ``` + * + * @param $text + * @param null $url + * @see \Codeception\Lib\InnerBrowser::dontSeeLink() + */ + public function dontSeeLink($text, $url = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeLink', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that current URI contains the given string. + * + * ``` php + * seeInCurrentUrl('home'); + * // to match: /users/1 + * $I->seeInCurrentUrl('/users/'); + * ?> + * ``` + * + * @param $uri + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl() + */ + public function canSeeInCurrentUrl($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInCurrentUrl', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that current URI contains the given string. + * + * ``` php + * seeInCurrentUrl('home'); + * // to match: /users/1 + * $I->seeInCurrentUrl('/users/'); + * ?> + * ``` + * + * @param $uri + * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl() + */ + public function seeInCurrentUrl($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInCurrentUrl', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current URI doesn't contain the given string. + * + * ``` php + * dontSeeInCurrentUrl('/users/'); + * ?> + * ``` + * + * @param $uri + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl() + */ + public function cantSeeInCurrentUrl($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInCurrentUrl', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current URI doesn't contain the given string. + * + * ``` php + * dontSeeInCurrentUrl('/users/'); + * ?> + * ``` + * + * @param $uri + * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl() + */ + public function dontSeeInCurrentUrl($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInCurrentUrl', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current URL is equal to the given string. + * Unlike `seeInCurrentUrl`, this only matches the full URL. + * + * ``` php + * seeCurrentUrlEquals('/'); + * ?> + * ``` + * + * @param $uri + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals() + */ + public function canSeeCurrentUrlEquals($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlEquals', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current URL is equal to the given string. + * Unlike `seeInCurrentUrl`, this only matches the full URL. + * + * ``` php + * seeCurrentUrlEquals('/'); + * ?> + * ``` + * + * @param $uri + * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals() + */ + public function seeCurrentUrlEquals($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current URL doesn't equal the given string. + * Unlike `dontSeeInCurrentUrl`, this only matches the full URL. + * + * ``` php + * dontSeeCurrentUrlEquals('/'); + * ?> + * ``` + * + * @param $uri + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals() + */ + public function cantSeeCurrentUrlEquals($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlEquals', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current URL doesn't equal the given string. + * Unlike `dontSeeInCurrentUrl`, this only matches the full URL. + * + * ``` php + * dontSeeCurrentUrlEquals('/'); + * ?> + * ``` + * + * @param $uri + * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals() + */ + public function dontSeeCurrentUrlEquals($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current URL matches the given regular expression. + * + * ``` php + * seeCurrentUrlMatches('~$/users/(\d+)~'); + * ?> + * ``` + * + * @param $uri + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches() + */ + public function canSeeCurrentUrlMatches($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlMatches', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the current URL matches the given regular expression. + * + * ``` php + * seeCurrentUrlMatches('~$/users/(\d+)~'); + * ?> + * ``` + * + * @param $uri + * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches() + */ + public function seeCurrentUrlMatches($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlMatches', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that current url doesn't match the given regular expression. + * + * ``` php + * dontSeeCurrentUrlMatches('~$/users/(\d+)~'); + * ?> + * ``` + * + * @param $uri + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches() + */ + public function cantSeeCurrentUrlMatches($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlMatches', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that current url doesn't match the given regular expression. + * + * ``` php + * dontSeeCurrentUrlMatches('~$/users/(\d+)~'); + * ?> + * ``` + * + * @param $uri + * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches() + */ + public function dontSeeCurrentUrlMatches($uri) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlMatches', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Executes the given regular expression against the current URI and returns the first match. + * If no parameters are provided, the full URI is returned. + * + * ``` php + * grabFromCurrentUrl('~$/user/(\d+)/~'); + * $uri = $I->grabFromCurrentUrl(); + * ?> + * ``` + * + * @param null $uri + * + * @return mixed + * @see \Codeception\Lib\InnerBrowser::grabFromCurrentUrl() + */ + public function grabFromCurrentUrl($uri = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('grabFromCurrentUrl', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the specified checkbox is checked. + * + * ``` php + * seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms + * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form. + * $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]'); + * ?> + * ``` + * + * @param $checkbox + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked() + */ + public function canSeeCheckboxIsChecked($checkbox) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCheckboxIsChecked', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the specified checkbox is checked. + * + * ``` php + * seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms + * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form. + * $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]'); + * ?> + * ``` + * + * @param $checkbox + * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked() + */ + public function seeCheckboxIsChecked($checkbox) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCheckboxIsChecked', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Check that the specified checkbox is unchecked. + * + * ``` php + * dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms + * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form. + * ?> + * ``` + * + * @param $checkbox + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked() + */ + public function cantSeeCheckboxIsChecked($checkbox) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCheckboxIsChecked', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Check that the specified checkbox is unchecked. + * + * ``` php + * dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms + * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form. + * ?> + * ``` + * + * @param $checkbox + * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked() + */ + public function dontSeeCheckboxIsChecked($checkbox) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCheckboxIsChecked', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given input field or textarea contains the given value. + * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath. + * + * ``` php + * seeInField('Body','Type your comment here'); + * $I->seeInField('form textarea[name=body]','Type your comment here'); + * $I->seeInField('form input[type=hidden]','hidden_value'); + * $I->seeInField('#searchform input','Search'); + * $I->seeInField('//form/*[@name=search]','Search'); + * $I->seeInField(['name' => 'search'], 'Search'); + * ?> + * ``` + * + * @param $field + * @param $value + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::seeInField() + */ + public function canSeeInField($field, $value) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInField', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given input field or textarea contains the given value. + * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath. + * + * ``` php + * seeInField('Body','Type your comment here'); + * $I->seeInField('form textarea[name=body]','Type your comment here'); + * $I->seeInField('form input[type=hidden]','hidden_value'); + * $I->seeInField('#searchform input','Search'); + * $I->seeInField('//form/*[@name=search]','Search'); + * $I->seeInField(['name' => 'search'], 'Search'); + * ?> + * ``` + * + * @param $field + * @param $value + * @see \Codeception\Lib\InnerBrowser::seeInField() + */ + public function seeInField($field, $value) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInField', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that an input field or textarea doesn't contain the given value. + * For fuzzy locators, the field is matched by label text, CSS and XPath. + * + * ``` php + * dontSeeInField('Body','Type your comment here'); + * $I->dontSeeInField('form textarea[name=body]','Type your comment here'); + * $I->dontSeeInField('form input[type=hidden]','hidden_value'); + * $I->dontSeeInField('#searchform input','Search'); + * $I->dontSeeInField('//form/*[@name=search]','Search'); + * $I->dontSeeInField(['name' => 'search'], 'Search'); + * ?> + * ``` + * + * @param $field + * @param $value + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::dontSeeInField() + */ + public function cantSeeInField($field, $value) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInField', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that an input field or textarea doesn't contain the given value. + * For fuzzy locators, the field is matched by label text, CSS and XPath. + * + * ``` php + * dontSeeInField('Body','Type your comment here'); + * $I->dontSeeInField('form textarea[name=body]','Type your comment here'); + * $I->dontSeeInField('form input[type=hidden]','hidden_value'); + * $I->dontSeeInField('#searchform input','Search'); + * $I->dontSeeInField('//form/*[@name=search]','Search'); + * $I->dontSeeInField(['name' => 'search'], 'Search'); + * ?> + * ``` + * + * @param $field + * @param $value + * @see \Codeception\Lib\InnerBrowser::dontSeeInField() + */ + public function dontSeeInField($field, $value) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInField', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks if the array of form parameters (name => value) are set on the form matched with the + * passed selector. + * + * ``` php + * seeInFormFields('form[name=myform]', [ + * 'input1' => 'value', + * 'input2' => 'other value', + * ]); + * ?> + * ``` + * + * For multi-select elements, or to check values of multiple elements with the same name, an + * array may be passed: + * + * ``` php + * seeInFormFields('.form-class', [ + * 'multiselect' => [ + * 'value1', + * 'value2', + * ], + * 'checkbox[]' => [ + * 'a checked value', + * 'another checked value', + * ], + * ]); + * ?> + * ``` + * + * Additionally, checkbox values can be checked with a boolean. + * + * ``` php + * seeInFormFields('#form-id', [ + * 'checkbox1' => true, // passes if checked + * 'checkbox2' => false, // passes if unchecked + * ]); + * ?> + * ``` + * + * Pair this with submitForm for quick testing magic. + * + * ``` php + * 'value', + * 'field2' => 'another value', + * 'checkbox1' => true, + * // ... + * ]; + * $I->submitForm('//form[@id=my-form]', $form, 'submitButton'); + * // $I->amOnPage('/path/to/form-page') may be needed + * $I->seeInFormFields('//form[@id=my-form]', $form); + * ?> + * ``` + * + * @param $formSelector + * @param $params + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::seeInFormFields() + */ + public function canSeeInFormFields($formSelector, $params) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInFormFields', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks if the array of form parameters (name => value) are set on the form matched with the + * passed selector. + * + * ``` php + * seeInFormFields('form[name=myform]', [ + * 'input1' => 'value', + * 'input2' => 'other value', + * ]); + * ?> + * ``` + * + * For multi-select elements, or to check values of multiple elements with the same name, an + * array may be passed: + * + * ``` php + * seeInFormFields('.form-class', [ + * 'multiselect' => [ + * 'value1', + * 'value2', + * ], + * 'checkbox[]' => [ + * 'a checked value', + * 'another checked value', + * ], + * ]); + * ?> + * ``` + * + * Additionally, checkbox values can be checked with a boolean. + * + * ``` php + * seeInFormFields('#form-id', [ + * 'checkbox1' => true, // passes if checked + * 'checkbox2' => false, // passes if unchecked + * ]); + * ?> + * ``` + * + * Pair this with submitForm for quick testing magic. + * + * ``` php + * 'value', + * 'field2' => 'another value', + * 'checkbox1' => true, + * // ... + * ]; + * $I->submitForm('//form[@id=my-form]', $form, 'submitButton'); + * // $I->amOnPage('/path/to/form-page') may be needed + * $I->seeInFormFields('//form[@id=my-form]', $form); + * ?> + * ``` + * + * @param $formSelector + * @param $params + * @see \Codeception\Lib\InnerBrowser::seeInFormFields() + */ + public function seeInFormFields($formSelector, $params) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInFormFields', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks if the array of form parameters (name => value) are not set on the form matched with + * the passed selector. + * + * ``` php + * dontSeeInFormFields('form[name=myform]', [ + * 'input1' => 'non-existent value', + * 'input2' => 'other non-existent value', + * ]); + * ?> + * ``` + * + * To check that an element hasn't been assigned any one of many values, an array can be passed + * as the value: + * + * ``` php + * dontSeeInFormFields('.form-class', [ + * 'fieldName' => [ + * 'This value shouldn\'t be set', + * 'And this value shouldn\'t be set', + * ], + * ]); + * ?> + * ``` + * + * Additionally, checkbox values can be checked with a boolean. + * + * ``` php + * dontSeeInFormFields('#form-id', [ + * 'checkbox1' => true, // fails if checked + * 'checkbox2' => false, // fails if unchecked + * ]); + * ?> + * ``` + * + * @param $formSelector + * @param $params + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields() + */ + public function cantSeeInFormFields($formSelector, $params) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInFormFields', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks if the array of form parameters (name => value) are not set on the form matched with + * the passed selector. + * + * ``` php + * dontSeeInFormFields('form[name=myform]', [ + * 'input1' => 'non-existent value', + * 'input2' => 'other non-existent value', + * ]); + * ?> + * ``` + * + * To check that an element hasn't been assigned any one of many values, an array can be passed + * as the value: + * + * ``` php + * dontSeeInFormFields('.form-class', [ + * 'fieldName' => [ + * 'This value shouldn\'t be set', + * 'And this value shouldn\'t be set', + * ], + * ]); + * ?> + * ``` + * + * Additionally, checkbox values can be checked with a boolean. + * + * ``` php + * dontSeeInFormFields('#form-id', [ + * 'checkbox1' => true, // fails if checked + * 'checkbox2' => false, // fails if unchecked + * ]); + * ?> + * ``` + * + * @param $formSelector + * @param $params + * @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields() + */ + public function dontSeeInFormFields($formSelector, $params) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInFormFields', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Submits the given form on the page, optionally with the given form + * values. Pass the form field's values as an array in the second + * parameter. + * + * Although this function can be used as a short-hand version of + * `fillField()`, `selectOption()`, `click()` etc. it has some important + * differences: + * + * * Only field *names* may be used, not CSS/XPath selectors nor field labels + * * If a field is sent to this function that does *not* exist on the page, + * it will silently be added to the HTTP request. This is helpful for testing + * some types of forms, but be aware that you will *not* get an exception + * like you would if you called `fillField()` or `selectOption()` with + * a missing field. + * + * Fields that are not provided will be filled by their values from the page, + * or from any previous calls to `fillField()`, `selectOption()` etc. + * You don't need to click the 'Submit' button afterwards. + * This command itself triggers the request to form's action. + * + * You can optionally specify which button's value to include + * in the request with the last parameter (as an alternative to + * explicitly setting its value in the second parameter), as + * button values are not otherwise included in the request. + * + * Examples: + * + * ``` php + * submitForm('#login', [ + * 'login' => 'davert', + * 'password' => '123456' + * ]); + * // or + * $I->submitForm('#login', [ + * 'login' => 'davert', + * 'password' => '123456' + * ], 'submitButtonName'); + * + * ``` + * + * For example, given this sample "Sign Up" form: + * + * ``` html + *
+ * Login: + *
+ * Password: + *
+ * Do you agree to our terms? + *
+ * Select pricing plan: + * + * + *
+ * ``` + * + * You could write the following to submit it: + * + * ``` php + * submitForm( + * '#userForm', + * [ + * 'user' => [ + * 'login' => 'Davert', + * 'password' => '123456', + * 'agree' => true + * ] + * ], + * 'submitButton' + * ); + * ``` + * Note that "2" will be the submitted value for the "plan" field, as it is + * the selected option. + * + * You can also emulate a JavaScript submission by not specifying any + * buttons in the third parameter to submitForm. + * + * ```php + * submitForm( + * '#userForm', + * [ + * 'user' => [ + * 'login' => 'Davert', + * 'password' => '123456', + * 'agree' => true + * ] + * ] + * ); + * ``` + * + * This function works well when paired with `seeInFormFields()` + * for quickly testing CRUD interfaces and form validation logic. + * + * ``` php + * 'value', + * 'field2' => 'another value', + * 'checkbox1' => true, + * // ... + * ]; + * $I->submitForm('#my-form', $form, 'submitButton'); + * // $I->amOnPage('/path/to/form-page') may be needed + * $I->seeInFormFields('#my-form', $form); + * ``` + * + * Parameter values can be set to arrays for multiple input fields + * of the same name, or multi-select combo boxes. For checkboxes, + * you can use either the string value or boolean `true`/`false` which will + * be replaced by the checkbox's value in the DOM. + * + * ``` php + * submitForm('#my-form', [ + * 'field1' => 'value', + * 'checkbox' => [ + * 'value of first checkbox', + * 'value of second checkbox', + * ], + * 'otherCheckboxes' => [ + * true, + * false, + * false + * ], + * 'multiselect' => [ + * 'first option value', + * 'second option value' + * ] + * ]); + * ``` + * + * Mixing string and boolean values for a checkbox's value is not supported + * and may produce unexpected results. + * + * Field names ending in `[]` must be passed without the trailing square + * bracket characters, and must contain an array for its value. This allows + * submitting multiple values with the same name, consider: + * + * ```php + * submitForm('#my-form', [ + * 'field[]' => 'value', + * 'field[]' => 'another value', // 'field[]' is already a defined key + * ]); + * ``` + * + * The solution is to pass an array value: + * + * ```php + * submitForm('#my-form', [ + * 'field' => [ + * 'value', + * 'another value', + * ] + * ]); + * ``` + * + * @param $selector + * @param $params + * @param $button + * @see \Codeception\Lib\InnerBrowser::submitForm() + */ + public function submitForm($selector, $params, $button = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('submitForm', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Fills a text field or textarea with the given string. + * + * ``` php + * fillField("//input[@type='text']", "Hello World!"); + * $I->fillField(['name' => 'email'], 'jon@mail.com'); + * ?> + * ``` + * + * @param $field + * @param $value + * @see \Codeception\Lib\InnerBrowser::fillField() + */ + public function fillField($field, $value) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('fillField', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Selects an option in a select tag or in radio button group. + * + * ``` php + * selectOption('form select[name=account]', 'Premium'); + * $I->selectOption('form input[name=payment]', 'Monthly'); + * $I->selectOption('//form/select[@name=account]', 'Monthly'); + * ?> + * ``` + * + * Provide an array for the second argument to select multiple options: + * + * ``` php + * selectOption('Which OS do you use?', array('Windows','Linux')); + * ?> + * ``` + * + * @param $select + * @param $option + * @see \Codeception\Lib\InnerBrowser::selectOption() + */ + public function selectOption($select, $option) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('selectOption', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Ticks a checkbox. For radio buttons, use the `selectOption` method instead. + * + * ``` php + * checkOption('#agree'); + * ?> + * ``` + * + * @param $option + * @see \Codeception\Lib\InnerBrowser::checkOption() + */ + public function checkOption($option) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('checkOption', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Unticks a checkbox. + * + * ``` php + * uncheckOption('#notify'); + * ?> + * ``` + * + * @param $option + * @see \Codeception\Lib\InnerBrowser::uncheckOption() + */ + public function uncheckOption($option) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('uncheckOption', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Attaches a file relative to the Codeception data directory to the given file upload field. + * + * ``` php + * attachFile('input[@type="file"]', 'prices.xls'); + * ?> + * ``` + * + * @param $field + * @param $filename + * @see \Codeception\Lib\InnerBrowser::attachFile() + */ + public function attachFile($field, $filename) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('attachFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * If your page triggers an ajax request, you can perform it manually. + * This action sends a GET ajax request with specified params. + * + * See ->sendAjaxPostRequest for examples. + * + * @param $uri + * @param $params + * @see \Codeception\Lib\InnerBrowser::sendAjaxGetRequest() + */ + public function sendAjaxGetRequest($uri, $params = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxGetRequest', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * If your page triggers an ajax request, you can perform it manually. + * This action sends a POST ajax request with specified params. + * Additional params can be passed as array. + * + * Example: + * + * Imagine that by clicking checkbox you trigger ajax request which updates user settings. + * We emulate that click by running this ajax request manually. + * + * ``` php + * sendAjaxPostRequest('/updateSettings', array('notifications' => true)); // POST + * $I->sendAjaxGetRequest('/updateSettings', array('notifications' => true)); // GET + * + * ``` + * + * @param $uri + * @param $params + * @see \Codeception\Lib\InnerBrowser::sendAjaxPostRequest() + */ + public function sendAjaxPostRequest($uri, $params = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxPostRequest', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * If your page triggers an ajax request, you can perform it manually. + * This action sends an ajax request with specified method and params. + * + * Example: + * + * You need to perform an ajax request specifying the HTTP method. + * + * ``` php + * sendAjaxRequest('PUT', '/posts/7', array('title' => 'new title')); + * + * ``` + * + * @param $method + * @param $uri + * @param $params + * @see \Codeception\Lib\InnerBrowser::sendAjaxRequest() + */ + public function sendAjaxRequest($method, $uri, $params = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxRequest', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Finds and returns the text contents of the given element. + * If a fuzzy locator is used, the element is found using CSS, XPath, and by matching the full page source by regular expression. + * + * ``` php + * grabTextFrom('h1'); + * $heading = $I->grabTextFrom('descendant-or-self::h1'); + * $value = $I->grabTextFrom('~ + * ``` + * + * @param $cssOrXPathOrRegex + * + * @return mixed + * @see \Codeception\Lib\InnerBrowser::grabTextFrom() + */ + public function grabTextFrom($cssOrXPathOrRegex) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('grabTextFrom', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Grabs the value of the given attribute value from the given element. + * Fails if element is not found. + * + * ``` php + * grabAttributeFrom('#tooltip', 'title'); + * ?> + * ``` + * + * + * @param $cssOrXpath + * @param $attribute + * + * @return mixed + * @see \Codeception\Lib\InnerBrowser::grabAttributeFrom() + */ + public function grabAttributeFrom($cssOrXpath, $attribute) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('grabAttributeFrom', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Grabs either the text content, or attribute values, of nodes + * matched by $cssOrXpath and returns them as an array. + * + * ```html + * First + * Second + * Third + * ``` + * + * ```php + * grabMultiple('a'); + * + * // would return ['#first', '#second', '#third'] + * $aLinks = $I->grabMultiple('a', 'href'); + * ?> + * ``` + * + * @param $cssOrXpath + * @param $attribute + * @return string[] + * @see \Codeception\Lib\InnerBrowser::grabMultiple() + */ + public function grabMultiple($cssOrXpath, $attribute = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('grabMultiple', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param $field + * + * @return array|mixed|null|string + * @see \Codeception\Lib\InnerBrowser::grabValueFrom() + */ + public function grabValueFrom($field) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('grabValueFrom', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Sets a cookie with the given name and value. + * You can set additional cookie params like `domain`, `path`, `expires`, `secure` in array passed as last argument. + * + * ``` php + * setCookie('PHPSESSID', 'el4ukv0kqbvoirg7nkp4dncpk3'); + * ?> + * ``` + * + * @param $name + * @param $val + * @param array $params + * + * @return mixed + * @see \Codeception\Lib\InnerBrowser::setCookie() + */ + public function setCookie($name, $val, $params = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('setCookie', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Grabs a cookie value. + * You can set additional cookie params like `domain`, `path` in array passed as last argument. + * + * @param $cookie + * + * @param array $params + * @return mixed + * @see \Codeception\Lib\InnerBrowser::grabCookie() + */ + public function grabCookie($cookie, $params = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('grabCookie', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that a cookie with the given name is set. + * You can set additional cookie params like `domain`, `path` as array passed in last argument. + * + * ``` php + * seeCookie('PHPSESSID'); + * ?> + * ``` + * + * @param $cookie + * @param array $params + * @return mixed + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::seeCookie() + */ + public function canSeeCookie($cookie, $params = null) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that a cookie with the given name is set. + * You can set additional cookie params like `domain`, `path` as array passed in last argument. + * + * ``` php + * seeCookie('PHPSESSID'); + * ?> + * ``` + * + * @param $cookie + * @param array $params + * @return mixed + * @see \Codeception\Lib\InnerBrowser::seeCookie() + */ + public function seeCookie($cookie, $params = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that there isn't a cookie with the given name. + * You can set additional cookie params like `domain`, `path` as array passed in last argument. + * + * @param $cookie + * + * @param array $params + * @return mixed + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::dontSeeCookie() + */ + public function cantSeeCookie($cookie, $params = null) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that there isn't a cookie with the given name. + * You can set additional cookie params like `domain`, `path` as array passed in last argument. + * + * @param $cookie + * + * @param array $params + * @return mixed + * @see \Codeception\Lib\InnerBrowser::dontSeeCookie() + */ + public function dontSeeCookie($cookie, $params = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCookie', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Unsets cookie with the given name. + * You can set additional cookie params like `domain`, `path` in array passed as last argument. + * + * @param $cookie + * + * @param array $params + * @return mixed + * @see \Codeception\Lib\InnerBrowser::resetCookie() + */ + public function resetCookie($name, $params = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('resetCookie', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given element exists on the page and is visible. + * You can also specify expected attributes of this element. + * + * ``` php + * seeElement('.error'); + * $I->seeElement('//form/input[1]'); + * $I->seeElement('input', ['name' => 'login']); + * $I->seeElement('input', ['value' => '123456']); + * + * // strict locator in first arg, attributes in second + * $I->seeElement(['css' => 'form input'], ['name' => 'login']); + * ?> + * ``` + * + * @param $selector + * @param array $attributes + * @return + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::seeElement() + */ + public function canSeeElement($selector, $attributes = null) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given element exists on the page and is visible. + * You can also specify expected attributes of this element. + * + * ``` php + * seeElement('.error'); + * $I->seeElement('//form/input[1]'); + * $I->seeElement('input', ['name' => 'login']); + * $I->seeElement('input', ['value' => '123456']); + * + * // strict locator in first arg, attributes in second + * $I->seeElement(['css' => 'form input'], ['name' => 'login']); + * ?> + * ``` + * + * @param $selector + * @param array $attributes + * @return + * @see \Codeception\Lib\InnerBrowser::seeElement() + */ + public function seeElement($selector, $attributes = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given element is invisible or not present on the page. + * You can also specify expected attributes of this element. + * + * ``` php + * dontSeeElement('.error'); + * $I->dontSeeElement('//form/input[1]'); + * $I->dontSeeElement('input', ['name' => 'login']); + * $I->dontSeeElement('input', ['value' => '123456']); + * ?> + * ``` + * + * @param $selector + * @param array $attributes + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::dontSeeElement() + */ + public function cantSeeElement($selector, $attributes = null) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given element is invisible or not present on the page. + * You can also specify expected attributes of this element. + * + * ``` php + * dontSeeElement('.error'); + * $I->dontSeeElement('//form/input[1]'); + * $I->dontSeeElement('input', ['name' => 'login']); + * $I->dontSeeElement('input', ['value' => '123456']); + * ?> + * ``` + * + * @param $selector + * @param array $attributes + * @see \Codeception\Lib\InnerBrowser::dontSeeElement() + */ + public function dontSeeElement($selector, $attributes = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeElement', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that there are a certain number of elements matched by the given locator on the page. + * + * ``` php + * seeNumberOfElements('tr', 10); + * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements + * ?> + * ``` + * @param $selector + * @param mixed $expected : + * - string: strict number + * - array: range of numbers [0,10] + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements() + */ + public function canSeeNumberOfElements($selector, $expected) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElements', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that there are a certain number of elements matched by the given locator on the page. + * + * ``` php + * seeNumberOfElements('tr', 10); + * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements + * ?> + * ``` + * @param $selector + * @param mixed $expected : + * - string: strict number + * - array: range of numbers [0,10] + * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements() + */ + public function seeNumberOfElements($selector, $expected) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberOfElements', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given option is selected. + * + * ``` php + * seeOptionIsSelected('#form input[name=payment]', 'Visa'); + * ?> + * ``` + * + * @param $selector + * @param $optionText + * + * @return mixed + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected() + */ + public function canSeeOptionIsSelected($selector, $optionText) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeOptionIsSelected', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given option is selected. + * + * ``` php + * seeOptionIsSelected('#form input[name=payment]', 'Visa'); + * ?> + * ``` + * + * @param $selector + * @param $optionText + * + * @return mixed + * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected() + */ + public function seeOptionIsSelected($selector, $optionText) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeOptionIsSelected', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given option is not selected. + * + * ``` php + * dontSeeOptionIsSelected('#form input[name=payment]', 'Visa'); + * ?> + * ``` + * + * @param $selector + * @param $optionText + * + * @return mixed + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected() + */ + public function cantSeeOptionIsSelected($selector, $optionText) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the given option is not selected. + * + * ``` php + * dontSeeOptionIsSelected('#form input[name=payment]', 'Visa'); + * ?> + * ``` + * + * @param $selector + * @param $optionText + * + * @return mixed + * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected() + */ + public function dontSeeOptionIsSelected($selector, $optionText) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeOptionIsSelected', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that current page has 404 response status code. + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::seePageNotFound() + */ + public function canSeePageNotFound() { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seePageNotFound', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that current page has 404 response status code. + * @see \Codeception\Lib\InnerBrowser::seePageNotFound() + */ + public function seePageNotFound() { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seePageNotFound', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that response code is equal to value provided. + * + * @param $code + * + * @return mixed + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs() + */ + public function canSeeResponseCodeIs($code) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIs', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that response code is equal to value provided. + * + * @param $code + * + * @return mixed + * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs() + */ + public function seeResponseCodeIs($code) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResponseCodeIs', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the page title contains the given string. + * + * ``` php + * seeInTitle('Blog - Post #1'); + * ?> + * ``` + * + * @param $title + * + * @return mixed + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::seeInTitle() + */ + public function canSeeInTitle($title) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInTitle', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the page title contains the given string. + * + * ``` php + * seeInTitle('Blog - Post #1'); + * ?> + * ``` + * + * @param $title + * + * @return mixed + * @see \Codeception\Lib\InnerBrowser::seeInTitle() + */ + public function seeInTitle($title) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInTitle', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the page title does not contain the given string. + * + * @param $title + * + * @return mixed + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle() + */ + public function cantSeeInTitle($title) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInTitle', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that the page title does not contain the given string. + * + * @param $title + * + * @return mixed + * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle() + */ + public function dontSeeInTitle($title) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInTitle', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Switch to iframe or frame on the page. + * + * Example: + * ``` html + *