WonderPush PHP library
  • Namespace
  • Class
Navigation
  • Namespace
  • Class
Namespaces
  • WonderPush
    • Api
    • Errors
    • Net
    • Obj
    • Params
    • Util
Classes
  • WonderPush\Api\Applications
  • WonderPush\Api\Deliveries
  • WonderPush\Api\Installations
  • WonderPush\Api\Rest
  • WonderPush\Net\CurlHttpClient
  • WonderPush\Net\Request
  • WonderPush\Net\Response
  • WonderPush\Obj\Application
  • WonderPush\Obj\ApplicationCollection
  • WonderPush\Obj\BaseObject
  • WonderPush\Obj\Collection
  • WonderPush\Obj\DeliveriesCreateResponse
  • WonderPush\Obj\Event
  • WonderPush\Obj\GeoLocation
  • WonderPush\Obj\Installation
  • WonderPush\Obj\InstallationApplication
  • WonderPush\Obj\InstallationApplicationApple
  • WonderPush\Obj\InstallationCollection
  • WonderPush\Obj\InstallationDevice
  • WonderPush\Obj\InstallationDeviceCapabilities
  • WonderPush\Obj\InstallationDeviceConfiguration
  • WonderPush\Obj\InstallationPreferences
  • WonderPush\Obj\InstallationPushToken
  • WonderPush\Obj\Notification
  • WonderPush\Obj\NotificationAlert
  • WonderPush\Obj\NotificationAlertAndroid
  • WonderPush\Obj\NotificationAlertAndroidButton
  • WonderPush\Obj\NotificationAlertIos
  • WonderPush\Obj\NotificationAlertIosAttachment
  • WonderPush\Obj\NotificationAlertIosForeground
  • WonderPush\Obj\NotificationAlertWeb
  • WonderPush\Obj\NotificationAlertWebButton
  • WonderPush\Obj\NotificationButton
  • WonderPush\Obj\NotificationButtonAction
  • WonderPush\Obj\NotificationButtonActionEvent
  • WonderPush\Obj\NotificationInApp
  • WonderPush\Obj\NotificationInAppButton
  • WonderPush\Obj\NotificationInAppMap
  • WonderPush\Obj\NotificationInAppMapPlace
  • WonderPush\Obj\NotificationPush
  • WonderPush\Obj\NotificationPushAndroid
  • WonderPush\Obj\NotificationPushIos
  • WonderPush\Obj\NotificationPushWeb
  • WonderPush\Obj\NullObject
  • WonderPush\Obj\Pagination
  • WonderPush\Obj\SuccessResponse
  • WonderPush\Obj\User
  • WonderPush\Obj\WebSdkInitOptions
  • WonderPush\Params\AllInstallationsParams
  • WonderPush\Params\CollectionParams
  • WonderPush\Params\DeliveriesCreateParams
  • WonderPush\Params\PatchInstallationParams
  • WonderPush\Util\ArrayUtil
  • WonderPush\Util\DefaultLogger
  • WonderPush\Util\JsonSerializable
  • WonderPush\Util\StringUtil
  • WonderPush\Util\TimeUnit
  • WonderPush\Util\TimeUtil
  • WonderPush\Util\TimeValue
  • WonderPush\Util\UrlUtil
  • WonderPush\WonderPush
Interfaces
  • WonderPush\Net\HttpClientInterface
  • WonderPush\Util\Logger
Exceptions
  • WonderPush\Errors\Base
  • WonderPush\Errors\Network
  • WonderPush\Errors\Parsing
  • WonderPush\Errors\Server

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
WonderPush PHP library API documentation generated by ApiGen