Documentation

ServiceListResponse implements ArrayCopyable, Arrayable, Jsonable Uses ArrayTrait, JsonTrait

Response from Authlete's /api/service/get/list API.

Interfaces, Classes and Traits

ArrayCopyable
Interface to declare instances can be converted into/from arrays.
Arrayable
Interface to declare that instances can be converted into an array.
Jsonable
Interface to declare that instances can be converted into JSON strings.

Table of Contents

copyFromArray()  : mixed
Copy the content of the given array into this object.
copyToArray()  : mixed
Copy the content of this object into the given array.
fromArray()  : static
Convert an array into an instance of this class.
fromJson()  : static
Convert a JSON string into an instance of this class.
getEnd()  : int
Get the end index (exclusive) of the result set of the query.
getServices()  : array<string|int, Service>
Get the list of services that match the query conditions.
getStart()  : int
Get the index (inclusive) of the result set of the query.
getTotalCount()  : int
Get the total number of services.
setEnd()  : ServiceListResponse
Set the end index (exclusive) of the result set of the query.
setServices()  : ServiceListResponse
Set the list of services that match the query conditions.
setStart()  : ServiceListResponse
Set the index (inclusive) of the result set of the query.
setTotalCount()  : ServiceListResponse
Set the total number of services.
toArray()  : array<string|int, mixed>
Convert this object into an array.
toJson()  : string
Convert this object into a JSON string.

Methods

copyFromArray()

Copy the content of the given array into this object.

public copyFromArray(array<string|int, mixed> &$array) : mixed
Parameters
$array : array<string|int, mixed>
Return values
mixed

copyToArray()

Copy the content of this object into the given array.

public copyToArray(array<string|int, mixed> &$array) : mixed
Parameters
$array : array<string|int, mixed>
Return values
mixed

fromArray()

Convert an array into an instance of this class.

public static fromArray([array<string|int, mixed> $array = null ]) : static

This static function returns a new instance of this class. If $array is null, null is returned.

Parameters
$array : array<string|int, mixed> = null

An array

Return values
static

An instance of this class.

fromJson()

Convert a JSON string into an instance of this class.

public static fromJson(string $json) : static

This static function returns a new instance of this class. If $json is null or the type of $json is not string, null is returned.

Parameters
$json : string

A JSON string.

Return values
static

An instance of this class.

getEnd()

Get the end index (exclusive) of the result set of the query.

public getEnd() : int

It is the value contained in the original request (= the value of the end parameter), or the default value defined in Authlete server if the original request did not contain the parameter.

Return values
int

The end index (exclusive) of the result set of the query.

getServices()

Get the list of services that match the query conditions.

public getServices() : array<string|int, Service>
Return values
array<string|int, Service>

The list of services that match the query conditions.

getStart()

Get the index (inclusive) of the result set of the query.

public getStart() : int

It is the value contained in the original request (= the value of the start parameter), or the default value (0) if the original request did not contain the parameter.

Return values
int

The index (inclusive) of the result set of the query.

getTotalCount()

Get the total number of services.

public getTotalCount() : int

The value of this property is not the size of the array returned from getServices() method. Instead, it is the total number of services in Authlete's database that match the query conditions.

Return values
int

The total number of services.

toArray()

Convert this object into an array.

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

An array.

toJson()

Convert this object into a JSON string.

public toJson(int $options) : string
Parameters
$options : int

Options passed to json_encode(). This parameter is optional and its default value is 0.

Return values
string

A JSON string.

Search results