Overview

Namespaces

  • ApiAxle
    • Api
    • Shared
  • ApiAxleTest
    • Api
    • Shared
  • PHP

Classes

  • Config
  • HttpRequest
  • ItemList
  • Utilities

Exceptions

  • ApiException
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class Config

ApiAxle\Config class encapsulates common configuration settings for calling ApiAxle apis

Namespace: ApiAxle\Shared
Author: Phillip Shipley <phillip@phillipshipley.com>
Located at src/ApiAxle/Shared/Config.php
Methods summary
public
# __construct( array $config = array() )

Construct config object

Construct config object

If config is provided, parse it and setup object

Parameters

$config
array
$config
public
# setConfg( array $config )

Setup configuration

Setup configuration

Parameters

$config
array
$config
public array
# getConfig( )

Return configuration settings as array

Return configuration settings as array

Returns

array
public boolean
# loadConfigFile( string $file = false )

Load configuration from default config file unless alternate file is specified

Load configuration from default config file unless alternate file is specified

Parameters

$file
string
$file

Returns

boolean

Throws

Exception
public
# getEndpoint( )
public
# setEndpoint( mixed $endpoint )
public
# getKey( )
public
# setKey( mixed $key )
public
# getSecret( )
public
# setSecret( mixed $secret )
public
# getSslVerifypeer( )
public
# setSslVerifypeer( mixed $ssl_verifypeer )
public
# getSslCainfo( )
public
# setSslCainfo( mixed $ssl_cainfo )
public
# getSslCapath( )
public
# setSslCapath( mixed $ssl_capath )
public
# getProxyEnable( )
public
# setProxyEnable( mixed $proxy_enable )
public
# getProxyHost( )
public
# setProxyHost( mixed $proxy_host )
public
# getProxyPort( )
public
# setProxyPort( mixed $proxy_port )
public boolean
# getSignature( )

Generate an API signature based on key and shared secret.

Generate an API signature based on key and shared secret.

Uses hmac_sha1 to generate hash. There is a six second window where the hash is valid and ApiAxle will check the hash for three seconds before and after the call to validate it. Be sure you are using a network time server to keep your servers in sync with correct time

Returns false if a sharedSecret is not set for the key

Returns

boolean
string
Properties summary
protected string $endpoint
#

ApiAxle endpoing url

ApiAxle endpoing url

protected string $key
#

ApiAxle API key

ApiAxle API key

protected string $secret
#

ApiAxle API shared secret for signing requests

ApiAxle API shared secret for signing requests

protected boolean $ssl_verifypeer true
#

Enable/Disable verification of peer certificate when calling API

Enable/Disable verification of peer certificate when calling API

protected string $ssl_cainfo null
#

Additional config for cURL providing alternative CA certificate info. The name of a file holding one or more certificates to verify the peer with. Requires absolute path. Use this option alongside CURLOPT_SSL_VERIFYPEER.

Additional config for cURL providing alternative CA certificate info. The name of a file holding one or more certificates to verify the peer with. Requires absolute path. Use this option alongside CURLOPT_SSL_VERIFYPEER.

Link

cURL configuration options
protected string $ssl_capath null
#

Additional config for cURL providing alternative CA certificate path. A directory that holds multiple CA certificates. Use this option alongside CURLOPT_SSL_VERIFYPEER.

Additional config for cURL providing alternative CA certificate path. A directory that holds multiple CA certificates. Use this option alongside CURLOPT_SSL_VERIFYPEER.

Link

cURL configuration options
protected boolean $proxy_enable false
#

Enable/disable usage of a proxy server

Enable/disable usage of a proxy server

protected string $proxy_host
#

Set proxy server hostname

Set proxy server hostname

protected string $proxy_port
#

Set proxy server port

Set proxy server port

fillup/apiaxle API documentation generated by ApiGen 2.8.0