-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEventInterface.php
71 lines (59 loc) · 1.45 KB
/
EventInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
/*
* SimpleDispatcher is a package that provides trivial and fast way
* of dispatching events for PHP projects.
*
* @author Maciej Garycki <[email protected]>
* @copyrights Maciej Garycki
*/
namespace Puzzle\SimpleDispatcher;
/**
* Event Abstraction definition
*
* @author Maciej Garycki <[email protected]>
* @company Puzzle Design
* @copyrights Maciej Garycki 2013
*/
interface EventInterface {
/**
* Stops the event's propagation, it will no more be dispatched
* by any further listeners.
*
* @return Event Returns this for chaining.
*/
public function stopPropagation ();
/**
* Defines weather or not a Event::stopPropagation()
* method has been called on this object
*
* @return bool
*/
public function isPropagationStopped ();
/**
* Provides event name
*
* @return string
*/
public function getName ();
/**
* Provide previously set parameter for given name
*
* @param string $name
* @return mixed
*/
public function getParameter ($name);
/**
* Sets a value for parameter of given name
*
* @param string $name
* @param mixed $value
*/
public function setParameter ($name, $value);
/**
* Defines if parameter exists within the event
*
* @param string $name
* @return bool
*/
public function hasParameter ($name);
}