Documentation

ApplicationService extends VultrService
in package

Application service handler, for applications endpoints.

Tags
see
https://www.vultr.com/api/#tag/application

Table of Contents

Constants

FILTER_ALL  = 'all'
FILTER_MARKETPLACE  = 'marketplace'
FILTER_ONE_CLICK  = 'one-click'

Properties

$vultr  : VultrClient
$cache_applications  : array<string|int, mixed>|null
$client  : VultrClientHandler

Methods

__construct()  : mixed
cacheApplications()  : void
Cache all available applications from the vultr api.
getApplication()  : Application|null
Get a specific application object based on the app_id.
getApplications()  : array<string|int, Application>
Get a list of all available application images.
createObject()  : ModelInterface
deleteObject()  : void
getClientHandler()  : VultrClientHandler
getListObjects()  : array<string|int, ModelInterface>
getObject()  : ModelInterface
getVultrClient()  : VultrClient
list()  : array<string|int, mixed>
patchObject()  : void
getReadableClassType()  : string

Constants

Properties

$cache_applications

private static array<string|int, mixed>|null $cache_applications = null

Methods

cacheApplications()

Cache all available applications from the vultr api.

public cacheApplications([ $override = false ]) : void
Parameters
$override : = false
  • bool - Depending on whether to requery the applications.
Tags
throws
ApplicationException

getApplications()

Get a list of all available application images.

public getApplications([ $filter = self::FILTER_ALL ][,  &$options = null ]) : array<string|int, Application>
Parameters
$filter : = self::FILTER_ALL
  • ENUM('all', 'marketplace', 'one-click')
$options : = null
  • ListOptions|null - Interact via reference.
Tags
throws
ApplicationException
Return values
array<string|int, Application>

createObject()

protected createObject( $uri,  $model,  $params) : ModelInterface
Parameters
$uri :
  • string - the url address to query after api.vultr.com/v2
$model :
  • ModelInterface - the object model that we are creating
$params :
  • array - The values that we will be sending. Refactor to use getUpdateParams/getUpdateArray?
Tags
throws
Child

of VultrServiceObject

Return values
ModelInterface

deleteObject()

protected deleteObject( $uri,  $model) : void
Parameters
$uri :
  • string - the url address to query after api.vultr.com/v2
$model :
  • ModelInterface - the object model that we are acting on deleting. This doesn't need to be a fully initialized object.
Tags
throws
Child

of VultrServiceObject

getListObjects()

protected getListObjects( $uri,  $model[,  &$options = null ][,  $params = null ]) : array<string|int, ModelInterface>
Parameters
$uri :
  • string - the url address to query after api.vultr.com/v2
$model :
  • ModelInterface - the object that will be mapped to the get response.
$options : = null
  • ListOptions - Pagination object
$params : = null
  • array - filter parameters.
Tags
throws
Child

of VultrServiceObject

Return values
array<string|int, ModelInterface>

getObject()

protected getObject( $uri,  $model) : ModelInterface
Parameters
$uri :
  • string - the url address to query after api.vultr.com/v2
$model :
  • ModelInterface - the object that will be mapped to the get response.
Tags
throws
Child

of VultrServiceObject

Return values
ModelInterface

list()

protected list(string $uri, ModelInterface $model, ListOptions &$options[, array<string|int, mixed>|null $params = null ]) : array<string|int, mixed>
Parameters
$uri : string
$model : ModelInterface
$options : ListOptions
$params : array<string|int, mixed>|null = null
Return values
array<string|int, mixed>

patchObject()

protected patchObject( $uri,  $model[, array<string|int, mixed>|null $params = null ]) : void
Parameters
$uri :
  • string - the url address to query after api.vultr.com/v2
$model :
  • ModelInterface - the object model that we are updating. This needs to be a fully initialized object.
$params : array<string|int, mixed>|null = null
Tags
throws
Child

of VultrServiceObject


        
On this page

Search results