WonderPush PHP library
Getting Started
Simple usage looks like:
$wonderpush = new \WonderPush\WonderPush(WONDERPUSH_ACCESS_TOKEN, WONDERPUSH_APPLICATION_ID); $response = $this->api->create( \WonderPush\Params\DeliveriesCreateParams::_new() ->setTargetSegmentIds('@ALL') ->setNotification(\WonderPush\Notification::_new() ->setAlert(\WonderPush\NotificationAlert::_new() ->setTitle('Using the PHP library') ->setText('Hello, WonderPush!') )) ); echo $response->getNotificationId();
Configuring a Logger
The library does minimal logging, but it can be configured with a PSR-3
compatible logger so that messages end up there instead of error_log
:
$wonderpush->setLogger($logger);
API Reference
Take a look at the methods exposed by the \WonderPush\WonderPush class.
Namespaces summary
WonderPush |
WonderPush\Api |
WonderPush\Errors |
WonderPush\Net |
WonderPush\Obj |
WonderPush\Params |
WonderPush\Util |