Overview

Namespaces

  • None
  • PHP

Classes

  • RESTian
  • RESTian_Application_Json_Parser
  • RESTian_Application_Serialized_Php_Parser
  • RESTian_Application_Xml_Parser
  • RESTian_Auth_Provider_Base
  • RESTian_Base
  • RESTian_Basic_Http_Auth_Provider
  • RESTian_Client
  • RESTian_Http_Agent_Base
  • RESTian_Not_Applicable_Provider
  • RESTian_Parser_Base
  • RESTian_Php_Curl_Http_Agent
  • RESTian_Request
  • RESTian_Response
  • RESTian_Service
  • RESTian_Settings
  • RESTian_Text_Csv_Parser
  • RESTian_Text_Html_Parser
  • RESTian_Text_Plain_Parser
  • RESTian_Var
  • RESTian_WordPress_Http_Agent
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download

Class RESTian_Service

A RESTian_Service represents a service that can be called on an API.

Often a service is defined as a URL endpoint plus an HTTP method. RESTian_Client subclasses are responsible to register the API services that they need to call.

Located at core-classes/class-service.php
Methods summary
public
# __construct( string $service_name, RESTian_Client $client, array $args = array() )

Parameters

$service_name
string
$service_name
$client
RESTian_Client
$client
$args
array
$args

Throws

Exception
public string
# get_error_message( mixed $code )

Parameters

$code
mixed
$code

Returns

string
public boolean|RESTian_Settings
# get_request_settings( )

Returns

boolean|RESTian_Settings
public boolean|RESTian_Settings
# has_request_settings( )

Returns

boolean|RESTian_Settings
Properties summary
public string $service_name
#
  • Name of this service in lowercase.
  • Name of this service in lowercase.
public string $service_type 'service'
#

Type of service - 'resource', 'action' or (generic) 'service'

Type of service - 'resource', 'action' or (generic) 'service'

public string $path '/'
#
public string $content_type 'json'
#

Specifies content type expected using RESTian defined content types.

Specifies content type expected using RESTian defined content types.

public RESTian_Client $client
#
  • Reference back to the API that is managing these services.
  • Reference back to the API that is managing these services.
public boolean|array $requires false
#

List of other variable names that are required for this servcie to be valid.

List of other variable names that are required for this servcie to be valid.

public boolean|array $not_vars false
#

List of other variable names that make this variable invalid when they appear. If in "name=value" format then only invalid when the parameter appears with the specified value.

List of other variable names that make this variable invalid when they appear. If in "name=value" format then only invalid when the parameter appears with the specified value.

public array $vars false
#

List of valid parameter variables

List of valid parameter variables

public boolean $needs_authentication false
#

If true this servie requires authentication

If true this servie requires authentication

public boolean|string|RESTian_Settings $request_settings false
#

If exists limits options for this service

If exists limits options for this service

public string $charset 'utf-8'
#

character set used

character set used

API documentation generated by ApiGen 2.8.0