Class WonderPush
WonderPush library entry class.
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
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
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
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
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
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
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
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
Constants summary
API_BASE
: string
API base URL.
Must contain scheme, host and optional port.
Can contain an additional path.
Must not end with a slash.
See
'https://management-api.wonderpush.com'
API_VERSION
: string
'v1'
VERSION
: string
WonderPush PHP library version.
WonderPush PHP library version.
'2.1.1'