Download the PHP package ikwattro/github-event without Composer
On this page you can find all versions of the php package ikwattro/github-event. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ikwattro/github-event
More information about ikwattro/github-event
Files in ikwattro/github-event
Package github-event
Short Description Github Api Public Events to PHP Objects Mapper
License MIT
Informations about the package github-event
GithubEvent Object Mapper
Github Api Public Events to PHP Objects
Transforms the Github API Public Events into PHP Objects
Installation
Require the library in your composer.json
Usage
Building the EventHandler
The application need to be built through the factory constructor, currently there is no need for such factory design but it aims to be extensible for future usages.
Passing events
The mainpoint of the library is the handleEvent
method that takes the GithubEvent as argument in an array format (json_decoded).
Once passed, you'll receive in return the corresponding PHP Object instance corresponding to the event.
Working with Events
An event object may contain more than the current event, for e.g., a CreateEvent
will contain the payload of the event, but also
the associated Repository object, RepositoryOwner, ... .
Please refer to the source code for discovering what is inside each event.
Currently supported events
- [x] WatchEvent
- [x] IssuesEvent
- [x] IssueCommentEvent
- [x] CreateEvent
- [x] PushEvent
- [ ] ForkEvent
- [x] PullRequestEvent
License
The library is licensed under the MIT License
Author
All versions of github-event with dependencies
symfony/config Version ~2.6
symfony/dependency-injection Version ~2.6
symfony/yaml Version ~2.6