[RFC] add APNS class and PushNotification interface
Review Request #11 — Created Nov. 5, 2012 and discarded
Information | |
---|---|
olivier | |
Lunr | |
personal/olivier/apns | |
7310 | |
Reviewers | |
lunr | |
APNS class implemented with PushNotification interface No test made, just as RFC
- 12
- 0
- 12
- 0
- 24
Description | From | Last Updated |
---|---|---|
what's the penalty if we don't do this? | pprkut | |
I wonder if we can come up with a better name :) | pprkut | |
IMHO this is the wrong way. We're not really interested in the message here, but rather the the response code. ... | pprkut | |
no pass by reference anymore | pprkut | |
style | pprkut | |
mktime() without parameters throws a E_STRICT error according to the docs. Use time() instead. | pprkut | |
styling | pprkut | |
what's the exact purpose of this? What does the user of this library get from defining his own process id? | pprkut | |
IMHO this is of no use to anyone. The only point of this would be for logging, and in that ... | pprkut | |
this starts an awefully pointless chain of function calls. I do se the point of structuring it, but I'm not ... | pprkut | |
styling | pprkut | |
this is a log message, not a result. | pprkut |
-
-
system/libraries/network/notifications/class.apns.inc.php (Diff revision 2) Move from constructor to dedicated methods using fluid interface
-
system/libraries/network/notifications/class.apns.inc.php (Diff revision 2) can probably split up as well into - push() - set_destination() - set_payload()
-
system/libraries/network/notifications/class.apns.inc.php (Diff revision 2) I think this should be part of the payload generation, not the push transport
-
-
-
-
system/libraries/network/notifications/class.apns.inc.php (Diff revision 3) what is this? characters? bytes? lines?
-
-
system/libraries/network/notifications/class.apns.inc.php (Diff revision 3) you probably want to do this by reference
-
system/libraries/network/notifications/class.apns.inc.php (Diff revision 3) what's the penalty if we don't do this?
-
system/libraries/network/notifications/class.apns.inc.php (Diff revision 3) Please use existing terminology and move it into a __get() method
-
system/libraries/network/notifications/class.apns.inc.php (Diff revision 3) There's gotta be a more reasonable name for this...
-
system/libraries/network/notifications/class.apns.inc.php (Diff revision 3) So we really need a separate method for this?
-
Change Summary:
Change made according to review: -Comments of constants improved -Payload passed by reference, interface updated -set_destination renamed to set_endpoint, interface updated -unpacked method removed Requests comment for ignoring the token if size does not match
Diff: |
Revision 4 (+471) |
---|
Change Summary:
Switch made to psr-0, minor changes in apns class concerning error codes and constantes
Diff: |
Revision 5 (+472) |
---|
-
Make sure your code complies with the latest coding standard
-
src/Lunr/Network/Notifications/Apns.php (Diff revision 5) I thought about this and I think it's better to move push notifications out of Network into a new namespace.
Change Summary:
all classes changed their location from Network/Notificaions to Push Unit test class created, code style checked and passed
Diff: |
Revision 6 (+539) |
---|
-
-
-
src/Lunr/Push/Apns.php (Diff revision 6) IMHO this is the wrong way. We're not really interested in the message here, but rather the the response code. Think outside the class: If you call push and to a check on the return value, the code is much easier to read if you have if ($error_number = APNS_NO_ERROR) rather than if ($error_number = 0)
-
-
-
src/Lunr/Push/Apns.php (Diff revision 6) mktime() without parameters throws a E_STRICT error according to the docs. Use time() instead.
-
-
src/Lunr/Push/Apns.php (Diff revision 6) what's the exact purpose of this? What does the user of this library get from defining his own process id?
-
src/Lunr/Push/Apns.php (Diff revision 6) IMHO this is of no use to anyone. The only point of this would be for logging, and in that case you can do that here directly.
-
src/Lunr/Push/Apns.php (Diff revision 6) this starts an awefully pointless chain of function calls. I do se the point of structuring it, but I'm not a big fan of creating functions for the sake of creating functions.
-
-