forked from DougHW/zPUSH
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zPush.php
36 lines (29 loc) · 886 Bytes
/
zPush.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
<?php
/**
* This is the only file you need to include in order to bring this library into your project.
* It will register an autoloader function for the rest of the project, and classes will be loaded as-needed.
*
* Created by dougw on 10/15/13 5:51 PM
*
* Copyright Zoosk, Inc. 2013
*/
define('zPUSH_ROOT_DIR', dirname(__FILE__));
// Library class loader
function zPushClassAutoloader($class) {
static $classes = array(
// APNS
'ZAPNSError' => '/APNS/ZAPNSError.php',
'ZAPNSGateway' => '/APNS/ZAPNSGateway.php',
'ZAPNSMessage' => '/APNS/ZAPNSMessage.php',
'ZAPNSQueue' => '/APNS/ZAPNSQueue.php',
// C2DM
// UTIL
'ZJSONTools' => '/Util/ZJSONTools.php',
'ZPushLogging' => '/Util/ZPushLogging.php'
);
if (isset($classes[$class])) {
include zPUSH_ROOT_DIR . $classes[$class];
return;
}
}
spl_autoload_register('zPushClassAutoloader');