pax_global_header00006660000000000000000000000064132701177160014517gustar00rootroot0000000000000052 comment=a5e2583a211f73604691586b8406ff7296a946dd zend-eventmanager-release-3.2.1/000077500000000000000000000000001327011771600165525ustar00rootroot00000000000000zend-eventmanager-release-3.2.1/CHANGELOG.md000066400000000000000000000234211327011771600203650ustar00rootroot00000000000000# Changelog All notable changes to this project will be documented in this file, in reverse chronological order by release. ## 3.2.1 - 2018-04-25 ### Added - [#66](https://github.com/zendframework/zend-eventmanager/pull/66) adds support for PHP 7.2. ### Changed - Nothing. ### Deprecated - Nothing. ### Removed - Nothing. ### Fixed - Nothing. ## 3.2.0 - 2017-07-11 ### Added - Nothing. ### Deprecated - Nothing. ### Removed - [#47](https://github.com/zendframework/zend-eventmanager/pull/47) removes support for PHP 5.5 and HHVM. ### Fixed - Nothing. ## 3.1.0 - 2016-12-19 ### Added - [#26](https://github.com/zendframework/zend-eventmanager/pull/26) publishes the documentation to https://zendframework.github.io/zend-eventmanager/ ### Changes - [#17](https://github.com/zendframework/zend-eventmanager/pull/17) makes a number of internal changes to how listeners are stored in order to improve performance, by as much as 10% in the scenario used in the MVC layer. Additionally, it optimizes when the target and event arguments are injected into an event, eliminating that step entirely when either is unavailable. ### Deprecated - Nothing. ### Removed - Nothing. ### Fixed - Nothing. ## 3.0.1 - 2016-02-18 ### Added - Nothing. ### Deprecated - Nothing. ### Removed - Nothing. ### Fixed - [#24](https://github.com/zendframework/zend-eventmanager/pull/24) updates the zend-stdlib dependency to `^2.7.3 || ^3.0`, allowing either major version. ## 3.0.0 - 2016-01-12 ### Added - [Migration documentation](doc/book/migration/) was added. - [Automated benchmarks](benchmarks/) were added. - `EventManager::__construct()` now accepts an optional `SharedEventManagerInterface` instance as the first argument, and an optional array of identifiers as the second. As identifiers have no meaning without a shared manager present, they are secondary to providing the shared manager. - `EventManagerInterface::trigger()` changes its signature to `trigger($eventName, $target = null, $argv = [])`; each argument has exactly one possible meaning; the `$eventName` can only be a string event name. The fourth `$callback` argument is removed. - `EventManagerInterface::triggerUntil()` changes its signature to `triggerUntil(callable $callback, $eventName, $target = null, $argv = null)`. Each argument has exactly one meaning. - `EventManagerInterface` adds two new methods for triggering provided `EventInterface` arguments: `triggerEvent(EventInterface $event)` and `triggerEventUntil(callable $callback, EventInterface $event)`. - `EventManagerInterface::attach()` and `detach()` change their signatures to `attach($eventName, callable $listener, $priority = 1)` and `detach(callable $listener, $eventName = null)`, respectively. Note that `$eventName` can now only be a string event name, not an array or `Traversable`. - `EventManagerInterface::setIdentifiers()` and `addIdentifiers()` change their signatures to each only accept an *array* of identifiers. - `SharedEventManagerInterface::getListeners()` changes signature to `getListeners(array $identifiers, $eventName)` and now guarantees return of an array. Note that the second argument is now *required*. - `SharedEventManagerInterface::attach()` changes signature to `attach($identifier, $eventName, callable $listener, $priority = 1)`. The `$identifier` and `$eventName` **must** be strings. - `SharedEventManagerInterface::detach()` changes signature to `detach(callable $listener, $identifier = null, $eventName = null)`; `$identifier` and `$eventName` **must** be strings if passed. - `ListenerAggregateInterface::attach()` adds an optional `$priority = 1` argument. This was used already in v2, but not dictated by the interface. - `FilterInterface::attach()` and `detach()` have changed signature to `attach(callable $callback)` and `detach(callable $ilter)`, respectively. - `LazyListener` allows wrapping: - fetching a listener service from a container-interop container, and - invoking a designated listener method with the provided event. - `LazyEventListener` extends `LazyListener`, and provides metadata for discovering the intended event name and priority at which to attach the lazy listener; these are consumed by: - `LazyListenerAggregate`, which, provided a list of `LazyEventListeners` and/or definitions to use to create them, acts as an aggregate for attaching a number of such listeners at once. - [#20](https://github.com/zendframework/zend-eventmanager/pull/20) updates the trait `Zend\EventManager\Test\EventListenerIntrospectionTrait` so that the implementation will work with the v3 changes; the tests written for v2 continue to pass, allowing this trait to be used to provide compatibility testing between v2 and v3. ### Deprecated - Nothing. ### Removed - `GlobalEventManager` and `StaticEventManager` are removed (with prejudice!). - `ProvidesEvents`, which was previously deprecated, is removed. - `EventManagerInterface::setSharedManager()` is removed. Shared managers are now expected to be injected during instantiation. - `EventManagerInterface::getEvents()` and `getListeners()` are removed; they had now purpose within the implementation. - `EventManagerInterface::setEventClass()` was renamed to `setEventPrototype()`, which now expects an `EventInterface` instance. That instance will be cloned whenever a new event is created. - `EventManagerInterface::attachAggregate()` and `detachAggregate()` are removed. Users should use the `attach()` and `detach()` methods of the aggregates themselves. - `SharedEventAggregateAwareInterface` and `SharedListenerAggregateInterface` are removed. This was an undocumented and largely unused feature. - `SharedEventManagerAwareInterface` is removed. A new interface, `SharedEventsCapableInterface` defines the `getSharedManager()` method from the interface, and `EventManagerInterface` extends that new interface. - `SharedEventManagerInterface::getEvents()` is removed, as it had no purpose in the implementation. - `ResponseCollection::setStopped()` no longer implements a fluent interface. ### Fixed - `FilterIterator::insert()` has been modified to raise an exception if the value provided is not a callable. ## 2.6.2 - 2016-01-12 ### Added - [#19](https://github.com/zendframework/zend-eventmanager/pull/19) adds a new trait, `Zend\EventManager\Test\EventListenerIntrospectionTrait`, intended for composition in unit tests. It provides a number of methods that can be used to retrieve listeners with or without associated priority, and the assertion `assertListenerAtPriority(callable $listener, $priority, $event, EventManager $events, $message = '')`, which can be used for testing that a listener was registered at the specified priority with the specified event. The features in this patch are intended to facilitate testing against both version 2 and version 3 of zend-eventmanager, as it provides a consistent API for retrieving lists of events and listeners between the two versions. ### Deprecated - Nothing. ### Removed - Nothing. ### Fixed - Nothing. ## 2.6.0 - 2015-09-29 ### Added - Added `Zend\EventManager\SharedEventsCapableInterface`. This interface will largely replace `Zend\EventManager\SharedEventManagerAwareInterface` in version 3, and the latter was updated to extend it. - Added `EventManager::triggerEvent(EventInterface $event)` as a forwards-compatibility feature. - Add `EventManager::triggerEventUntil(callable $callback, EventIterface $event)` as a forwards-compatibility feature. - Adds [Athletic](https://github.com/polyfractal/athletic) benchmarks to aid in gauging performanc impact of changes; these are a development change only. ### Deprecated - Marked `GlobalEventManager` as deprecated; this class will be removed in version 3. - Marked `StaticEventManager` as deprecated; this class will be removed in version 3. - Marked `SharedListenerAggregateInterface` as deprecated; this interface will be removed in version 3. - Marked `SharedEventAggregateAwareInterface` as deprecated; this interface will be removed in version 3. - Marked `SharedEventManagerAwareInterface` as deprecated; this interface will be removed in version 3. - Marked `EventManager::setSharedManager()` as deprecated; this method will be removed in version 3. - Marked `EventManager::unsetSharedManager()` as deprecated; this method will be removed in version 3. - Marked `EventManagerInterface::` and `EventManager::getEvents()` as deprecated; this method will be removed in version 3. - Marked `EventManagerInterface::` and `EventManager::getListeners()` as deprecated; this method will be removed in version 3. - Marked `EventManagerInterface::` and `Eventmanager::setEventClass()` as deprecated; this method is renamed to `setEventPrototype(EventInterface $event)` in version 3. - Marked `EventManagerInterface::` and `EventManager::attachAggregate()` as deprecated; this method will be removed in version 3. - Marked `EventManagerInterface::` and `EventManager::detachAggregate()` as deprecated; this method will be removed in version 3. - Marked `SharedEventManagerInterface::` and `SharedEventManager::getEvents()` as deprecated; this method will be removed in version 3. ### Removed - Nothing. ### Fixed - Nothing. ## 2.5.2 - 2015-07-16 ### Added - [#5](https://github.com/zendframework/zend-eventmanager/pull/5) adds a number of unit tests to improve test coverage, and thus maintainability and stability. ### Deprecated - Nothing. ### Removed - [#3](https://github.com/zendframework/zend-eventmanager/pull/3) removes some PHP 5.3- and 5.4-isms (such as marking Traits as requiring 5.4, and closing over a copy of `$this`) from the test suite. ### Fixed - [#5](https://github.com/zendframework/zend-eventmanager/pull/5) fixes a bug in `FilterIterator` that occurs when attempting to extract from an empty heap. zend-eventmanager-release-3.2.1/CONDUCT.md000066400000000000000000000045121327011771600201750ustar00rootroot00000000000000# Contributor Code of Conduct The Zend Framework project adheres to [The Code Manifesto](http://codemanifesto.com) as its guidelines for contributor interactions. ## The Code Manifesto We want to work in an ecosystem that empowers developers to reach their potential — one that encourages growth and effective collaboration. A space that is safe for all. A space such as this benefits everyone that participates in it. It encourages new developers to enter our field. It is through discussion and collaboration that we grow, and through growth that we improve. In the effort to create such a place, we hold to these values: 1. **Discrimination limits us.** This includes discrimination on the basis of race, gender, sexual orientation, gender identity, age, nationality, technology and any other arbitrary exclusion of a group of people. 2. **Boundaries honor us.** Your comfort levels are not everyone’s comfort levels. Remember that, and if brought to your attention, heed it. 3. **We are our biggest assets.** None of us were born masters of our trade. Each of us has been helped along the way. Return that favor, when and where you can. 4. **We are resources for the future.** As an extension of #3, share what you know. Make yourself a resource to help those that come after you. 5. **Respect defines us.** Treat others as you wish to be treated. Make your discussions, criticisms and debates from a position of respectfulness. Ask yourself, is it true? Is it necessary? Is it constructive? Anything less is unacceptable. 6. **Reactions require grace.** Angry responses are valid, but abusive language and vindictive actions are toxic. When something happens that offends you, handle it assertively, but be respectful. Escalate reasonably, and try to allow the offender an opportunity to explain themselves, and possibly correct the issue. 7. **Opinions are just that: opinions.** Each and every one of us, due to our background and upbringing, have varying opinions. The fact of the matter, is that is perfectly acceptable. Remember this: if you respect your own opinions, you should respect the opinions of others. 8. **To err is human.** You might not intend it, but mistakes do happen and contribute to build experience. Tolerate honest mistakes, and don't hesitate to apologize if you make one yourself. zend-eventmanager-release-3.2.1/CONTRIBUTING.md000066400000000000000000000166731327011771600210200ustar00rootroot00000000000000# CONTRIBUTING ## RESOURCES If you wish to contribute to Zend Framework, please be sure to read/subscribe to the following resources: - [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards) - [Contributor's Guide](http://framework.zend.com/participate/contributor-guide) - ZF Contributor's mailing list: Archives: http://zend-framework-community.634137.n4.nabble.com/ZF-Contributor-f680267.html Subscribe: zf-contributors-subscribe@lists.zend.com - ZF Contributor's IRC channel: #zftalk.dev on Freenode.net If you are working on new features or refactoring [create a proposal](https://github.com/zendframework/zend-event-manager/issues/new). ## Reporting Potential Security Issues If you have encountered a potential security vulnerability, please **DO NOT** report it on the public issue tracker: send it to us at [zf-security@zend.com](mailto:zf-security@zend.com) instead. We will work with you to verify the vulnerability and patch it as soon as possible. When reporting issues, please provide the following information: - Component(s) affected - A description indicating how to reproduce the issue - A summary of the security vulnerability and impact We request that you contact us via the email address above and give the project contributors a chance to resolve the vulnerability and issue a new release prior to any public exposure; this helps protect users and provides them with a chance to upgrade and/or update in order to protect their applications. For sensitive email communications, please use [our PGP key](http://framework.zend.com/zf-security-pgp-key.asc). ## RUNNING TESTS > ### Note: testing versions prior to 2.4 > > This component originates with Zend Framework 2. During the lifetime of ZF2, > testing infrastructure migrated from PHPUnit 3 to PHPUnit 4. In most cases, no > changes were necessary. However, due to the migration, tests may not run on > versions < 2.4. As such, you may need to change the PHPUnit dependency if > attempting a fix on such a version. To run tests: - Clone the repository: ```console $ git clone git@github.com:zendframework/zend-event-manager.git $ cd ``` - Install dependencies via composer: ```console $ curl -sS https://getcomposer.org/installer | php -- $ ./composer.phar install ``` If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/ - Run the tests via `phpunit` and the provided PHPUnit config, like in this example: ```console $ ./vendor/bin/phpunit ``` You can turn on conditional tests with the phpunit.xml file. To do so: - Copy `phpunit.xml.dist` file to `phpunit.xml` - Edit `phpunit.xml` to enable any specific functionality you want to test, as well as to provide test values to utilize. ## Running Coding Standards Checks This component uses [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) for coding standards checks, and provides configuration for our selected checks. `phpcs` is installed by default via Composer. To run checks only: ```console $ composer cs-check ``` `phpcs` also includes a tool for fixing most CS violations, `phpcbf`: ```console $ composer cs-fix ``` If you allow `phpcbf` to fix CS issues, please re-run the tests to ensure they pass, and make sure you add and commit the changes after verification. ## Recommended Workflow for Contributions Your first step is to establish a public repository from which we can pull your work into the master repository. We recommend using [GitHub](https://github.com), as that is where the component is already hosted. 1. Setup a [GitHub account](http://github.com/), if you haven't yet 2. Fork the repository (http://github.com/zendframework/zend-event-manager) 3. Clone the canonical repository locally and enter it. ```console $ git clone git://github.com:zendframework/zend-event-manager.git $ cd zend-event-manager ``` 4. Add a remote to your fork; substitute your GitHub username in the command below. ```console $ git remote add {username} git@github.com:{username}/zend-event-manager.git $ git fetch {username} ``` ### Keeping Up-to-Date Periodically, you should update your fork or personal repository to match the canonical ZF repository. Assuming you have setup your local repository per the instructions above, you can do the following: ```console $ git checkout master $ git fetch origin $ git rebase origin/master # OPTIONALLY, to keep your remote up-to-date - $ git push {username} master:master ``` If you're tracking other branches -- for example, the "develop" branch, where new feature development occurs -- you'll want to do the same operations for that branch; simply substitute "develop" for "master". ### Working on a patch We recommend you do each new feature or bugfix in a new branch. This simplifies the task of code review as well as the task of merging your changes into the canonical repository. A typical workflow will then consist of the following: 1. Create a new local branch based off either your master or develop branch. 2. Switch to your new local branch. (This step can be combined with the previous step with the use of `git checkout -b`.) 3. Do some work, commit, repeat as necessary. 4. Push the local branch to your remote repository. 5. Send a pull request. The mechanics of this process are actually quite trivial. Below, we will create a branch for fixing an issue in the tracker. ```console $ git checkout -b hotfix/9295 Switched to a new branch 'hotfix/9295' ``` ... do some work ... ```console $ git commit ``` ... write your log message ... ```console $ git push {username} hotfix/9295:hotfix/9295 Counting objects: 38, done. Delta compression using up to 2 threads. Compression objects: 100% (18/18), done. Writing objects: 100% (20/20), 8.19KiB, done. Total 20 (delta 12), reused 0 (delta 0) To ssh://git@github.com/{username}/zend-event-manager.git b5583aa..4f51698 HEAD -> master ``` To send a pull request, you have two options. If using GitHub, you can do the pull request from there. Navigate to your repository, select the branch you just created, and then select the "Pull Request" button in the upper right. Select the user/organization "zendframework" as the recipient. If using your own repository - or even if using GitHub - you can use `git format-patch` to create a patchset for us to apply; in fact, this is **recommended** for security-related patches. If you use `format-patch`, please send the patches as attachments to: - zf-devteam@zend.com for patches without security implications - zf-security@zend.com for security patches #### What branch to issue the pull request against? Which branch should you issue a pull request against? - For fixes against the stable release, issue the pull request against the "master" branch. - For new features, or fixes that introduce new elements to the public API (such as new public methods or properties), issue the pull request against the "develop" branch. ### Branch Cleanup As you might imagine, if you are a frequent contributor, you'll start to get a ton of branches both locally and on your remote. Once you know that your changes have been accepted to the master repository, we suggest doing some cleanup of these branches. - Local branch cleanup ```console $ git branch -d ``` - Remote branch removal ```console $ git push {username} : ``` ## Conduct Please see our [CONDUCT.md](CONDUCT.md) to understand expected behavior when interacting with others in the project. zend-eventmanager-release-3.2.1/LICENSE.md000066400000000000000000000027551327011771600201670ustar00rootroot00000000000000Copyright (c) 2005-2015, Zend Technologies USA, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Zend Technologies USA, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. zend-eventmanager-release-3.2.1/README.md000066400000000000000000000025171327011771600200360ustar00rootroot00000000000000# zend-eventmanager [![Build Status](https://secure.travis-ci.org/zendframework/zend-eventmanager.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-eventmanager) [![Coverage Status](https://coveralls.io/repos/zendframework/zend-eventmanager/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-eventmanager?branch=master) zend-eventmanager is designed for the following use cases: - Implementing simple subject/observer patterns. - Implementing Aspect-Oriented designs. - Implementing event-driven architectures. The basic architecture allows you to attach and detach listeners to named events, both on a per-instance basis as well as via shared collections; trigger events; and interrupt execution of listeners. - File issues at https://github.com/zendframework/zend-eventmanager/issues - Documentation is at https://zendframework.github.io/zend-eventmanager/ For migration from version 2 to version 3, please [read the migration documentation](https://zendframework.github.io/zend-eventmanager/migration/intro/). ## Benchmarks We provide scripts for benchmarking zend-eventmanager using the [Athletic](https://github.com/polyfractal/athletic) framework; these can be found in the `benchmarks/` directory. To execute the benchmarks you can run the following command: ```bash $ vendor/bin/athletic -p benchmarks ``` zend-eventmanager-release-3.2.1/composer.json000066400000000000000000000032001327011771600212670ustar00rootroot00000000000000{ "name": "zendframework/zend-eventmanager", "description": "Trigger and listen to events within a PHP application", "license": "BSD-3-Clause", "keywords": [ "zf2", "event", "events", "eventmanager" ], "homepage": "https://github.com/zendframework/zend-eventmanager", "minimum-stability": "dev", "prefer-stable": true, "extra": { "branch-alias": { "dev-master": "3.2-dev", "dev-develop": "3.3-dev" } }, "autoload": { "psr-4": { "Zend\\EventManager\\": "src/" } }, "autoload-dev": { "psr-4": { "ZendTest\\EventManager\\": "test/", "ZendBench\\EventManager\\": "benchmarks/" }, "files": [ "test/_autoload.php" ] }, "require": { "php": "^5.6 || ^7.0" }, "require-dev": { "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2", "athletic/athletic": "^0.1", "zendframework/zend-stdlib": "^2.7.3 || ^3.0", "container-interop/container-interop": "^1.1.0", "zendframework/zend-coding-standard": "~1.0.0" }, "suggest": { "container-interop/container-interop": "^1.1.0, to use the lazy listeners feature", "zendframework/zend-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature" }, "scripts": { "check": [ "@cs-check", "@test" ], "cs-check": "phpcs", "cs-fix": "phpcbf", "test": "phpunit --colors=always", "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" } } zend-eventmanager-release-3.2.1/composer.lock000066400000000000000000002057061327011771600212650ustar00rootroot00000000000000{ "_readme": [ "This file locks the dependencies of your project to a known state", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], "content-hash": "7be208641d67e8a91bf182baaa79364a", "packages": [], "packages-dev": [ { "name": "athletic/athletic", "version": "v0.1.8", "source": { "type": "git", "url": "https://github.com/polyfractal/athletic.git", "reference": "51fe4b6e5298dd8af187825a4e57745898e37f0e" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/polyfractal/athletic/zipball/51fe4b6e5298dd8af187825a4e57745898e37f0e", "reference": "51fe4b6e5298dd8af187825a4e57745898e37f0e", "shasum": "" }, "require": { "nategood/commando": "0.2.1", "php": ">=5.3.9", "pimple/pimple": ">=1.0,<3.0", "zeptech/annotations": "1.1.*" }, "require-dev": { "mikey179/vfsstream": "1.2.*", "mockery/mockery": "0.8.*", "phpunit/phpunit": "~4.0", "satooshi/php-coveralls": "0.6.*" }, "bin": [ "bin/athletic" ], "type": "library", "autoload": { "psr-0": { "Athletic": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Zachary Tong" } ], "description": "PHP Benchmarking Framework", "keywords": [ "benchmark", "benchmarking", "profiling" ], "time": "2014-06-03T18:32:22+00:00" }, { "name": "container-interop/container-interop", "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/container-interop/container-interop.git", "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", "shasum": "" }, "require": { "psr/container": "^1.0" }, "type": "library", "autoload": { "psr-4": { "Interop\\Container\\": "src/Interop/Container/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", "homepage": "https://github.com/container-interop/container-interop", "time": "2017-02-14T19:40:03+00:00" }, { "name": "doctrine/instantiator", "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", "shasum": "" }, "require": { "php": "^7.1" }, "require-dev": { "athletic/athletic": "~0.1.8", "ext-pdo": "*", "ext-phar": "*", "phpunit/phpunit": "^6.2.3", "squizlabs/php_codesniffer": "^3.0.2" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.2.x-dev" } }, "autoload": { "psr-4": { "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Marco Pivetta", "email": "ocramius@gmail.com", "homepage": "http://ocramius.github.com/" } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", "homepage": "https://github.com/doctrine/instantiator", "keywords": [ "constructor", "instantiate" ], "time": "2017-07-22T11:58:36+00:00" }, { "name": "kevinlebrun/colors.php", "version": "0.2.0", "source": { "type": "git", "url": "https://github.com/kevinlebrun/colors.php.git", "reference": "b13d23b9365ece519abc0eaa77cd3061c5810d30" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/kevinlebrun/colors.php/zipball/b13d23b9365ece519abc0eaa77cd3061c5810d30", "reference": "b13d23b9365ece519abc0eaa77cd3061c5810d30", "shasum": "" }, "require": { "php": ">=5.3.0" }, "type": "library", "autoload": { "psr-0": { "Colors": "lib/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Kevin Le Brun", "email": "lebrun.k@gmail.com", "homepage": "http://kevinlebrun.fr", "role": "developer" } ], "description": "Colors for PHP CLI scripts", "homepage": "https://github.com/kevinlebrun/colors.php", "keywords": [ "cli", "color", "colors", "console", "shell" ], "time": "2012-03-25T18:18:10+00:00" }, { "name": "myclabs/deep-copy", "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", "shasum": "" }, "require": { "php": "^5.6 || ^7.0" }, "require-dev": { "doctrine/collections": "^1.0", "doctrine/common": "^2.6", "phpunit/phpunit": "^4.1" }, "type": "library", "autoload": { "psr-4": { "DeepCopy\\": "src/DeepCopy/" }, "files": [ "src/DeepCopy/deep_copy.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "description": "Create deep copies (clones) of your objects", "keywords": [ "clone", "copy", "duplicate", "object", "object graph" ], "time": "2017-10-19T19:58:43+00:00" }, { "name": "nategood/commando", "version": "0.2.1", "source": { "type": "git", "url": "https://github.com/nategood/commando.git", "reference": "b8e475d08a6ff1c0f2b89391e777c4e71fc1a6e1" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/nategood/commando/zipball/b8e475d08a6ff1c0f2b89391e777c4e71fc1a6e1", "reference": "b8e475d08a6ff1c0f2b89391e777c4e71fc1a6e1", "shasum": "" }, "require": { "kevinlebrun/colors.php": "0.2.*", "php": ">=5.3" }, "type": "library", "autoload": { "psr-0": { "Commando": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Nate Good", "email": "me@nategood.com", "homepage": "http://nategood.com" } ], "description": "PHP CLI Commando Style", "homepage": "http://github.com/nategood/commando", "keywords": [ "automation", "cli", "command", "command line", "command line interface", "scripting" ], "time": "2012-10-07T15:35:37+00:00" }, { "name": "phar-io/manifest", "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", "phar-io/version": "^1.0.1", "php": "^5.6 || ^7.0" }, "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": "Arne Blankerts", "email": "arne@blankerts.de", "role": "Developer" }, { "name": "Sebastian Heuer", "email": "sebastian@phpeople.de", "role": "Developer" }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "Developer" } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "time": "2017-03-05T18:14:27+00:00" }, { "name": "phar-io/version", "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", "shasum": "" }, "require": { "php": "^5.6 || ^7.0" }, "type": "library", "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Arne Blankerts", "email": "arne@blankerts.de", "role": "Developer" }, { "name": "Sebastian Heuer", "email": "sebastian@phpeople.de", "role": "Developer" }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", "role": "Developer" } ], "description": "Library for handling version information and constraints", "time": "2017-03-05T17:38:23+00:00" }, { "name": "phpdocumentor/reflection-common", "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", "shasum": "" }, "require": { "php": ">=5.5" }, "require-dev": { "phpunit/phpunit": "^4.6" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { "phpDocumentor\\Reflection\\": [ "src" ] } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Jaap van Otterdijk", "email": "opensource@ijaap.nl" } ], "description": "Common reflection classes used by phpdocumentor to reflect the code structure", "homepage": "http://www.phpdoc.org", "keywords": [ "FQSEN", "phpDocumentor", "phpdoc", "reflection", "static analysis" ], "time": "2017-09-11T18:02:19+00:00" }, { "name": "phpdocumentor/reflection-docblock", "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", "reference": "94fd0001232e47129dd3504189fa1c7225010d08" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", "reference": "94fd0001232e47129dd3504189fa1c7225010d08", "shasum": "" }, "require": { "php": "^7.0", "phpdocumentor/reflection-common": "^1.0.0", "phpdocumentor/type-resolver": "^0.4.0", "webmozart/assert": "^1.0" }, "require-dev": { "doctrine/instantiator": "~1.0.5", "mockery/mockery": "^1.0", "phpunit/phpunit": "^6.4" }, "type": "library", "extra": { "branch-alias": { "dev-master": "4.x-dev" } }, "autoload": { "psr-4": { "phpDocumentor\\Reflection\\": [ "src/" ] } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Mike van Riel", "email": "me@mikevanriel.com" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "time": "2017-11-30T07:14:17+00:00" }, { "name": "phpdocumentor/type-resolver", "version": "0.4.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", "shasum": "" }, "require": { "php": "^5.5 || ^7.0", "phpdocumentor/reflection-common": "^1.0" }, "require-dev": { "mockery/mockery": "^0.9.4", "phpunit/phpunit": "^5.2||^4.8.24" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { "phpDocumentor\\Reflection\\": [ "src/" ] } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Mike van Riel", "email": "me@mikevanriel.com" } ], "time": "2017-07-14T14:27:02+00:00" }, { "name": "phpspec/prophecy", "version": "1.7.6", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", "sebastian/comparator": "^1.1|^2.0|^3.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.7.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": "2018-04-18T13:57:24+00:00" }, { "name": "phpunit/php-code-coverage", "version": "6.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", "reference": "774a82c0c5da4c1c7701790c262035d235ab7856" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/774a82c0c5da4c1c7701790c262035d235ab7856", "reference": "774a82c0c5da4c1c7701790c262035d235ab7856", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", "php": "^7.1", "phpunit/php-file-iterator": "^1.4.2", "phpunit/php-text-template": "^1.2.1", "phpunit/php-token-stream": "^3.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", "sebastian/environment": "^3.1", "sebastian/version": "^2.0.1", "theseer/tokenizer": "^1.1" }, "require-dev": { "phpunit/phpunit": "^7.0" }, "suggest": { "ext-xdebug": "^2.6.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "6.0-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": "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": "2018-04-06T15:39:20+00:00" }, { "name": "phpunit/php-file-iterator", "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", "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": "2017-11-27T13:52:08+00:00" }, { "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-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f", "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f", "shasum": "" }, "require": { "php": "^7.1" }, "require-dev": { "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.0-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": "Utility class for timing", "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ "timer" ], "time": "2018-02-01T13:07:23+00:00" }, { "name": "phpunit/php-token-stream", "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/21ad88bbba7c3d93530d93994e0a33cd45f02ace", "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace", "shasum": "" }, "require": { "ext-tokenizer": "*", "php": "^7.1" }, "require-dev": { "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.0-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": "2018-02-01T13:16:43+00:00" }, { "name": "phpunit/phpunit", "version": "7.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", "reference": "6d51299e307dc510149e0b7cd1931dd11770e1cb" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6d51299e307dc510149e0b7cd1931dd11770e1cb", "reference": "6d51299e307dc510149e0b7cd1931dd11770e1cb", "shasum": "" }, "require": { "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "myclabs/deep-copy": "^1.6.1", "phar-io/manifest": "^1.0.1", "phar-io/version": "^1.0", "php": "^7.1", "phpspec/prophecy": "^1.7", "phpunit/php-code-coverage": "^6.0.1", "phpunit/php-file-iterator": "^1.4.3", "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^2.0", "phpunit/phpunit-mock-objects": "^6.1.1", "sebastian/comparator": "^2.1 || ^3.0", "sebastian/diff": "^3.0", "sebastian/environment": "^3.1", "sebastian/exporter": "^3.1", "sebastian/global-state": "^2.0", "sebastian/object-enumerator": "^3.0.3", "sebastian/resource-operations": "^1.0", "sebastian/version": "^2.0.1" }, "require-dev": { "ext-pdo": "*" }, "suggest": { "ext-xdebug": "*", "phpunit/php-invoker": "^2.0" }, "bin": [ "phpunit" ], "type": "library", "extra": { "branch-alias": { "dev-master": "7.1-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": "2018-04-18T13:41:53+00:00" }, { "name": "phpunit/phpunit-mock-objects", "version": "6.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/70c740bde8fd9ea9ea295be1cd875dd7b267e157", "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.5", "php": "^7.1", "phpunit/php-text-template": "^1.2.1", "sebastian/exporter": "^3.1" }, "require-dev": { "phpunit/phpunit": "^7.0" }, "suggest": { "ext-soap": "*" }, "type": "library", "extra": { "branch-alias": { "dev-master": "6.1-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": "Mock Object library for PHPUnit", "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", "keywords": [ "mock", "xunit" ], "time": "2018-04-11T04:50:36+00:00" }, { "name": "pimple/pimple", "version": "v2.1.1", "source": { "type": "git", "url": "https://github.com/silexphp/Pimple.git", "reference": "ea22fb2880faf7b7b0e17c9809c6fe25b071fd76" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/silexphp/Pimple/zipball/ea22fb2880faf7b7b0e17c9809c6fe25b071fd76", "reference": "ea22fb2880faf7b7b0e17c9809c6fe25b071fd76", "shasum": "" }, "require": { "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.1.x-dev" } }, "autoload": { "psr-0": { "Pimple": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Fabien Potencier", "email": "fabien@symfony.com" } ], "description": "Pimple is a simple Dependency Injection Container for PHP 5.3", "homepage": "http://pimple.sensiolabs.org", "keywords": [ "container", "dependency injection" ], "time": "2014-07-24T07:10:08+00:00" }, { "name": "psr/container", "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", "shasum": "" }, "require": { "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "PHP-FIG", "homepage": "http://www.php-fig.org/" } ], "description": "Common Container Interface (PHP FIG PSR-11)", "homepage": "https://github.com/php-fig/container", "keywords": [ "PSR-11", "container", "container-interface", "container-interop", "psr" ], "time": "2017-02-14T16:28:37+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", "shasum": "" }, "require": { "php": "^5.6 || ^7.0" }, "require-dev": { "phpunit/phpunit": "^5.7 || ^6.0" }, "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": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "time": "2017-03-04T06:30:41+00:00" }, { "name": "sebastian/comparator", "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/ed5fd2281113729f1ebcc64d101ad66028aeb3d5", "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5", "shasum": "" }, "require": { "php": "^7.1", "sebastian/diff": "^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { "phpunit/phpunit": "^7.1" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.0-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": "https://github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", "equality" ], "time": "2018-04-18T13:33:00+00:00" }, { "name": "sebastian/diff", "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/e09160918c66281713f1c324c1f4c4c3037ba1e8", "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8", "shasum": "" }, "require": { "php": "^7.1" }, "require-dev": { "phpunit/phpunit": "^7.0", "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.0-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", "udiff", "unidiff", "unified diff" ], "time": "2018-02-01T13:45:15+00:00" }, { "name": "sebastian/environment", "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", "shasum": "" }, "require": { "php": "^7.0" }, "require-dev": { "phpunit/phpunit": "^6.1" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.1.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": "2017-07-01T08:51:00+00:00" }, { "name": "sebastian/exporter", "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", "shasum": "" }, "require": { "php": "^7.0", "sebastian/recursion-context": "^3.0" }, "require-dev": { "ext-mbstring": "*", "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.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" }, { "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": "2017-04-03T13:19:02+00:00" }, { "name": "sebastian/global-state", "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", "shasum": "" }, "require": { "php": "^7.0" }, "require-dev": { "phpunit/phpunit": "^6.0" }, "suggest": { "ext-uopz": "*" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.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": "2017-04-27T15:39:26+00:00" }, { "name": "sebastian/object-enumerator", "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", "shasum": "" }, "require": { "php": "^7.0", "sebastian/object-reflector": "^1.1.1", "sebastian/recursion-context": "^3.0" }, "require-dev": { "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.0.x-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "time": "2017-08-03T12:35:26+00:00" }, { "name": "sebastian/object-reflector", "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", "reference": "773f97c67f28de00d397be301821b06708fca0be" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", "reference": "773f97c67f28de00d397be301821b06708fca0be", "shasum": "" }, "require": { "php": "^7.0" }, "require-dev": { "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.1-dev" } }, "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", "time": "2017-03-29T09:07:27+00:00" }, { "name": "sebastian/recursion-context", "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", "shasum": "" }, "require": { "php": "^7.0" }, "require-dev": { "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.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": "2017-03-03T06:23:57+00:00" }, { "name": "sebastian/resource-operations", "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", "shasum": "" }, "require": { "php": ">=5.6.0" }, "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": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "time": "2015-07-28T20:34:47+00:00" }, { "name": "sebastian/version", "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", "shasum": "" }, "require": { "php": ">=5.6" }, "type": "library", "extra": { "branch-alias": { "dev-master": "2.0.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": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", "time": "2016-10-03T07:35:21+00:00" }, { "name": "squizlabs/php_codesniffer", "version": "2.9.1", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62", "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62", "shasum": "" }, "require": { "ext-simplexml": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", "php": ">=5.1.2" }, "require-dev": { "phpunit/phpunit": "~4.0" }, "bin": [ "scripts/phpcs", "scripts/phpcbf" ], "type": "library", "extra": { "branch-alias": { "dev-master": "2.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": "2017-05-22T02:43:20+00:00" }, { "name": "theseer/tokenizer", "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", "shasum": "" }, "require": { "ext-dom": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", "php": "^7.0" }, "type": "library", "autoload": { "classmap": [ "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Arne Blankerts", "email": "arne@blankerts.de", "role": "Developer" } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "time": "2017-04-07T12:08:54+00:00" }, { "name": "webmozart/assert", "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", "reference": "0df1908962e7a3071564e857d86874dad1ef204a" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", "reference": "0df1908962e7a3071564e857d86874dad1ef204a", "shasum": "" }, "require": { "php": "^5.3.3 || ^7.0" }, "require-dev": { "phpunit/phpunit": "^4.6", "sebastian/version": "^1.0.1" }, "type": "library", "extra": { "branch-alias": { "dev-master": "1.3-dev" } }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Bernhard Schussek", "email": "bschussek@gmail.com" } ], "description": "Assertions to validate method input/output with nice error messages.", "keywords": [ "assert", "check", "validate" ], "time": "2018-01-29T19:49:41+00:00" }, { "name": "zendframework/zend-coding-standard", "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-coding-standard.git", "reference": "893316d2904e93f1c74c1384b6d7d57778299cb6" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/zendframework/zend-coding-standard/zipball/893316d2904e93f1c74c1384b6d7d57778299cb6", "reference": "893316d2904e93f1c74c1384b6d7d57778299cb6", "shasum": "" }, "require": { "squizlabs/php_codesniffer": "^2.7" }, "type": "library", "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "description": "Zend Framework coding standard", "keywords": [ "Coding Standard", "zf" ], "time": "2016-11-09T21:30:43+00:00" }, { "name": "zendframework/zend-stdlib", "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-stdlib.git", "reference": "10ef03144902d1955f935fff5346ed52f7d99bcc" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/10ef03144902d1955f935fff5346ed52f7d99bcc", "reference": "10ef03144902d1955f935fff5346ed52f7d99bcc", "shasum": "" }, "require": { "php": "^5.6 || ^7.0" }, "require-dev": { "athletic/athletic": "~0.1", "phpunit/phpunit": "~4.0", "zendframework/zend-coding-standard": "~1.0.0" }, "type": "library", "extra": { "branch-alias": { "dev-master": "3.1-dev", "dev-develop": "3.2-dev" } }, "autoload": { "psr-4": { "Zend\\Stdlib\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "homepage": "https://github.com/zendframework/zend-stdlib", "keywords": [ "stdlib", "zf2" ], "time": "2018-04-12T16:05:42+00:00" }, { "name": "zeptech/annotations", "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/pgraham/php-annotations.git", "reference": "9cd042daa9ace184d04b49f0605edf73f19a9c71" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/pgraham/php-annotations/zipball/9cd042daa9ace184d04b49f0605edf73f19a9c71", "reference": "9cd042daa9ace184d04b49f0605edf73f19a9c71", "shasum": "" }, "require": { "php": ">=5.3.0" }, "type": "library", "autoload": { "psr-0": { "zpt\\anno": "" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD" ], "authors": [ { "name": "Philip Graham", "email": "philip@zeptech.ca" } ], "description": "DOC Block annotation parsing for PHP", "homepage": "https://github.com/pgraham/php-annotations", "keywords": [ "annotations" ], "time": "2013-05-29T02:35:23+00:00" } ], "aliases": [], "minimum-stability": "dev", "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, "platform": { "php": "^5.6 || ^7.0" }, "platform-dev": [] } zend-eventmanager-release-3.2.1/src/000077500000000000000000000000001327011771600173415ustar00rootroot00000000000000zend-eventmanager-release-3.2.1/src/AbstractListenerAggregate.php000066400000000000000000000014711327011771600251350ustar00rootroot00000000000000listeners as $index => $callback) { $events->detach($callback); unset($this->listeners[$index]); } } } zend-eventmanager-release-3.2.1/src/Event.php000066400000000000000000000105611327011771600211360ustar00rootroot00000000000000setName($name); } if (null !== $target) { $this->setTarget($target); } if (null !== $params) { $this->setParams($params); } } /** * Get event name * * @return string */ public function getName() { return $this->name; } /** * Get the event target * * This may be either an object, or the name of a static method. * * @return string|object */ public function getTarget() { return $this->target; } /** * Set parameters * * Overwrites parameters * * @param array|ArrayAccess|object $params * @throws Exception\InvalidArgumentException */ public function setParams($params) { if (! is_array($params) && ! is_object($params)) { throw new Exception\InvalidArgumentException( sprintf('Event parameters must be an array or object; received "%s"', gettype($params)) ); } $this->params = $params; } /** * Get all parameters * * @return array|object|ArrayAccess */ public function getParams() { return $this->params; } /** * Get an individual parameter * * If the parameter does not exist, the $default value will be returned. * * @param string|int $name * @param mixed $default * @return mixed */ public function getParam($name, $default = null) { // Check in params that are arrays or implement array access if (is_array($this->params) || $this->params instanceof ArrayAccess) { if (! isset($this->params[$name])) { return $default; } return $this->params[$name]; } // Check in normal objects if (! isset($this->params->{$name})) { return $default; } return $this->params->{$name}; } /** * Set the event name * * @param string $name */ public function setName($name) { $this->name = (string) $name; } /** * Set the event target/context * * @param null|string|object $target */ public function setTarget($target) { $this->target = $target; } /** * Set an individual parameter to a value * * @param string|int $name * @param mixed $value */ public function setParam($name, $value) { if (is_array($this->params) || $this->params instanceof ArrayAccess) { // Arrays or objects implementing array access $this->params[$name] = $value; return; } // Objects $this->params->{$name} = $value; } /** * Stop further event propagation * * @param bool $flag */ public function stopPropagation($flag = true) { $this->stopPropagation = (bool) $flag; } /** * Is propagation stopped? * * @return bool */ public function propagationIsStopped() { return $this->stopPropagation; } } zend-eventmanager-release-3.2.1/src/EventInterface.php000066400000000000000000000040361327011771600227570ustar00rootroot00000000000000 => [ * => [ * 0 => [, ...] * ], * ... * ], * ... * ] * * NOTE: * This structure helps us to reuse the list of listeners * instead of first iterating over it and generating a new one * -> In result it improves performance by up to 25% even if it looks a bit strange * * @var array[] */ protected $events = []; /** * @var EventInterface Prototype to use when creating an event at trigger(). */ protected $eventPrototype; /** * Identifiers, used to pull shared signals from SharedEventManagerInterface instance * * @var array */ protected $identifiers = []; /** * Shared event manager * * @var null|SharedEventManagerInterface */ protected $sharedManager = null; /** * Constructor * * Allows optionally specifying identifier(s) to use to pull signals from a * SharedEventManagerInterface. * * @param SharedEventManagerInterface $sharedEventManager * @param array $identifiers */ public function __construct(SharedEventManagerInterface $sharedEventManager = null, array $identifiers = []) { if ($sharedEventManager) { $this->sharedManager = $sharedEventManager; $this->setIdentifiers($identifiers); } $this->eventPrototype = new Event(); } /** * @inheritDoc */ public function setEventPrototype(EventInterface $prototype) { $this->eventPrototype = $prototype; } /** * Retrieve the shared event manager, if composed. * * @return null|SharedEventManagerInterface $sharedEventManager */ public function getSharedManager() { return $this->sharedManager; } /** * @inheritDoc */ public function getIdentifiers() { return $this->identifiers; } /** * @inheritDoc */ public function setIdentifiers(array $identifiers) { $this->identifiers = array_unique($identifiers); } /** * @inheritDoc */ public function addIdentifiers(array $identifiers) { $this->identifiers = array_unique(array_merge( $this->identifiers, $identifiers )); } /** * @inheritDoc */ public function trigger($eventName, $target = null, $argv = []) { $event = clone $this->eventPrototype; $event->setName($eventName); if ($target !== null) { $event->setTarget($target); } if ($argv) { $event->setParams($argv); } return $this->triggerListeners($event); } /** * @inheritDoc */ public function triggerUntil(callable $callback, $eventName, $target = null, $argv = []) { $event = clone $this->eventPrototype; $event->setName($eventName); if ($target !== null) { $event->setTarget($target); } if ($argv) { $event->setParams($argv); } return $this->triggerListeners($event, $callback); } /** * @inheritDoc */ public function triggerEvent(EventInterface $event) { return $this->triggerListeners($event); } /** * @inheritDoc */ public function triggerEventUntil(callable $callback, EventInterface $event) { return $this->triggerListeners($event, $callback); } /** * @inheritDoc */ public function attach($eventName, callable $listener, $priority = 1) { if (! is_string($eventName)) { throw new Exception\InvalidArgumentException(sprintf( '%s expects a string for the event; received %s', __METHOD__, (is_object($eventName) ? get_class($eventName) : gettype($eventName)) )); } $this->events[$eventName][(int) $priority][0][] = $listener; return $listener; } /** * @inheritDoc * @throws Exception\InvalidArgumentException for invalid event types. */ public function detach(callable $listener, $eventName = null, $force = false) { // If event is wildcard, we need to iterate through each listeners if (null === $eventName || ('*' === $eventName && ! $force)) { foreach (array_keys($this->events) as $eventName) { $this->detach($listener, $eventName, true); } return; } if (! is_string($eventName)) { throw new Exception\InvalidArgumentException(sprintf( '%s expects a string for the event; received %s', __METHOD__, (is_object($eventName) ? get_class($eventName) : gettype($eventName)) )); } if (! isset($this->events[$eventName])) { return; } foreach ($this->events[$eventName] as $priority => $listeners) { foreach ($listeners[0] as $index => $evaluatedListener) { if ($evaluatedListener !== $listener) { continue; } // Found the listener; remove it. unset($this->events[$eventName][$priority][0][$index]); // If the queue for the given priority is empty, remove it. if (empty($this->events[$eventName][$priority][0])) { unset($this->events[$eventName][$priority]); break; } } } // If the queue for the given event is empty, remove it. if (empty($this->events[$eventName])) { unset($this->events[$eventName]); } } /** * @inheritDoc */ public function clearListeners($eventName) { if (isset($this->events[$eventName])) { unset($this->events[$eventName]); } } /** * Prepare arguments * * Use this method if you want to be able to modify arguments from within a * listener. It returns an ArrayObject of the arguments, which may then be * passed to trigger(). * * @param array $args * @return ArrayObject */ public function prepareArgs(array $args) { return new ArrayObject($args); } /** * Trigger listeners * * Actual functionality for triggering listeners, to which trigger() delegate. * * @param EventInterface $event * @param null|callable $callback * @return ResponseCollection */ protected function triggerListeners(EventInterface $event, callable $callback = null) { $name = $event->getName(); if (empty($name)) { throw new Exception\RuntimeException('Event is missing a name; cannot trigger!'); } if (isset($this->events[$name])) { $listOfListenersByPriority = $this->events[$name]; if (isset($this->events['*'])) { foreach ($this->events['*'] as $priority => $listOfListeners) { $listOfListenersByPriority[$priority][] = $listOfListeners[0]; } } } elseif (isset($this->events['*'])) { $listOfListenersByPriority = $this->events['*']; } else { $listOfListenersByPriority = []; } if ($this->sharedManager) { foreach ($this->sharedManager->getListeners($this->identifiers, $name) as $priority => $listeners) { $listOfListenersByPriority[$priority][] = $listeners; } } // Sort by priority in reverse order krsort($listOfListenersByPriority); // Initial value of stop propagation flag should be false $event->stopPropagation(false); // Execute listeners $responses = new ResponseCollection(); foreach ($listOfListenersByPriority as $listOfListeners) { foreach ($listOfListeners as $listeners) { foreach ($listeners as $listener) { $response = $listener($event); $responses->push($response); // If the event was asked to stop propagating, do so if ($event->propagationIsStopped()) { $responses->setStopped(true); return $responses; } // If the result causes our validation callback to return true, // stop propagation if ($callback && $callback($response)) { $responses->setStopped(true); return $responses; } } } } return $responses; } } zend-eventmanager-release-3.2.1/src/EventManagerAwareInterface.php000066400000000000000000000013301327011771600252240ustar00rootroot00000000000000eventIdentifier property. * * @param EventManagerInterface $events */ public function setEventManager(EventManagerInterface $events) { $identifiers = [__CLASS__, get_class($this)]; if (isset($this->eventIdentifier)) { if ((is_string($this->eventIdentifier)) || (is_array($this->eventIdentifier)) || ($this->eventIdentifier instanceof Traversable) ) { $identifiers = array_unique(array_merge($identifiers, (array) $this->eventIdentifier)); } elseif (is_object($this->eventIdentifier)) { $identifiers[] = $this->eventIdentifier; } // silently ignore invalid eventIdentifier types } $events->setIdentifiers($identifiers); $this->events = $events; if (method_exists($this, 'attachDefaultListeners')) { $this->attachDefaultListeners(); } } /** * Retrieve the event manager * * Lazy-loads an EventManager instance if none registered. * * @return EventManagerInterface */ public function getEventManager() { if (! $this->events instanceof EventManagerInterface) { $this->setEventManager(new EventManager()); } return $this->events; } } zend-eventmanager-release-3.2.1/src/EventManagerInterface.php000066400000000000000000000125331327011771600242530ustar00rootroot00000000000000setExtractFlags(self::EXTR_BOTH); // Iterate and remove any matches $removed = false; $items = []; $this->rewind(); while (! $this->isEmpty()) { $item = $this->extract(); if ($item['data'] === $datum) { $removed = true; continue; } $items[] = $item; } // Repopulate foreach ($items as $item) { $this->insert($item['data'], $item['priority']); } $this->setExtractFlags(self::EXTR_DATA); return $removed; } /** * Iterate the next filter in the chain * * Iterates and calls the next filter in the chain. * * @param mixed $context * @param array $params * @param FilterIterator $chain * @return mixed */ public function next($context = null, array $params = [], $chain = null) { if (empty($context) || ($chain instanceof FilterIterator && $chain->isEmpty())) { return; } //We can't extract from an empty heap if ($this->isEmpty()) { return; } $next = $this->extract(); return $next($context, $params, $chain); } } zend-eventmanager-release-3.2.1/src/FilterChain.php000066400000000000000000000051631327011771600222470ustar00rootroot00000000000000filters = new Filter\FilterIterator(); } /** * Apply the filters * * Begins iteration of the filters. * * @param mixed $context Object under observation * @param mixed $argv Associative array of arguments * @return mixed */ public function run($context, array $argv = []) { $chain = clone $this->getFilters(); if ($chain->isEmpty()) { return; } $next = $chain->extract(); return $next($context, $argv, $chain); } /** * Connect a filter to the chain * * @param callable $callback PHP Callback * @param int $priority Priority in the queue at which to execute; * defaults to 1 (higher numbers == higher priority) * @return CallbackHandler (to allow later unsubscribe) * @throws Exception\InvalidCallbackException */ public function attach(callable $callback, $priority = 1) { $this->filters->insert($callback, $priority); return $callback; } /** * Detach a filter from the chain * * @param callable $filter * @return bool Returns true if filter found and unsubscribed; returns false otherwise */ public function detach(callable $filter) { return $this->filters->remove($filter); } /** * Retrieve all filters * * @return Filter\FilterIterator */ public function getFilters() { return $this->filters; } /** * Clear all filters * * @return void */ public function clearFilters() { $this->filters = new Filter\FilterIterator(); } /** * Return current responses * * Only available while the chain is still being iterated. Returns the * current ResponseCollection. * * @return null|ResponseCollection */ public function getResponses() { return; } } zend-eventmanager-release-3.2.1/src/LazyEventListener.php000066400000000000000000000041041327011771600235000ustar00rootroot00000000000000event = $definition['event']; $this->priority = isset($definition['priority']) ? (int) $definition['priority'] : null; } /** * @return string */ public function getEvent() { return $this->event; } /** * @return int */ public function getPriority($default = 1) { return (null !== $this->priority) ? $this->priority : $default; } } zend-eventmanager-release-3.2.1/src/LazyListener.php000066400000000000000000000070001327011771600224740ustar00rootroot00000000000000service = $definition['listener']; $this->method = $definition['method']; $this->container = $container; $this->env = $env; } /** * Use the listener as an invokable, allowing direct attachment to an event manager. * * @param EventInterface $event * @return callable */ public function __invoke(EventInterface $event) { $listener = $this->fetchListener(); $method = $this->method; return $listener->{$method}($event); } /** * @return callable */ private function fetchListener() { if ($this->listener) { return $this->listener; } // In the future, typehint against Zend\ServiceManager\ServiceLocatorInterface, // which defines this message starting in v3. if (method_exists($this->container, 'build') && ! empty($this->env)) { $this->listener = $this->container->build($this->service, $this->env); return $this->listener; } $this->listener = $this->container->get($this->service); return $this->listener; } } zend-eventmanager-release-3.2.1/src/LazyListenerAggregate.php000066400000000000000000000067611327011771600243200ustar00rootroot00000000000000 * $events->attachAggregate(new LazyListenerAggregate( * $lazyEventListenersOrDefinitions, * $container * )); * */ class LazyListenerAggregate implements ListenerAggregateInterface { use ListenerAggregateTrait; /** * @var ContainerInterface Container from which to pull lazy listeners. */ private $container; /** * @var array Additional environment/option variables to use when creating listener. */ private $env; /** * Generated LazyEventListener instances. * * @var LazyEventListener[] */ private $lazyListeners = []; /** * Constructor * * Accepts the composed $listeners, as well as the $container and $env in * order to create a listener aggregate that defers listener creation until * the listener is triggered. * * Listeners may be either LazyEventListener instances, or lazy event * listener definitions that can be provided to a LazyEventListener * constructor in order to create a new instance; in the latter case, the * $container and $env will be passed at instantiation as well. * * @var array $listeners LazyEventListener instances or array definitions * to pass to the LazyEventListener constructor. * @var ContainerInterface $container * @var array $env * @throws Exception\InvalidArgumentException for invalid listener items. */ public function __construct(array $listeners, ContainerInterface $container, array $env = []) { $this->container = $container; $this->env = $env; // This would raise an exception for invalid structs foreach ($listeners as $listener) { if (is_array($listener)) { $listener = new LazyEventListener($listener, $container, $env); } if (! $listener instanceof LazyEventListener) { throw new Exception\InvalidArgumentException(sprintf( 'All listeners must be LazyEventListener instances or definitions; received %s', (is_object($listener) ? get_class($listener) : gettype($listener)) )); } $this->lazyListeners[] = $listener; } } /** * Attach the aggregate to the event manager. * * Loops through all composed lazy listeners, and attaches them to the * event manager. * * @var EventManagerInterface $events * @var int $priority */ public function attach(EventManagerInterface $events, $priority = 1) { foreach ($this->lazyListeners as $lazyListener) { $this->listeners[] = $events->attach( $lazyListener->getEvent(), $lazyListener, $lazyListener->getPriority($priority) ); } } } zend-eventmanager-release-3.2.1/src/ListenerAggregateInterface.php000066400000000000000000000024521327011771600252720ustar00rootroot00000000000000listeners as $index => $callback) { $events->detach($callback); unset($this->listeners[$index]); } } } zend-eventmanager-release-3.2.1/src/ResponseCollection.php000066400000000000000000000035141327011771600236670ustar00rootroot00000000000000stopped; } /** * Mark the collection as stopped (or its opposite) * * @param bool $flag */ public function setStopped($flag) { $this->stopped = (bool) $flag; } /** * Convenient access to the first handler return value. * * @return mixed The first handler return value */ public function first() { return parent::bottom(); } /** * Convenient access to the last handler return value. * * If the collection is empty, returns null. Otherwise, returns value * returned by last handler. * * @return mixed The last handler return value */ public function last() { if (count($this) === 0) { return; } return parent::top(); } /** * Check if any of the responses match the given value. * * @param mixed $value The value to look for among responses * @return bool */ public function contains($value) { foreach ($this as $response) { if ($response === $value) { return true; } } return false; } } zend-eventmanager-release-3.2.1/src/SharedEventManager.php000066400000000000000000000210201327011771600235500ustar00rootroot00000000000000 * $sharedEventManager = new SharedEventManager(); * foreach (['My\Resource\AbstractResource', 'My\Resource\EntityResource'] as $identifier) { * $sharedEventManager->attach( * $identifier, * 'getAll', * function ($e) use ($cache) { * if (!$id = $e->getParam('id', false)) { * return; * } * if (!$data = $cache->load(get_class($resource) . '::getOne::' . $id )) { * return; * } * return $data; * } * ); * } * * * @param string $identifier Identifier for event emitting component. * @param string $event * @param callable $listener Listener that will handle the event. * @param int $priority Priority at which listener should execute * @return void * @throws Exception\InvalidArgumentException for invalid identifier arguments. * @throws Exception\InvalidArgumentException for invalid event arguments. */ public function attach($identifier, $event, callable $listener, $priority = 1) { if (! is_string($identifier) || empty($identifier)) { throw new Exception\InvalidArgumentException(sprintf( 'Invalid identifier provided; must be a string; received "%s"', (is_object($identifier) ? get_class($identifier) : gettype($identifier)) )); } if (! is_string($event) || empty($event)) { throw new Exception\InvalidArgumentException(sprintf( 'Invalid event provided; must be a non-empty string; received "%s"', (is_object($event) ? get_class($event) : gettype($event)) )); } $this->identifiers[$identifier][$event][(int) $priority][] = $listener; } /** * @inheritDoc */ public function detach(callable $listener, $identifier = null, $eventName = null, $force = false) { // No identifier or wildcard identifier: loop through all identifiers and detach if (null === $identifier || ('*' === $identifier && ! $force)) { foreach (array_keys($this->identifiers) as $identifier) { $this->detach($listener, $identifier, $eventName, true); } return; } if (! is_string($identifier) || empty($identifier)) { throw new Exception\InvalidArgumentException(sprintf( 'Invalid identifier provided; must be a string, received %s', (is_object($identifier) ? get_class($identifier) : gettype($identifier)) )); } // Do we have any listeners on the provided identifier? if (! isset($this->identifiers[$identifier])) { return; } if (null === $eventName || ('*' === $eventName && ! $force)) { foreach (array_keys($this->identifiers[$identifier]) as $eventName) { $this->detach($listener, $identifier, $eventName, true); } return; } if (! is_string($eventName) || empty($eventName)) { throw new Exception\InvalidArgumentException(sprintf( 'Invalid event name provided; must be a string, received %s', (is_object($eventName) ? get_class($eventName) : gettype($eventName)) )); } if (! isset($this->identifiers[$identifier][$eventName])) { return; } foreach ($this->identifiers[$identifier][$eventName] as $priority => $listeners) { foreach ($listeners as $index => $evaluatedListener) { if ($evaluatedListener !== $listener) { continue; } // Found the listener; remove it. unset($this->identifiers[$identifier][$eventName][$priority][$index]); // Is the priority queue empty? if (empty($this->identifiers[$identifier][$eventName][$priority])) { unset($this->identifiers[$identifier][$eventName][$priority]); break; } } // Is the event queue empty? if (empty($this->identifiers[$identifier][$eventName])) { unset($this->identifiers[$identifier][$eventName]); break; } } // Is the identifier queue now empty? Remove it. if (empty($this->identifiers[$identifier])) { unset($this->identifiers[$identifier]); } } /** * Retrieve all listeners for a given identifier and event * * @param string[] $identifiers * @param string $eventName * @return array[] * @throws Exception\InvalidArgumentException */ public function getListeners(array $identifiers, $eventName) { if ('*' === $eventName || ! is_string($eventName) || empty($eventName)) { throw new Exception\InvalidArgumentException(sprintf( 'Event name passed to %s must be a non-empty, non-wildcard string', __METHOD__ )); } $returnListeners = []; foreach ($identifiers as $identifier) { if ('*' === $identifier || ! is_string($identifier) || empty($identifier)) { throw new Exception\InvalidArgumentException(sprintf( 'Identifier names passed to %s must be non-empty, non-wildcard strings', __METHOD__ )); } if (isset($this->identifiers[$identifier])) { $listenersByIdentifier = $this->identifiers[$identifier]; if (isset($listenersByIdentifier[$eventName])) { foreach ($listenersByIdentifier[$eventName] as $priority => $listeners) { $returnListeners[$priority][] = $listeners; } } if (isset($listenersByIdentifier['*'])) { foreach ($listenersByIdentifier['*'] as $priority => $listeners) { $returnListeners[$priority][] = $listeners; } } } } if (isset($this->identifiers['*'])) { $wildcardIdentifier = $this->identifiers['*']; if (isset($wildcardIdentifier[$eventName])) { foreach ($wildcardIdentifier[$eventName] as $priority => $listeners) { $returnListeners[$priority][] = $listeners; } } if (isset($wildcardIdentifier['*'])) { foreach ($wildcardIdentifier['*'] as $priority => $listeners) { $returnListeners[$priority][] = $listeners; } } } foreach ($returnListeners as $priority => $listOfListeners) { $returnListeners[$priority] = array_merge(...$listOfListeners); } return $returnListeners; } /** * @inheritDoc */ public function clearListeners($identifier, $eventName = null) { if (! isset($this->identifiers[$identifier])) { return false; } if (null === $eventName) { unset($this->identifiers[$identifier]); return; } if (! isset($this->identifiers[$identifier][$eventName])) { return; } unset($this->identifiers[$identifier][$eventName]); } } zend-eventmanager-release-3.2.1/src/SharedEventManagerInterface.php000066400000000000000000000040641327011771600254020ustar00rootroot00000000000000setAccessible(true); $listeners = $r->getValue($events); return array_keys($listeners); } /** * Retrieve an interable list of listeners for an event. * * Given an event and an event manager, returns an iterator with the * listeners for that event, in priority order. * * If $withPriority is true, the key values will be the priority at which * the given listener is attached. * * Do not pass $withPriority if you want to cast the iterator to an array, * as many listeners will likely have the same priority, and thus casting * will collapse to the last added. * * @param string $event * @param EventManager $events * @param bool $withPriority * @return \Traversable */ private function getListenersForEvent($event, EventManager $events, $withPriority = false) { $r = new ReflectionProperty($events, 'events'); $r->setAccessible(true); $internal = $r->getValue($events); $listeners = []; foreach (isset($internal[$event]) ? $internal[$event] : [] as $p => $listOfListeners) { foreach ($listOfListeners as $l) { $listeners[$p] = isset($listeners[$p]) ? array_merge($listeners[$p], $l) : $l; } } return $this->traverseListeners($listeners, $withPriority); } /** * Assert that a given listener exists at the specified priority. * * @param callable $expectedListener * @param int $expectedPriority * @param string $event * @param EventManager $events * @param string $message Failure message to use, if any. */ private function assertListenerAtPriority( callable $expectedListener, $expectedPriority, $event, EventManager $events, $message = '' ) { $message = $message ?: sprintf( 'Listener not found for event "%s" and priority %d', $event, $expectedPriority ); $listeners = $this->getListenersForEvent($event, $events, true); $found = false; foreach ($listeners as $priority => $listener) { if ($listener === $expectedListener && $priority === $expectedPriority ) { $found = true; break; } } Assert::assertTrue($found, $message); } /** * Returns an indexed array of listeners for an event. * * Returns an indexed array of listeners for an event, in priority order. * Priority values will not be included; use this only for testing if * specific listeners are present, or for a count of listeners. * * @param string $event * @param EventManager $events * @return callable[] */ private function getArrayOfListenersForEvent($event, EventManager $events) { return iterator_to_array($this->getListenersForEvent($event, $events)); } /** * Generator for traversing listeners in priority order. * * @param array $listeners * @param bool $withPriority When true, yields priority as key. */ public function traverseListeners(array $queue, $withPriority = false) { krsort($queue, SORT_NUMERIC); foreach ($queue as $priority => $listeners) { $priority = (int) $priority; foreach ($listeners as $listener) { if ($withPriority) { yield $priority => $listener; } else { yield $listener; } } } } }