Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EventsAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jards
EventsAPI
Commits
ac26e3be
Commit
ac26e3be
authored
7 years ago
by
Carsten Karbach
Browse files
Options
Downloads
Patches
Plain Diff
[gcs-jards-#70] Improve documentation for listener
parent
9be98972
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/EventListener.php
+1
-1
1 addition, 1 deletion
lib/EventListener.php
lib/MailOnEventListener.php
+1
-1
1 addition, 1 deletion
lib/MailOnEventListener.php
with
2 additions
and
2 deletions
lib/EventListener.php
+
1
−
1
View file @
ac26e3be
...
@@ -12,7 +12,7 @@ interface EventListener{
...
@@ -12,7 +12,7 @@ interface EventListener{
* This is called for every new received event.
* This is called for every new received event.
* The event is provided in two formats: simple JSON decoded object and Swagger deserialized model.
* The event is provided in two formats: simple JSON decoded object and Swagger deserialized model.
*
*
* @param object $event encoded object from JSON
* @param object $event encoded object from JSON
, you could call json_encode($event) to get it as a string
* @param \jards\eventsapiclient\Swagger\Client\Model\Event $event deserialized event ino Swagger model
* @param \jards\eventsapiclient\Swagger\Client\Model\Event $event deserialized event ino Swagger model
*/
*/
public
function
handleEvent
(
$jsonevent
,
$apievent
);
public
function
handleEvent
(
$jsonevent
,
$apievent
);
...
...
This diff is collapsed.
Click to expand it.
lib/MailOnEventListener.php
+
1
−
1
View file @
ac26e3be
...
@@ -58,7 +58,7 @@ class MailOnEventListener implements EventListener{
...
@@ -58,7 +58,7 @@ class MailOnEventListener implements EventListener{
*/
*/
public
function
handleEvent
(
$jsonevent
,
$apievent
){
public
function
handleEvent
(
$jsonevent
,
$apievent
){
$config
=
parse_ini_file
(
__DIR__
.
'/../configs/mail.cnf'
);
$config
=
parse_ini_file
(
__DIR__
.
'/../configs/mail.cnf'
);
$this
->
sendmail
(
$config
[
'TARGET'
],
'New event received
'
,
json_encode
(
$jsonevent
));
$this
->
sendmail
(
$config
[
'TARGET'
],
'New event received
over '
.
gethostname
()
,
json_encode
(
$jsonevent
));
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment