WonderPush PHP library
  • Namespace
  • Class
Navigation
  • Namespace
  • Class
Namespaces
  • WonderPush
    • Api
    • Errors
    • Net
    • Obj
    • Params
    • Util
Classes
  • WonderPush

Class WonderPush

WonderPush library entry class.

Namespace: WonderPush
Located at WonderPush.php

Methods summary

public __construct( string $accessToken, string $applicationId = null )

Constructs the library instance that you can use to send API calls against WonderPush.

Constructs the library instance that you can use to send API calls against WonderPush.

This is the library entry-point.

Relying on an instance instead of a static enables you to easily handle multiple projects, and does not prevent you from creating your own static singleton instance out of it.

You can find your credentials in the Settings / Configuration page of your project dashboard.

Parameters

$accessToken
The Management API access token used to perform API calls.
$applicationId
The application id corresponding to the access token.
public getAccessToken( void ) : string

The Management API access token used to perform API calls.

The Management API access token used to perform API calls.

Returns

string
public getApplicationId( void ) : string

The application id corresponding to the access token.

The application id corresponding to the access token.

Returns

string
public static getGlobalLogger( void ) : WonderPush\Util\Logger

The logger to which the library will produce messages, when used outside the scope of a WonderPush instance.

The logger to which the library will produce messages, when used outside the scope of a WonderPush instance.

Returns

WonderPush\Util\Logger
public static setGlobalLogger( WonderPush\Util\Logger $logger )

Set the logger to which the library will produce messages, when used outside the scope of a WonderPush instance.

Set the logger to which the library will produce messages, when used outside the scope of a WonderPush instance.

Parameters

$logger
public getLogger( void ) : WonderPush\Util\Logger

The logger to which the library will produce messages.

The logger to which the library will produce messages.

Returns

WonderPush\Util\Logger
public setLogger( WonderPush\Util\Logger $logger )

Set the logger to which the library will produce messages.

Set the logger to which the library will produce messages.

Parameters

$logger
public getHttpClient( void ) : WonderPush\Net\HttpClientInterface

The HTTP client to use to perform API calls.

The HTTP client to use to perform API calls.

Returns

WonderPush\Net\HttpClientInterface
public setHttpClient( WonderPush\Net\HttpClientInterface $httpClient )

Set the HTTP client to use to perform API calls.

Set the HTTP client to use to perform API calls.

Parameters

$httpClient
public getApiBase( void ) : string

The API base against which to place API calls.

The API base against which to place API calls.

This is mostly useful for developing the PHP library itself, you should ignore it.

Returns

string

See

WonderPush\WonderPush::API_BASE
public setApiBase( string $apiBase )

The API base against which to place API calls.

The API base against which to place API calls.

This is mostly useful for developing the PHP library itself, you should ignore it.

Parameters

$apiBase
public getApiRoot( void ) : string

The API root against which to place API calls.

The API root against which to place API calls.

Builds on the API base, API version and API prefix.

Returns

string

See

WonderPush\WonderPush::getApiBase()
WonderPush\WonderPush::API_VERSION
WonderPush\WonderPush::API_PREFIX
public rest( void ) : WonderPush\Api\Rest

Rest API instance.

Rest API instance.

Returns

WonderPush\Api\Rest
public deliveries( void ) : WonderPush\Api\Deliveries

Deliveries endpoints.

Deliveries endpoints.

Returns

WonderPush\Api\Deliveries
public applications( void ) : WonderPush\Api\Applications

Application endpoints

Application endpoints

Returns

WonderPush\Api\Applications
public installations( void ) : WonderPush\Api\Installations

Installation endpoints

Installation endpoints

Returns

WonderPush\Api\Installations

Constants summary

API_BASE : string

API base URL.

API base URL.

Must contain scheme, host and optional port. Can contain an additional path. Must not end with a slash.

See

WonderPush\WonderPush::getApiBase()
WonderPush\WonderPush::getApiRoot()
'https://management-api.wonderpush.com'
API_VERSION : string

API version.

API version.

See

WonderPush\WonderPush::getApiRoot()
'v1'
API_PREFIX : string

API prefix.

API prefix.

See

WonderPush\WonderPush::getApiRoot()
''
VERSION : string

WonderPush PHP library version.

WonderPush PHP library version.

'2.1.1'
WonderPush PHP library API documentation generated by ApiGen