-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.hh
42 lines (37 loc) · 1.21 KB
/
bootstrap.hh
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
<?hh
/**
* @copyright 2010-2015, The Titon Project
* @license http://opensource.org/licenses/bsd-license.php
* @link http://titon.io
*/
/**
* --------------------------------------------------------------
* Type Aliases
* --------------------------------------------------------------
*
* Defines type aliases that are used by the event package.
*/
namespace Titon\Event {
type CallStackList = Vector<string>;
type DataMap = Map<string, mixed>;
type EventList = Vector<Event>;
type EventMap = Map<string, Event>;
type ListenerMap = Map<string, mixed>;
type ListenerOption = shape('method' => string, 'priority' => int, 'once' => bool);
type ObserverList = Vector<Observer>;
type ObserverContainer = Map<string, ObserverList>;
type ObserverCallback = (function(Event): mixed);
}
/**
* --------------------------------------------------------------
* Annotations
* --------------------------------------------------------------
*
* Registers all annotations declared in the event packages.
*/
namespace {
use Titon\Annotation\Registry;
if (class_exists('Titon\Annotation\Annotation')) {
Registry::map('Observer', 'Titon\Event\Annotation\Observer');
}
}