mrth2 / apns-php

Automatically exported from code.google.com/p/apns-php
0 stars 0 forks source link

Patch: solve __autoload conflict #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If you integrate apns-php into an application that already has its own 
__autoload defined, it won't work. I've patched the Autoload.php file to use 
spl_autoload_register if available, so that it doesn't conflict with existing 
autoloaders.

If spl_autoload_register is not available, it falls back to the old behaviour 
by default.

See attachment.

Original issue reported on code.google.com by ivojansc...@gmail.com on 23 Nov 2010 at 4:06

Attachments:

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r62.

Original comment by aldo.arm...@gmail.com on 24 Nov 2010 at 2:59

GoogleCodeExporter commented 8 years ago
Resolved at r62.

apns-php is only available for PHP 5.3.x series so checking for 
spl_autoload_register is not needed.

Ivo, thanks so much for your detailed patch.

Original comment by aldo.arm...@gmail.com on 24 Nov 2010 at 3:02

GoogleCodeExporter commented 8 years ago
Hi,

no problem, if I have more I'll create more issues. Another issue that bothers 
me is the default output of the default logger. I had to encapsulate it in an 
output buffering thing. I may write a more useful logger and contribute it. 
Will create separate issues if I do.

Thanks for creating this, makes sending push notifications from php so much 
easier :)

Greetings,
Ivo

Original comment by ivojansc...@gmail.com on 24 Nov 2010 at 3:11