Class Veriplace_DefaultClientFactory

Description

Implements interfaces:

Configures a Veriplace_Client from an array or a file containing named properties. The allowable property keys are defined by constants in this class.

Located in /Veriplace/ClientFactory.php (line 48)


	
			
Class Constant Summary
 APPLICATION_TOKEN = 'veriplace.application.token.value'
 APPLICATION_TOKEN_SECRET = 'veriplace.application.token.secret'
 CALLBACK_EXCLUDE_PARAMETERS = "veriplace.application.callback.exclude-params"
 CALLBACK_HOST = 'veriplace.application.callback.host'
 CALLBACK_INCLUDE_PARAMETERS = "veriplace.application.callback.include-params"
 CALLBACK_PATH = 'veriplace.application.callback.path'
 CALLBACK_PORT = 'veriplace.application.callback.port'
 CONSUMER_KEY = 'veriplace.application.consumer.key'
 CONSUMER_SECRET = 'veriplace.application.consumer.secret'
 DEFAULT_LOCATION_MODE = 'veriplace.application.location.mode'
 LOG_DATE_FORMAT = 'veriplace.client.log.date-format'
 LOG_FILE = 'veriplace.client.log.file'
 LOG_LEVEL = 'veriplace.client.log.level'
 LOG_TYPE = 'veriplace.client.log.type'
 PREFERRED_ENCODING = 'veriplace.client.encoding'
 PROTOCOL = "veriplace.server.protocol"
 SERVER_URI = 'veriplace.server.uri'
 TEMP_FILE_PATH = 'veriplace.client.temp-dir'
 TIMEOUT = 'veriplace.client.timeout'
 USE_LAST_KNOWN_LOCATION = 'veriplace.application.location.use-last-known'
Variable Summary
Method Summary
 static Veriplace_DefaultClientFactory fromFile (string $fileName)
 static array readPropertyFile (string $fileName)
Variables
Veriplace_Configuration $configuration (line 202)

The configuration properties that will be used to construct the client.

  • access: public
Methods
static fromFile (line 232)

Constructs a new client factory, reading property values from a text file.

Each property must be on a separate line in the format "name=value"; any line not in this format is ignored. You may change any of these properties before initializing the client, using the Veriplace_DefaultClientFactory::$configuration property.

  • return: A client factory.
  • throws: Veriplace_ConfigurationException if a property value is invalid or a required property is missing
  • access: public
static Veriplace_DefaultClientFactory fromFile (string $fileName)
  • string $fileName: Name of the property file.
static fromProperties (line 216)

Constructs a new client factory, converting the given property array into a Veriplace_Configuration.

You may change any of these properties before initializing the client, using the Veriplace_DefaultClientFactory::$configuration property.

  • return: A client factory.
  • throws: Veriplace_ConfigurationException if a property value is invalid or a required property is missing
  • access: public
static Veriplace_DefaultClientFactory fromProperties ( $properties)
  • array $properties: An associative array of properties, using the key constants defined in this class.
static parseConfiguration (line 266)

Converts a property array into a Veriplace_Configuration.

  • throws: Veriplace_ConfigurationException if a property value is invalid or a required property is missing
  • access: public
static Veriplace_Configuration parseConfiguration ( $properties)
  • array $properties: An associative array of properties, using the key constants defined in this class.
static readPropertyFile (line 320)

Reads property values from a text file.

Each property must be on a separate line in the format "name=value"; any line not in this format is ignored.

  • return: An associative array of properties.
  • access: public
static array readPropertyFile (string $fileName)
  • string $fileName: Name of the property file.
getClient (line 247)

Constructs a new Veriplace_Client using the previously configured properties.

  • access: public
Veriplace_Client getClient ()

Implementation of:
Veriplace_ClientFactory::getClient()
Constructs a Veriplace client.
Class Constants
APPLICATION_TOKEN = 'veriplace.application.token.value' (line 88)

The application-specific access token value for this application, if any.

This property may be left null if you will not be using any methods that require an application token (such as Veriplace_UserDiscoveryAPI::getUserByParameters()). Otherwise, you must specify both this property and Veriplace_DefaultClientFactory::APPLICATION_TOKEN_SECRET.

APPLICATION_TOKEN_SECRET = 'veriplace.application.token.secret' (line 99)

The application-specific access token secret for this application, if any.

This property may be left null if you will not be using any methods that require an application token (such as Veriplace_UserDiscoveryAPI::getUserByParameters()). Otherwise, you must specify both this property and Veriplace_DefaultClientFactory::APPLICATION_TOKEN.

CALLBACK_EXCLUDE_PARAMETERS =
"veriplace.application.callback.exclude-params"
(line 149)

Specifies the names of query string parameters that should not be included in callback URIs. Values are separated by commas.

CALLBACK_HOST = 'veriplace.application.callback.host' (line 123)

Specifies a hostname for callback URIs, if it can't be detected automatically due to your network configuration.

CALLBACK_INCLUDE_PARAMETERS =
"veriplace.application.callback.include-params"
(line 142)

Specifies the names of query string parameters to be included in callback URIs, if they should not all be included. Values are separated by commas.

CALLBACK_PATH = 'veriplace.application.callback.path' (line 136)

Specifies a URI subpath for callback URIs, if it can't be detected automatically due to your network configuration (for instance, if your application's output is hosted within a page from another application).

CALLBACK_PORT = 'veriplace.application.callback.port' (line 129)

Specifies a port for callback URIs, if it can't be detected automatically due to your network configuration.

CONSUMER_KEY = 'veriplace.application.consumer.key' (line 71)

The OAuth consumer key for this application. This property must always be specified.

CONSUMER_SECRET = 'veriplace.application.consumer.secret' (line 77)

The OAuth consumer secret for this application. This property must always be specified.

DEFAULT_LOCATION_MODE = 'veriplace.application.location.mode' (line 108)

The location mode for the Veriplace_GetLocationAPI to use if you don't specify a mode for a location request.

This property may be left null to use the global Veriplace default for location mode.

LOG_DATE_FORMAT = 'veriplace.client.log.date-format' (line 189)

The date format string for dates and times in the log file, in the form used by strftime().

LOG_FILE = 'veriplace.client.log.file' (line 170)

The name of a file for Veriplace informational logging.

LOG_LEVEL = 'veriplace.client.log.level' (line 183)

The maximum level of detail to include in the log: ERROR, WARN, NOTICE, INFO, or DEBUG.

LOG_TYPE = 'veriplace.client.log.type' (line 177)

The type of logger to use, if the PEAR::Log framework is installed.

Default is "file".

PREFERRED_ENCODING = 'veriplace.client.encoding' (line 157)

Specifies the desired API response encoding.

The value must be either "text/xml" or "application/json".

PROTOCOL = "veriplace.server.protocol" (line 65)

The OAuth protocol version to use.

If omitted, this defaults to Veriplace_Configuration::DEFAULT_PROTOCOL; otherwise it must be one of the values specified in Veriplace_ProtocolVersion.

SERVER_URI = 'veriplace.server.uri' (line 57)

The Veriplace server's base URI (e.g. http://veriplace.com).

If omitted, this defaults to Veriplace_Configuration::DEFAULT_SERVER_URI. Currently all applications should use the default; other URIs are used only for WaveMarket internal testing.

TEMP_FILE_PATH = 'veriplace.client.temp-dir' (line 165)

Directory path for storing temporary files.

Default is '/tmp/Veriplace'. This directory will be created if it doesn't exist.

TIMEOUT = 'veriplace.client.timeout' (line 194)

The maximum number of seconds to wait for the server to respond.

USE_LAST_KNOWN_LOCATION =
'veriplace.application.location.use-last-known'
(line 116)

The property key for specifying a Veriplce_DefaultLocationFilter that can suppress location errors if there is a last known location.

A value of 'true' or '1' is considered true; the default is false.

Documentation generated on Sun, 29 Aug 2010 04:08:37 -0700 by phpDocumentor 1.4.1