I've successfully used APNS-PHP to send PNs - it's great!
However, I'm a little stuck on how to add it to a Code Igniter project (inside a controller that will be called from command-line).
Calling:
require_once APPPATH.'/third_party/ApnsPHP/Autoload.php';
Results in errors:
Fatal error: Uncaught exception 'Exception' with message 'Class file
'XXXXXXX/application/third_party/CI/DB/mysql/result.php' does not
exists' in XXXXXXX/application/third_party/ApnsPHP/Autoload.php:49
I'm assuming it's some kind of autoloading conflict? But I'm not really sure!
Any help would be brilliant - I've trawled Google without much luck!
Here's the line I've being trying to use inside the function:
require_once APPPATH.'/third_party/ApnsPHP/Autoload.php';
Here's the __autoload function I've added for loading Ion Auth's libs:
function __autoload($class)
{
if (strpos($class, 'CI_') !== 0)
{
if (file_exists($file = APPPATH.'core/'.$class.EXT))
{
include $file;
}
else if (file_exists($file = APPPATH.'libraries/'.$class.EXT))
{
include $file;
}
else if (file_exists($file = APPPATH.'core/base_controllers/'.$class.EXT))
{
include $file;
}
}
}