From 607ae16dc36dc9522f16a12596e009b62cc1041f Mon Sep 17 00:00:00 2001 From: MBoretto Date: Tue, 7 Jul 2015 13:09:43 +0200 Subject: [PATCH 01/13] Ready to use --- composer.json | 5 +- composer.lock | 1875 ------------------------------------------------- 2 files changed, 2 insertions(+), 1878 deletions(-) delete mode 100644 composer.lock diff --git a/composer.json b/composer.json index 93c71ce65..9ff11b022 100644 --- a/composer.json +++ b/composer.json @@ -20,8 +20,7 @@ "require": { "php": ">=5.4.0", "ext-pdo": "*", - "ext-curl": "*", - "hoa/math": "~0.0" + "ext-curl": "*" }, "autoload": { "psr-4": { @@ -39,4 +38,4 @@ "phpspec/phpspec": "~2.1", "squizlabs/php_codesniffer": "2.3.*" } -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 5407875a9..000000000 --- a/composer.lock +++ /dev/null @@ -1,1875 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "hash": "e4b463e1eea6333a1eaf38457a54b29c", - "packages": [ - { - "name": "hoa/compiler", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/hoaproject/Compiler.git", - "reference": "4b448762461dc115ff8f63d0fede34a0dce45e4a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Compiler/zipball/4b448762461dc115ff8f63d0fede34a0dce45e4a", - "reference": "4b448762461dc115ff8f63d0fede34a0dce45e4a", - "shasum": "" - }, - "require": { - "hoa/core": "~2.0", - "hoa/file": "~0.0", - "hoa/iterator": "~1.0", - "hoa/math": "~0.0", - "hoa/regex": "~0.0", - "hoa/visitor": "~1.0" - }, - "require-dev": { - "hoa/json": "~1.0", - "hoa/test": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Hoa\\Compiler\\": "." - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" - }, - { - "name": "Hoa community", - "homepage": "http://hoa-project.net/" - } - ], - "description": "The Hoa\\Compiler library.", - "homepage": "http://hoa-project.net/", - "keywords": [ - "algebraic", - "ast", - "compiler", - "context-free", - "coverage", - "exhaustive", - "grammar", - "isotropic", - "language", - "lexer", - "library", - "ll1", - "llk", - "parser", - "pp", - "random", - "regular", - "rule", - "sampler", - "syntax", - "token", - "trace", - "uniform" - ], - "time": "2015-05-29 13:43:46" - }, - { - "name": "hoa/core", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/hoaproject/Core.git", - "reference": "d4b0dae92c8f1b64b11e6379502a668d5e318ed5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Core/zipball/d4b0dae92c8f1b64b11e6379502a668d5e318ed5", - "reference": "d4b0dae92c8f1b64b11e6379502a668d5e318ed5", - "shasum": "" - }, - "require": { - "ext-spl": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "hoa/test": "~1.0" - }, - "suggest": { - "ext-mbstring": "ext/mbstring must be present (or a third implementation).", - "hoa/console": "To use the `hoa` script.", - "hoa/dispatcher": "To use the `hoa` script.", - "hoa/router": "To use the `hoa` script." - }, - "bin": [ - "Bin/hoa" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Hoa\\Core\\": "." - }, - "files": [ - "Core.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" - }, - { - "name": "Hoa community", - "homepage": "http://hoa-project.net/" - } - ], - "description": "The Hoa\\Core library.", - "homepage": "http://hoa-project.net/", - "keywords": [ - "consistency", - "core", - "data", - "event", - "library", - "listener", - "parameter", - "protocol" - ], - "time": "2015-07-05 13:19:12" - }, - { - "name": "hoa/file", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/hoaproject/File.git", - "reference": "bd82aff5e81f16971c5fc99301a5c5717b1fd4da" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hoaproject/File/zipball/bd82aff5e81f16971c5fc99301a5c5717b1fd4da", - "reference": "bd82aff5e81f16971c5fc99301a5c5717b1fd4da", - "shasum": "" - }, - "require": { - "hoa/core": "~2.0", - "hoa/iterator": "~1.0", - "hoa/stream": "~0.0" - }, - "require-dev": { - "hoa/test": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Hoa\\File\\": "." - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" - }, - { - "name": "Hoa community", - "homepage": "http://hoa-project.net/" - } - ], - "description": "The Hoa\\File library.", - "homepage": "http://hoa-project.net/", - "keywords": [ - "Socket", - "directory", - "file", - "finder", - "library", - "link", - "temporary" - ], - "time": "2015-05-27 09:18:31" - }, - { - "name": "hoa/iterator", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/hoaproject/Iterator.git", - "reference": "57f548be192b365890d14c23f37810deaa77574d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Iterator/zipball/57f548be192b365890d14c23f37810deaa77574d", - "reference": "57f548be192b365890d14c23f37810deaa77574d", - "shasum": "" - }, - "require": { - "hoa/core": "~2.0" - }, - "require-dev": { - "hoa/test": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Hoa\\Iterator\\": "." - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" - }, - { - "name": "Hoa community", - "homepage": "http://hoa-project.net/" - } - ], - "description": "The Hoa\\Iterator library.", - "homepage": "http://hoa-project.net/", - "keywords": [ - "iterator", - "library" - ], - "time": "2015-05-29 13:56:28" - }, - { - "name": "hoa/math", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/hoaproject/Math.git", - "reference": "7d159567f4ee10de7391f5042dc957fd041f9dec" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Math/zipball/7d159567f4ee10de7391f5042dc957fd041f9dec", - "reference": "7d159567f4ee10de7391f5042dc957fd041f9dec", - "shasum": "" - }, - "require": { - "hoa/compiler": "~2.0", - "hoa/core": "~2.0", - "hoa/iterator": "~1.0" - }, - "require-dev": { - "hoa/test": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Hoa\\Math\\": "." - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" - }, - { - "name": "Hoa community", - "homepage": "http://hoa-project.net/" - } - ], - "description": "The Hoa\\Math library.", - "homepage": "http://hoa-project.net/", - "keywords": [ - "arrangement", - "combination", - "combinatorics", - "counting", - "library", - "math", - "permutation", - "sampler", - "set" - ], - "time": "2015-05-29 14:00:38" - }, - { - "name": "hoa/regex", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/hoaproject/Regex.git", - "reference": "2b194c1bc105b29bf31d387198340feeb9949340" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Regex/zipball/2b194c1bc105b29bf31d387198340feeb9949340", - "reference": "2b194c1bc105b29bf31d387198340feeb9949340", - "shasum": "" - }, - "require": { - "hoa/core": "~2.0", - "hoa/math": "~0.0", - "hoa/ustring": "~3.0", - "hoa/visitor": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Hoa\\Regex\\": "." - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" - }, - { - "name": "Hoa community", - "homepage": "http://hoa-project.net/" - } - ], - "description": "The Hoa\\Regex library.", - "homepage": "http://hoa-project.net/", - "keywords": [ - "compiler", - "library", - "regex" - ], - "time": "2015-05-29 14:06:08" - }, - { - "name": "hoa/stream", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/hoaproject/Stream.git", - "reference": "38b2ece5a0683f5cd91e4062dcf45f4885a3a826" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Stream/zipball/38b2ece5a0683f5cd91e4062dcf45f4885a3a826", - "reference": "38b2ece5a0683f5cd91e4062dcf45f4885a3a826", - "shasum": "" - }, - "require": { - "hoa/core": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Hoa\\Stream\\": "." - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" - }, - { - "name": "Hoa community", - "homepage": "http://hoa-project.net/" - } - ], - "description": "The Hoa\\Stream library.", - "homepage": "http://hoa-project.net/", - "keywords": [ - "Context", - "bucket", - "composite", - "filter", - "in", - "library", - "out", - "protocol", - "stream", - "wrapper" - ], - "time": "2015-05-29 14:11:35" - }, - { - "name": "hoa/ustring", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/hoaproject/Ustring.git", - "reference": "084312ab09cbfd84033fd6fdc671fac6ae6660a9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Ustring/zipball/084312ab09cbfd84033fd6fdc671fac6ae6660a9", - "reference": "084312ab09cbfd84033fd6fdc671fac6ae6660a9", - "shasum": "" - }, - "require": { - "ext-iconv": "*", - "hoa/core": "~2.0" - }, - "require-dev": { - "hoa/test": "~1.0" - }, - "suggest": { - "ext-intl": "To get a better Hoa\\Ustring::toAscii() and Hoa\\Ustring::compareTo()." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Hoa\\Ustring\\": "." - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" - }, - { - "name": "Hoa community", - "homepage": "http://hoa-project.net/" - } - ], - "description": "The Hoa\\Ustring library.", - "homepage": "http://hoa-project.net/", - "keywords": [ - "library", - "search", - "string", - "unicode" - ], - "time": "2015-05-29 13:36:54" - }, - { - "name": "hoa/visitor", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/hoaproject/Visitor.git", - "reference": "8211aaefedb158068c2349a491e2186e238b043b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Visitor/zipball/8211aaefedb158068c2349a491e2186e238b043b", - "reference": "8211aaefedb158068c2349a491e2186e238b043b", - "shasum": "" - }, - "require": { - "hoa/core": "~2.0" - }, - "require-dev": { - "hoa/test": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Hoa\\Visitor\\": "." - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net" - }, - { - "name": "Hoa community", - "homepage": "http://hoa-project.net/" - } - ], - "description": "The Hoa\\Visitor library.", - "homepage": "http://hoa-project.net/", - "keywords": [ - "library", - "structure", - "visit", - "visitor" - ], - "time": "2015-05-29 14:18:25" - } - ], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "dev-master", - "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": "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/php-diff", - "version": "v1.0.2", - "source": { - "type": "git", - "url": "https://github.com/phpspec/php-diff.git", - "reference": "30e103d19519fe678ae64a60d77884ef3d71b28a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/php-diff/zipball/30e103d19519fe678ae64a60d77884ef3d71b28a", - "reference": "30e103d19519fe678ae64a60d77884ef3d71b28a", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "Diff": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Chris Boulton", - "homepage": "http://github.com/chrisboulton", - "role": "Original developer" - } - ], - "description": "A comprehensive library for generating differences between two hashable objects (strings or arrays).", - "time": "2013-11-01 13:02:21" - }, - { - "name": "phpspec/phpspec", - "version": "2.3.0-beta", - "source": { - "type": "git", - "url": "https://github.com/phpspec/phpspec.git", - "reference": "5858b8b111023248ff8e9fc50e914c54118cd3ff" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/phpspec/zipball/5858b8b111023248ff8e9fc50e914c54118cd3ff", - "reference": "5858b8b111023248ff8e9fc50e914c54118cd3ff", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.1", - "php": ">=5.3.3", - "phpspec/php-diff": "~1.0.0", - "phpspec/prophecy": "~1.4", - "sebastian/exporter": "~1.0", - "symfony/console": "~2.3", - "symfony/event-dispatcher": "~2.1", - "symfony/finder": "~2.1", - "symfony/process": "~2.1", - "symfony/yaml": "~2.1" - }, - "require-dev": { - "behat/behat": "^3.0.11", - "bossa/phpspec2-expect": "~1.0", - "phpunit/phpunit": "~4.4", - "symfony/filesystem": "~2.1", - "symfony/process": "~2.1" - }, - "suggest": { - "phpspec/nyan-formatters": "~1.0 – Adds Nyan formatters" - }, - "bin": [ - "bin/phpspec" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev" - } - }, - "autoload": { - "psr-0": { - "PhpSpec": "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", - "homepage": "http://marcelloduarte.net/" - } - ], - "description": "Specification-oriented BDD framework for PHP 5.3+", - "homepage": "http://phpspec.net/", - "keywords": [ - "BDD", - "SpecBDD", - "TDD", - "spec", - "specification", - "testing", - "tests" - ], - "time": "2015-07-04 10:12:31" - }, - { - "name": "phpspec/prophecy", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "5700f75b23b0dd3495c0f495fe33a5e6717ee160" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/5700f75b23b0dd3495c0f495fe33a5e6717ee160", - "reference": "5700f75b23b0dd3495c0f495fe33a5e6717ee160", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" - }, - "require-dev": { - "phpspec/phpspec": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.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": "2015-06-30 10:26:46" - }, - { - "name": "phpunit/php-code-coverage", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "df88fdf48a61af29cc309545f9c8d425c63b8852" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/df88fdf48a61af29cc309545f9c8d425c63b8852", - "reference": "df88fdf48a61af29cc309545f9c8d425c63b8852", - "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.0", - "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-06-21 07:51:27" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.3.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "File/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "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": "2013-10-10 15:34:57" - }, - { - "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.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "83fe1bdc5d47658b727595c14da140da92b3d66d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/83fe1bdc5d47658b727595c14da140da92b3d66d", - "reference": "83fe1bdc5d47658b727595c14da140da92b3d66d", - "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-13 07:35:30" - }, - { - "name": "phpunit/php-token-stream", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "7a9b0969488c3c54fd62b4d504b3ec758fd005d9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/7a9b0969488c3c54fd62b4d504b3ec758fd005d9", - "reference": "7a9b0969488c3c54fd62b4d504b3ec758fd005d9", - "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-06-19 03:43:16" - }, - { - "name": "phpunit/phpunit", - "version": "4.1.x-dev", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "43914fa040d3bc85d316fac6ae15409c68bfa105" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/43914fa040d3bc85d316fac6ae15409c68bfa105", - "reference": "43914fa040d3bc85d316fac6ae15409c68bfa105", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpunit/php-code-coverage": "~2.0", - "phpunit/php-file-iterator": "~1.3.1", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "~1.0.2", - "phpunit/phpunit-mock-objects": "2.1.5", - "sebastian/comparator": "~1.0", - "sebastian/diff": "~1.1", - "sebastian/environment": "~1.0", - "sebastian/exporter": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "", - "../../symfony/yaml/" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "http://www.phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2015-02-09 06:33:19" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "2.1.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "7878b9c41edb3afab92b85edf5f0981014a2713a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/7878b9c41edb3afab92b85edf5f0981014a2713a", - "reference": "7878b9c41edb3afab92b85edf5f0981014a2713a", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.1" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "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": "2014-06-12 07:22:15" - }, - { - "name": "sebastian/comparator", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "abd05e77d364138c0532a1b78a13c4d78311f546" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/abd05e77d364138c0532a1b78a13c4d78311f546", - "reference": "abd05e77d364138c0532a1b78a13c4d78311f546", - "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.1.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-06-21 07:54:35" - }, - { - "name": "sebastian/diff", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "6899b3e33bfbd386d88b5eea5f65f563e8793051" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/6899b3e33bfbd386d88b5eea5f65f563e8793051", - "reference": "6899b3e33bfbd386d88b5eea5f65f563e8793051", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-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": "http://www.github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2015-06-22 14:15:55" - }, - { - "name": "sebastian/environment", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "bc66c3bbe6e5822c34395049e110566491cafa3b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/bc66c3bbe6e5822c34395049e110566491cafa3b", - "reference": "bc66c3bbe6e5822c34395049e110566491cafa3b", - "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": "2015-06-21 13:07:52" - }, - { - "name": "sebastian/exporter", - "version": "dev-master", - "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/recursion-context", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba", - "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-06-21 08:04:50" - }, - { - "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": "squizlabs/php_codesniffer", - "version": "2.3.3", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "c1a26c729508f73560c1a4f767f60b8ab6b4a666" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/c1a26c729508f73560c1a4f767f60b8ab6b4a666", - "reference": "c1a26c729508f73560c1a4f767f60b8ab6b4a666", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.1.2" - }, - "bin": [ - "scripts/phpcs", - "scripts/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Fixer.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", - "keywords": [ - "phpcs", - "standards" - ], - "time": "2015-06-24 03:16:23" - }, - { - "name": "symfony/console", - "version": "2.8.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/Console.git", - "reference": "333ddb595b2bc54f03bd093cf6b8b0f5c526b2eb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/333ddb595b2bc54f03bd093cf6b8b0f5c526b2eb", - "reference": "333ddb595b2bc54f03bd093cf6b8b0f5c526b2eb", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1|~3.0.0", - "symfony/phpunit-bridge": "~2.7|~3.0.0", - "symfony/process": "~2.1|~3.0.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - } - }, - "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": "2015-07-01 14:16:54" - }, - { - "name": "symfony/event-dispatcher", - "version": "2.8.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "d7246885b7fe4cb5a2786bda34362d2f0e40b730" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/d7246885b7fe4cb5a2786bda34362d2f0e40b730", - "reference": "d7246885b7fe4cb5a2786bda34362d2f0e40b730", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.0,>=2.0.5|~3.0.0", - "symfony/dependency-injection": "~2.6|~3.0.0", - "symfony/expression-language": "~2.6|~3.0.0", - "symfony/phpunit-bridge": "~2.7|~3.0.0", - "symfony/stopwatch": "~2.3|~3.0.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - } - }, - "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": "2015-06-24 15:32:32" - }, - { - "name": "symfony/finder", - "version": "2.8.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/Finder.git", - "reference": "9ecb7ee21ad2dd9451122fc1e6d1fc0acfd8d908" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/9ecb7ee21ad2dd9451122fc1e6d1fc0acfd8d908", - "reference": "9ecb7ee21ad2dd9451122fc1e6d1fc0acfd8d908", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7|~3.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - } - }, - "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": "2015-07-01 14:16:54" - }, - { - "name": "symfony/process", - "version": "2.8.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/Process.git", - "reference": "25d74c90d79e66905013714d8d188e4ccb5ff466" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/25d74c90d79e66905013714d8d188e4ccb5ff466", - "reference": "25d74c90d79e66905013714d8d188e4ccb5ff466", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7|~3.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - } - }, - "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": "2015-07-01 14:16:54" - }, - { - "name": "symfony/yaml", - "version": "2.8.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/Yaml.git", - "reference": "000e7fc2653335cd42c6d21405dac1c74224a387" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/000e7fc2653335cd42c6d21405dac1c74224a387", - "reference": "000e7fc2653335cd42c6d21405dac1c74224a387", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7|~3.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - } - }, - "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": "2015-07-01 14:16:54" - } - ], - "aliases": [], - "minimum-stability": "dev", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=5.4.0", - "ext-pdo": "*" - }, - "platform-dev": [] -} From 95f04caf5e3b3499146913e205bb340f374ec2d7 Mon Sep 17 00:00:00 2001 From: MBoretto Date: Tue, 7 Jul 2015 13:18:48 +0200 Subject: [PATCH 02/13] fix composer.json --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 9ff11b022..c60b21d17 100644 --- a/composer.json +++ b/composer.json @@ -4,10 +4,10 @@ "description": "PHP telegram bot", "keywords": ["telegram", "bot", "api"], "license": "MIT", - "homepage": "https://github.com/akalongman/php-telegram-bot", + "homepage": "https://github.com/mboretto/php-telegram-bot", "support": { - "issues": "https://github.com/akalongman/php-telegram-bot/issues", - "source": "https://github.com/akalongman/php-telegram-bot" + "issues": "https://github.com/mboretto/php-telegram-bot/issues", + "source": "https://github.com/mboretto/php-telegram-bot" }, "authors": [ { From 1ea92b9176f140582d1079ee3dfbfb1042945540 Mon Sep 17 00:00:00 2001 From: MBoretto Date: Tue, 7 Jul 2015 13:50:17 +0200 Subject: [PATCH 03/13] fix composer json --- composer.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/composer.json b/composer.json index c60b21d17..d27381a13 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,12 @@ "role": "Developer" } ], + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/MBoretto/php-telegram-bot" + } + ], "require": { "php": ">=5.4.0", "ext-pdo": "*", From f32d96b55a90da46c6c7a36d473f0416b93f5631 Mon Sep 17 00:00:00 2001 From: MBoretto Date: Tue, 7 Jul 2015 14:04:38 +0200 Subject: [PATCH 04/13] ixed composer --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d27381a13..669cd0460 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "longman/telegram-bot", + "name": "mboretto/telegram-bot", "type": "library", "description": "PHP telegram bot", "keywords": ["telegram", "bot", "api"], From b2c3a1feb9f9e3b1aa5b7c732576cf1c13726cbf Mon Sep 17 00:00:00 2001 From: MBoretto Date: Tue, 7 Jul 2015 14:10:44 +0200 Subject: [PATCH 05/13] la volta buona --- composer.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/composer.json b/composer.json index 669cd0460..892df4da1 100644 --- a/composer.json +++ b/composer.json @@ -17,12 +17,6 @@ "role": "Developer" } ], - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/MBoretto/php-telegram-bot" - } - ], "require": { "php": ">=5.4.0", "ext-pdo": "*", From 4ae387a84965dac6502c318bc8dd8d4f80f1863b Mon Sep 17 00:00:00 2001 From: MBoretto Date: Tue, 7 Jul 2015 14:19:39 +0200 Subject: [PATCH 06/13] composerjson --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 892df4da1..c72b749d3 100644 --- a/composer.json +++ b/composer.json @@ -1,13 +1,13 @@ { - "name": "mboretto/telegram-bot", + "name": "MBoretto/telegram-bot", "type": "library", "description": "PHP telegram bot", "keywords": ["telegram", "bot", "api"], "license": "MIT", - "homepage": "https://github.com/mboretto/php-telegram-bot", + "homepage": "https://github.com/MBoretto/php-telegram-bot", "support": { - "issues": "https://github.com/mboretto/php-telegram-bot/issues", - "source": "https://github.com/mboretto/php-telegram-bot" + "issues": "https://github.com/MBoretto/php-telegram-bot/issues", + "source": "https://github.com/MBoretto/php-telegram-bot" }, "authors": [ { From ac19ac11bfe29d377b6361043043e9b1adf104d0 Mon Sep 17 00:00:00 2001 From: MBoretto Date: Tue, 7 Jul 2015 14:29:59 +0200 Subject: [PATCH 07/13] ok --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index c72b749d3..8c18ebeca 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "MBoretto/telegram-bot", + "name": "mboretto/telegram-bot", "type": "library", "description": "PHP telegram bot", "keywords": ["telegram", "bot", "api"], @@ -7,7 +7,7 @@ "homepage": "https://github.com/MBoretto/php-telegram-bot", "support": { "issues": "https://github.com/MBoretto/php-telegram-bot/issues", - "source": "https://github.com/MBoretto/php-telegram-bot" + "source": "https://github.com/mboretto/php-telegram-bot" }, "authors": [ { From 84a16d4c1d86a0d5047b6c707e24a01e3f65bccf Mon Sep 17 00:00:00 2001 From: MBoretto Date: Thu, 16 Jul 2015 12:13:33 +0200 Subject: [PATCH 08/13] Introducing ReplyMakup.php Class and some usage example --- README.md | 3 +- src/Commands/ForcereplyCommand.php | 52 +++++++++++++++++++ src/Commands/HidekeyboardCommand.php | 50 +++++++++++++++++++ src/Commands/KeyboardCommand.php | 65 ++++++++++++++++++++++++ src/Entities/ReplyMarkup.php | 75 ++++++++++++++++++++++++++++ 5 files changed, 244 insertions(+), 1 deletion(-) create mode 100644 src/Commands/ForcereplyCommand.php create mode 100644 src/Commands/HidekeyboardCommand.php create mode 100644 src/Commands/KeyboardCommand.php create mode 100644 src/Entities/ReplyMarkup.php diff --git a/README.md b/README.md index 1caa6e938..861c8a3fc 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ A Telegram Bot based on the official [Telegram Bot API](https://core.telegram.or ## introduction -This is a pure php Telegram Bot, fully extensible via plugins. Telegram recently announced official support for a [Bot API](https://telegram.org/blog/bot-revolution) allowing integrators of all sorts to bring automated interactions to the mobile platform. This Bot aims to provide a platform where one could simply write a plugin and have interactions in a matter of minutes. +This is a pure php Telegram Bot, fully extensible via plugins. Telegram recently announced official support for a [Bot API](https://telegram.org/blog/bot-revolution) allowing integrators of all sorts to bring automated interactions to the mobile platform. This Bot aims to provide a platform where one could simply write a plugin and have interactions in a matter of minutes. +The Bot support Reply Markup and handle commands in the group chat. Instructions diff --git a/src/Commands/ForcereplyCommand.php b/src/Commands/ForcereplyCommand.php new file mode 100644 index 000000000..f7ce9eff8 --- /dev/null +++ b/src/Commands/ForcereplyCommand.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * Written by +*/ +namespace Longman\TelegramBot\Commands; + +use Longman\TelegramBot\Request; +use Longman\TelegramBot\Command; +use Longman\TelegramBot\Entities\Update; +use Longman\TelegramBot\Entities\ReplyMarkup; + +class ForceReplyCommand extends Command +{ + protected $name = 'forcereply'; + protected $description = 'Force reply with reply markup'; + protected $usage = '/forcereply'; + protected $version = '0.0.5'; + protected $enabled = true; + + public function execute() + { + $update = $this->getUpdate(); + $message = $this->getMessage(); + $message_id = $message->getMessageId(); + + $chat_id = $message->getChat()->getId(); + $text = $message->getText(true); + + $data = array(); + $data['chat_id'] = $chat_id; + $data['text'] = 'Write something:'; + #$data['reply_to_message_id'] = $message_id; + + $markup = new ReplyMarkup; + + //$markup->addForceReply($selective = false) + $markup->addForceReply(false); + + $json = $markup->getJsonQuery(); + $data['reply_markup'] = $json; + + $result = Request::sendMessage($data); + return $result; + } +} diff --git a/src/Commands/HidekeyboardCommand.php b/src/Commands/HidekeyboardCommand.php new file mode 100644 index 000000000..67a8c955d --- /dev/null +++ b/src/Commands/HidekeyboardCommand.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * Written by Marco Boretto +*/ +namespace Longman\TelegramBot\Commands; + +use Longman\TelegramBot\Request; +use Longman\TelegramBot\Command; +use Longman\TelegramBot\Entities\Update; +use Longman\TelegramBot\Entities\ReplyMarkup; + +class HidekeyboardCommand extends Command +{ + protected $name = 'hidekeyboard'; + protected $description = 'Hide the custom keyboard'; + protected $usage = '/hidekeyboard'; + protected $version = '0.0.5'; + protected $enabled = true; + + public function execute() + { + $update = $this->getUpdate(); + $message = $this->getMessage(); + $message_id = $message->getMessageId(); + + $chat_id = $message->getChat()->getId(); + $text = $message->getText(true); + + $data = array(); + $data['chat_id'] = $chat_id; + $data['text'] = 'Keyboard Hided'; + #$data['reply_to_message_id'] = $message_id; + + $markup = new ReplyMarkup; + //$markup->addKeyBoardHide($selective = false){ + $markup->addKeyBoardHide(false); + $json = $markup->getJsonQuery(); + $data['reply_markup'] = $json; + + $result = Request::sendMessage($data); + return $result; + } +} diff --git a/src/Commands/KeyboardCommand.php b/src/Commands/KeyboardCommand.php new file mode 100644 index 000000000..043376e57 --- /dev/null +++ b/src/Commands/KeyboardCommand.php @@ -0,0 +1,65 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * written by Marco Boretto +*/ +namespace Longman\TelegramBot\Commands; + +use Longman\TelegramBot\Request; +use Longman\TelegramBot\Command; +use Longman\TelegramBot\Entities\Update; +use Longman\TelegramBot\Entities\ReplyMarkup; + +class KeyboardCommand extends Command +{ + protected $name = 'keyboard'; + protected $description = 'Show a custom keybord with reply markup'; + protected $usage = '/keyboard'; + protected $version = '0.0.5'; + protected $enabled = true; + + public function execute() + { + $update = $this->getUpdate(); + $message = $this->getMessage(); + $message_id = $message->getMessageId(); + + $chat_id = $message->getChat()->getId(); + $text = $message->getText(true); + + $data = array(); + $data['chat_id'] = $chat_id; + $data['text'] = 'Press a Button:'; + #$data['reply_to_message_id'] = $message_id; + + + $markup = new ReplyMarkup; + + //$markup->addKeyBoard($options,$resize=false,$once=false,$selective=false) + //onother keyboard example + #$markup->addKeyBoard(array('A','B','C'),true,false,false); + //onother keyboard example + #$markup->addKeyBoard(array('A',array('B','B1'),'C'),true,false,false); + + + + $markup->addKeyBoard(array( + array('7','8','9'), + array('4','5','6'), + array('1','2','3'), + array('0') + ), true, false, false); + + $json = $markup->getJsonQuery(); + $data['reply_markup'] = $json; + + $result = Request::sendMessage($data); + return $result; + } +} diff --git a/src/Entities/ReplyMarkup.php b/src/Entities/ReplyMarkup.php new file mode 100644 index 000000000..a712decf8 --- /dev/null +++ b/src/Entities/ReplyMarkup.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * Written by Marco Boretto +*/ +namespace Longman\TelegramBot\Entities; + +use Longman\TelegramBot\Exception\TelegramException; + +class ReplyMarkup extends Entity +{ + protected $reply_markup_array; + + public function __construct() + { + $this->reply_markup_array = array(); + } + + public function addKeyBoard($options, $resize = false, $once = false, $selective = false) + { + if (is_array($options)) { + $list = array(); + foreach ($options as $item) { + if (is_array($item)) { + $list[] = $item; + } else { + $list[] = array($item); + } + } + $this->reply_markup_array['keyboard'] = $list; + + if ($resize == true) { + $this->reply_markup_array['resize_keyboard'] = true; + } + + if ($once == true) { + $this->reply_markup_array['one_time_keyboard'] = true; + } + + $this->addSelective($selective); + + return true; + } + return false; + } + + public function addKeyBoardHide($selective = false) + { + $this->reply_markup_array['hide_keyboard'] = true; + $this->addSelective($selective); + } + + public function addForceReply($selective = false) + { + $this->reply_markup_array['force_reply'] = true; + $this->addSelective($selective); + } + + protected function addSelective($selective = false) + { + if ($selective == true) { + $this->reply_markup_array['selective'] = true; + } + } + + public function getJsonQuery() + { + return json_encode($this->reply_markup_array); + } +} From 170608b9e72af9994043bf660c6aac2302ce9221 Mon Sep 17 00:00:00 2001 From: MBoretto Date: Thu, 16 Jul 2015 12:23:05 +0200 Subject: [PATCH 09/13] composer --- composer.json | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 composer.json diff --git a/composer.json b/composer.json deleted file mode 100644 index 8c18ebeca..000000000 --- a/composer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "mboretto/telegram-bot", - "type": "library", - "description": "PHP telegram bot", - "keywords": ["telegram", "bot", "api"], - "license": "MIT", - "homepage": "https://github.com/MBoretto/php-telegram-bot", - "support": { - "issues": "https://github.com/MBoretto/php-telegram-bot/issues", - "source": "https://github.com/mboretto/php-telegram-bot" - }, - "authors": [ - { - "name": "Avtandil Kikabidze aka LONGMAN", - "email": "akalongman@gmail.com", - "homepage": "http://longman.ge", - "role": "Developer" - } - ], - "require": { - "php": ">=5.4.0", - "ext-pdo": "*", - "ext-curl": "*" - }, - "autoload": { - "psr-4": { - "Longman\\TelegramBot\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Tests\\": "tests/" - } - }, - "minimum-stability": "dev", - "require-dev": { - "phpunit/phpunit": "4.1.*", - "phpspec/phpspec": "~2.1", - "squizlabs/php_codesniffer": "2.3.*" - } -} From e41966bb34e8d21242f8e6e925bb9c1dee4665d1 Mon Sep 17 00:00:00 2001 From: MBoretto Date: Thu, 16 Jul 2015 12:25:57 +0200 Subject: [PATCH 10/13] fix composer --- composer.json | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 composer.json diff --git a/composer.json b/composer.json new file mode 100644 index 000000000..eceeac2b8 --- /dev/null +++ b/composer.json @@ -0,0 +1,42 @@ +{ + "name": "longman/telegram-bot", + "type": "library", + "description": "PHP telegram bot", + "keywords": ["telegram", "bot", "api"], + "license": "MIT", + "homepage": "https://github.com/akalongman/php-telegram-bot", + "support": { + "issues": "https://github.com/akalongman/php-telegram-bot/issues", + "source": "https://github.com/akalongman/php-telegram-bot" + }, + "authors": [ + { + "name": "Avtandil Kikabidze aka LONGMAN", + "email": "akalongman@gmail.com", + "homepage": "http://longman.ge", + "role": "Developer" + } + ], + "require": { + "php": ">=5.4.0", + "ext-pdo": "*", + "ext-curl": "*", + "hoa/math": "~0.0" + }, + "autoload": { + "psr-4": { + "Longman\\TelegramBot\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/" + } + }, + "minimum-stability": "dev", + "require-dev": { + "phpunit/phpunit": "4.1.*", + "phpspec/phpspec": "~2.1", + "squizlabs/php_codesniffer": "2.3.*" + } +} From e44202bea32973326c2bf37c72c4ec39cdea3698 Mon Sep 17 00:00:00 2001 From: MBoretto Date: Sat, 18 Jul 2015 19:08:12 +0200 Subject: [PATCH 11/13] Uptodate reply markup tipes --- src/Commands/ForcereplyCommand.php | 19 +++++--- src/Commands/HidekeyboardCommand.php | 17 ++++--- src/Commands/KeyboardCommand.php | 66 ++++++++++++++++++++++------ src/Entities/ForceReply.php | 25 +++++++++++ src/Entities/ReplyKeyboardHide.php | 25 +++++++++++ src/Entities/ReplyKeyboardMarkup.php | 43 ++++++++++++++++++ 6 files changed, 170 insertions(+), 25 deletions(-) create mode 100644 src/Entities/ForceReply.php create mode 100644 src/Entities/ReplyKeyboardHide.php create mode 100644 src/Entities/ReplyKeyboardMarkup.php diff --git a/src/Commands/ForcereplyCommand.php b/src/Commands/ForcereplyCommand.php index f7ce9eff8..215cc52d4 100644 --- a/src/Commands/ForcereplyCommand.php +++ b/src/Commands/ForcereplyCommand.php @@ -14,7 +14,10 @@ use Longman\TelegramBot\Request; use Longman\TelegramBot\Command; use Longman\TelegramBot\Entities\Update; -use Longman\TelegramBot\Entities\ReplyMarkup; + +use Longman\TelegramBot\Entities\ReplyKeyboardMarkup; +use Longman\TelegramBot\Entities\ReplyKeyboardHide; +use Longman\TelegramBot\Entities\ForceReply; class ForceReplyCommand extends Command { @@ -38,14 +41,18 @@ public function execute() $data['text'] = 'Write something:'; #$data['reply_to_message_id'] = $message_id; - $markup = new ReplyMarkup; - - //$markup->addForceReply($selective = false) - $markup->addForceReply(false); + $json = ( + new ForceReply( + array( + 'selective' => false + ) + ) + )->toJSON(); - $json = $markup->getJsonQuery(); + #echo $json; $data['reply_markup'] = $json; + $result = Request::sendMessage($data); return $result; } diff --git a/src/Commands/HidekeyboardCommand.php b/src/Commands/HidekeyboardCommand.php index 67a8c955d..ce5acf142 100644 --- a/src/Commands/HidekeyboardCommand.php +++ b/src/Commands/HidekeyboardCommand.php @@ -14,7 +14,10 @@ use Longman\TelegramBot\Request; use Longman\TelegramBot\Command; use Longman\TelegramBot\Entities\Update; -use Longman\TelegramBot\Entities\ReplyMarkup; + +use Longman\TelegramBot\Entities\ReplyKeyboardMarkup; +use Longman\TelegramBot\Entities\ReplyKeyboardHide; +use Longman\TelegramBot\Entities\ForceReply; class HidekeyboardCommand extends Command { @@ -38,10 +41,14 @@ public function execute() $data['text'] = 'Keyboard Hided'; #$data['reply_to_message_id'] = $message_id; - $markup = new ReplyMarkup; - //$markup->addKeyBoardHide($selective = false){ - $markup->addKeyBoardHide(false); - $json = $markup->getJsonQuery(); + $json = ( + new ReplyKeyBoardHide( + array( + 'selective' => false + ) + ) + )->toJSON(); + $data['reply_markup'] = $json; $result = Request::sendMessage($data); diff --git a/src/Commands/KeyboardCommand.php b/src/Commands/KeyboardCommand.php index 043376e57..6f00a83ba 100644 --- a/src/Commands/KeyboardCommand.php +++ b/src/Commands/KeyboardCommand.php @@ -14,7 +14,10 @@ use Longman\TelegramBot\Request; use Longman\TelegramBot\Command; use Longman\TelegramBot\Entities\Update; -use Longman\TelegramBot\Entities\ReplyMarkup; + +use Longman\TelegramBot\Entities\ReplyKeyboardMarkup; +use Longman\TelegramBot\Entities\ReplyKeyboardHide; +use Longman\TelegramBot\Entities\ForceReply; class KeyboardCommand extends Command { @@ -39,24 +42,59 @@ public function execute() #$data['reply_to_message_id'] = $message_id; - $markup = new ReplyMarkup; - //$markup->addKeyBoard($options,$resize=false,$once=false,$selective=false) - //onother keyboard example - #$markup->addKeyBoard(array('A','B','C'),true,false,false); - //onother keyboard example - #$markup->addKeyBoard(array('A',array('B','B1'),'C'),true,false,false); + #Keyboard examples + $keyboards = array(); + + //0 + $keyboard[0] = array('7','8','9'); + $keyboard[1] = array('4','5','6'); + $keyboard[2] = array('1','2','3'); + $keyboard[3] = array(' ','0',' '); + + $keyboards[] = $keyboard; + unset($keyboard); + + //1 + $keyboard[0] = array('7','8','9','+'); + $keyboard[1] = array('4','5','6','-'); + $keyboard[2] = array('1','2','3','*'); + $keyboard[3] = array(' ','0',' ','/'); + + $keyboards[] = $keyboard; + unset($keyboard); + + + //2 + $keyboard[0] = array('A'); + $keyboard[1] = array('B'); + $keyboard[2] = array('C'); + + $keyboards[] = $keyboard; + unset($keyboard); + + + //3 + $keyboard[0] = array('A'); + $keyboard[1] = array('B'); + $keyboard[2] = array('C','D'); + $keyboards[] = $keyboard; + unset($keyboard); - $markup->addKeyBoard(array( - array('7','8','9'), - array('4','5','6'), - array('1','2','3'), - array('0') - ), true, false, false); - $json = $markup->getJsonQuery(); + $json = ( + new ReplyKeyboardMarkup( + array( + 'keyboard' => $keyboards[1] , + 'resize_keyboard' => true, + 'one_time_keyboard' => false, + 'selective' => false + ) + ) + )->toJSON(); + #echo $json; $data['reply_markup'] = $json; $result = Request::sendMessage($data); diff --git a/src/Entities/ForceReply.php b/src/Entities/ForceReply.php new file mode 100644 index 000000000..c3d4f7660 --- /dev/null +++ b/src/Entities/ForceReply.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * Written by Marco Boretto +*/ +namespace Longman\TelegramBot\Entities; + +use Longman\TelegramBot\Exception\TelegramException; + +class ForceReply extends Entity +{ + protected $force_reply; + protected $selective; + + public function __construct(array $data = null) + { + $this->force_reply = true; + $this->selective = isset($data['selective']) ? $data['selective'] : false; + } +} diff --git a/src/Entities/ReplyKeyboardHide.php b/src/Entities/ReplyKeyboardHide.php new file mode 100644 index 000000000..b3e1a7933 --- /dev/null +++ b/src/Entities/ReplyKeyboardHide.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * Written by Marco Boretto +*/ +namespace Longman\TelegramBot\Entities; + +use Longman\TelegramBot\Exception\TelegramException; + +class ReplyKeyboardHide extends Entity +{ + protected $hide_keyboard; + protected $selective; + + public function __construct(array $data = null) + { + $this->hide_keyboard = true; + $this->selective = isset($data['selective']) ? $data['selective'] : false; + } +} diff --git a/src/Entities/ReplyKeyboardMarkup.php b/src/Entities/ReplyKeyboardMarkup.php new file mode 100644 index 000000000..f66cfbbae --- /dev/null +++ b/src/Entities/ReplyKeyboardMarkup.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * Written by Marco Boretto +*/ +namespace Longman\TelegramBot\Entities; + +use Longman\TelegramBot\Exception\TelegramException; + +class ReplyKeyboardMarkup extends Entity +{ + protected $keyboard; + protected $resize_keyboard; + protected $one_time_keyboard; + protected $selective; + + public function __construct($data = array()) + { + if (isset($data['keyboard'])) { + if (is_array($data['keyboard'])) { + foreach ($data['keyboard'] as $item) { + if (!is_array($item)) { + throw new TelegramException('Keyboard subfield is not an array!'); + } + } + $this->keyboard = $data['keyboard']; + } else { + throw new TelegramException('Keyboard field is not an array!'); + } + } else { + throw new TelegramException('Keyboard field is empty!'); + } + + $this->resize_keyboard = isset($data['resize_keyboard']) ? $data['resize_keyboard'] : false; + $this->one_time_keyboard = isset($data['one_time_keyboard']) ? $data['one_time_keyboard'] : false; + $this->selective = isset($data['selective']) ? $data['selective'] : false; + } +} From dc15c4c16e00c3cad540b8ed2f9e89ddf2402480 Mon Sep 17 00:00:00 2001 From: MBoretto Date: Sat, 18 Jul 2015 19:09:13 +0200 Subject: [PATCH 12/13] Delete unuseful file --- src/Entities/ReplyMarkup.php | 75 ------------------------------------ 1 file changed, 75 deletions(-) delete mode 100644 src/Entities/ReplyMarkup.php diff --git a/src/Entities/ReplyMarkup.php b/src/Entities/ReplyMarkup.php deleted file mode 100644 index a712decf8..000000000 --- a/src/Entities/ReplyMarkup.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * Written by Marco Boretto -*/ -namespace Longman\TelegramBot\Entities; - -use Longman\TelegramBot\Exception\TelegramException; - -class ReplyMarkup extends Entity -{ - protected $reply_markup_array; - - public function __construct() - { - $this->reply_markup_array = array(); - } - - public function addKeyBoard($options, $resize = false, $once = false, $selective = false) - { - if (is_array($options)) { - $list = array(); - foreach ($options as $item) { - if (is_array($item)) { - $list[] = $item; - } else { - $list[] = array($item); - } - } - $this->reply_markup_array['keyboard'] = $list; - - if ($resize == true) { - $this->reply_markup_array['resize_keyboard'] = true; - } - - if ($once == true) { - $this->reply_markup_array['one_time_keyboard'] = true; - } - - $this->addSelective($selective); - - return true; - } - return false; - } - - public function addKeyBoardHide($selective = false) - { - $this->reply_markup_array['hide_keyboard'] = true; - $this->addSelective($selective); - } - - public function addForceReply($selective = false) - { - $this->reply_markup_array['force_reply'] = true; - $this->addSelective($selective); - } - - protected function addSelective($selective = false) - { - if ($selective == true) { - $this->reply_markup_array['selective'] = true; - } - } - - public function getJsonQuery() - { - return json_encode($this->reply_markup_array); - } -} From 1053c036e086faada7509eb6997ad05501d9cbc1 Mon Sep 17 00:00:00 2001 From: MBoretto Date: Sun, 19 Jul 2015 01:14:33 +0200 Subject: [PATCH 13/13] Added some methods in Message Entity --- src/Entities/Message.php | 50 ++++++++++++++++++++++++++++++++++++++++ src/Telegram.php | 2 +- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/src/Entities/Message.php b/src/Entities/Message.php index 1eb34387e..ef9364583 100644 --- a/src/Entities/Message.php +++ b/src/Entities/Message.php @@ -100,6 +100,26 @@ public function __construct(array $data, $bot_name) if (!empty($this->reply_to_message)) { $this->reply_to_message = new Message($this->reply_to_message); } + + $this->new_chat_participant = isset($data['new_chat_participant']) ? $data['new_chat_participant'] : null; + if (!empty($this->new_chat_participant)) { + $this->new_chat_participant = new User($this->new_chat_participant); + } + + $this->left_chat_participant = isset($data['left_chat_participant']) ? $data['left_chat_participant'] : null; + if (!empty($this->left_chat_participant)) { + $this->left_chat_participant = new User($this->left_chat_participant); + } + + $this->new_chat_title = isset($data['new_chat_title']) ? $data['new_chat_title'] : null; + + $this->delete_chat_photo = isset($data['delete_chat_photo']) ? $data['delete_chat_photo'] : null; + + $this->group_chat_created = isset($data['group_chat_created']) ? $data['group_chat_created'] : null; + + + + } //return the entire command like /echo or /echo@bot1 if specified @@ -178,6 +198,36 @@ public function getReplyToMessage() return $this->reply_to_message; } + public function getNewChatParticipant() + { + + return $this->new_chat_participant; + } + + public function getLeftChatParticipant() + { + + return $this->left_chat_participant; + } + + public function getNewChatTitle() + { + + return $this->new_chat_title; + } + + public function getDeleteChatPhoto() + { + + return $this->delete_chat_photo; + } + + public function getGroupChatCreated() + { + + return $this->group_chat_created; + } + public function getText($without_cmd = false) { $text = $this->text; diff --git a/src/Telegram.php b/src/Telegram.php index bdd048374..7fd05cefc 100644 --- a/src/Telegram.php +++ b/src/Telegram.php @@ -284,7 +284,7 @@ public function handle() * * @return mixed */ - protected function executeCommand($command, Update $update) + public function executeCommand($command, Update $update) { $class = $this->getCommandClass($command, $update); if (empty($class)) {