PHP Class Synology_Abstract

Afficher le fichier Open project: zzarbi/synology Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( string $serviceName, string $namespace, string $address, integer $port = null, string $protocol = self::PROTOCOL_HTTP, integer $version = 1, boolean $verifySSL = false ) Setup API
activateDebug ( ) : Synology_Abstract Activate the debug mode

Méthodes protégées

Méthode Description
_getBaseUrl ( ) : string Get the base URL
_request ( string $api, string $path, string $method, array $params = [], integer $version = null, string $httpMethod = 'get' ) : stdClass Process a request
log ( mixed $value, string $key = null ) Log different data

Private Methods

Méthode Description
_getApiName ( string $api ) Get ApiName
_parseRequest ( $json ) : stdClass

Method Details

__construct() public méthode

Setup API
public __construct ( string $serviceName, string $namespace, string $address, integer $port = null, string $protocol = self::PROTOCOL_HTTP, integer $version = 1, boolean $verifySSL = false )
$serviceName string
$namespace string
$address string
$port integer
$protocol string
$version integer
$verifySSL boolean

_getBaseUrl() protected méthode

Get the base URL
protected _getBaseUrl ( ) : string
Résultat string

_request() protected méthode

Process a request
protected _request ( string $api, string $path, string $method, array $params = [], integer $version = null, string $httpMethod = 'get' ) : stdClass
$api string
$path string
$method string
$params array
$version integer
$httpMethod string
Résultat stdClass array bool

activateDebug() public méthode

Activate the debug mode
public activateDebug ( ) : Synology_Abstract
Résultat Synology_Abstract

log() protected méthode

Log different data
protected log ( mixed $value, string $key = null )
$value mixed
$key string