Groups
Sign in
Groups
apns-php
Conversations
About
Send feedback
Help
Saving Log Messages in array for writing a Logfile
19 views
Skip to first unread message
alex
unread,
Feb 25, 2016, 4:13:05 PM
2/25/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to apns-php
Hello,
I
am not a professional
what
classes and interfaces
concerns,
and
I am going crazy
now
...
Have seen this topic (
https://groups.google.com/forum/#!topic/apns-php/ddN2LOaBy8M
).
If I display the Message with "echo $sMessage" or something else, everything works fine.
But I wants to fill an array and use it later for writing it to an logfile (With APNS Log Messages and other Informations...
Here is my code:
class logAPNS implements ApnsPHP_Log_Interface {
public $appleLogs = array();
public function log($sMessage) {
global $appleLogs;
//$appleLogs[]['date'] = date('r');
//$appleLogs[]['pid'] = getmypid();
//$appleLogs[]['message'] = $sMessage;
array_push($this->$appleLogs, 'test');
}
}
$appleLogger = new
logAPNS
;
$apns_push->setLogger($appleLogger);
$apns_push->connect();
//print_r($apns_push->getLogger());
print_r($appleLogs);
I know, it's not a bug or specially apns-php problem, but I hope that you can eventually short explain to me what I'm doing wrong...
Thank you (and sorry for my bad english!)
Alex
Reply all
Reply to author
Forward
0 new messages