Services_OpenStreetMap
[ class tree: Services_OpenStreetMap ] [ index: Services_OpenStreetMap ] [ all elements ]

Class: Services_OpenStreetMap_Config

Source Location: /Services_OpenStreetMap-1.0.0RC2/Services/OpenStreetMap/Config.php

Class Overview


Services_OpenStreetMap_Config


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 25]
Services_OpenStreetMap_Config


[ Top ]


Class Variables

=

[line 140]

  • Access: protected

Type:   mixed


[ Top ]

=

[line 153]

  • Access: protected

Type:   mixed


[ Top ]

$api =  null

[line 32]

  • Access: protected

Type:   mixed


[ Top ]

$apiStatus =  null

[line 120]

Status of API server: online, readonly or offline.
  • Access: protected

Type:   string


[ Top ]

$api_version =  '0.6'

[line 170]

Version of the [OSM] API which communications will be over.
  • Access: protected

Type:   string


[ Top ]

$areaMaximum =  null

[line 102]

Max size of area that can be downloaded in one request.
  • Access: protected

Type:   float


[ Top ]

$changesetMaximumElements =  null

[line 75]

Number of elements allowed per changeset
  • Access: protected

Type:   integer


[ Top ]

$config =  [
        'accept-language' => 'en'

[line 138]

Default config settings
  • See: Services_OpenStreetMap::getConfig
  • See: Services_OpenStreetMap::setConfig
  • Access: protected

Type:   array


[ Top ]

$consumer_secret =  null

[line 30]

  • Access: protected

Type:   mixed


[ Top ]

$databaseStatus =  null

[line 111]

Status of Database server: online, readonly or offline.
  • Access: protected

Type:   string


[ Top ]

$generator =  'Generator'

[line 188]

Capabilities XML generated by...
  • Access: protected

Type:   string


[ Top ]

$gpxStatus =  null

[line 129]

Status of GPX server: online, readonly or offline.
  • Access: protected

Type:   string


[ Top ]

$maxVersion =  null

[line 57]

Maximum version of the OSM API that is supported.
  • Access: protected

Type:   float


[ Top ]

$minVersion =  null

[line 48]

Minimum version of the OSM API that is supported.
  • Access: protected

Type:   float


[ Top ]

$oauth_consumer_key =  null

[line 27]

  • Access: protected

Type:   mixed


[ Top ]

$oauth_token =  null

[line 28]

  • Access: protected

Type:   mixed


[ Top ]

$oauth_token_secret =  null

[line 29]

  • Access: protected

Type:   mixed


[ Top ]

$server =  'https://api.openstreetmap.org/'

[line 179]

Server to connect to.
  • Access: protected

Type:   string


[ Top ]

$timeout =  null

[line 66]

Timeout, in seconds.
  • Access: protected

Type:   integer


[ Top ]

$tracepointsPerPage =  null

[line 93]

Number of tracepoints per way.
  • Access: protected

Type:   integer


[ Top ]

$transport =  null

[line 39]

Transport object.
  • Access: protected



[ Top ]

$waynodesMaximum =  null

[line 84]

Maximum number of nodes per way.
  • Access: protected

Type:   integer


[ Top ]



Method Detail

asArray   [line 510]

array asArray( )

Return all config settings in an array.
  • Access: public

[ Top ]

getApiStatus   [line 731]

null|string getApiStatus( )

Status of the main OSM API (offline/readonly/online).
  • Access: public

[ Top ]

getDatabaseStatus   [line 721]

null|string getDatabaseStatus( )

Status of the OSM database (offline/readonly/online).
  • Access: public

[ Top ]

getGenerator   [line 751]

string getGenerator( )

Name of what generated the Capabilities XML.
  • Access: public

[ Top ]

getGpxStatus   [line 741]

null|string getGpxStatus( )

Status of the OSM GPX API (offline/readonly/online).
  • Access: public

[ Top ]

getMaxArea   [line 617]

float getMaxArea( )

Max size of area that can be downloaded in one request.

Use like:

  1.  $osm = new Services_OpenStreetMap();
  2.  $area_allowed $osm->getMaxArea();

  • Access: public

[ Top ]

getMaxElements   [line 711]

int getMaxElements( )

Maximum number of elements allowed per changeset.

Use like:

  1.  $osm = new Services_OpenStreetMap();
  2.  $max $osm->getMaxElements();

  • Access: public

[ Top ]

getMaxNodes   [line 695]

int getMaxNodes( )

Maximum number of nodes per way.

Anymore than that and the way must be split.

  1.  $osm = new Services_OpenStreetMap();
  2.  $max $osm->getMaxNodes();

  • Access: public

[ Top ]

getMaxVersion   [line 651]

float getMaxVersion( )

Maximum API version supported by connected server.

Use like:

  1.  $config = array('user' => 'fred@example.net''password' => 'wilma4eva');
  2.  $osm = new Services_OpenStreetMap($config);
  3.  $max $osm->getMaxVersion();

  • Access: public

[ Top ]

getMinVersion   [line 634]

float getMinVersion( )

Minimum API version supported by connected server.

Use like:

  1.  $config = array('user' => 'fred@example.net''password' => 'wilma4eva');
  2.  $osm = new Services_OpenStreetMap($config);
  3.  $min $osm->getMinVersion();

  • Access: public

[ Top ]

getTimeout   [line 662]

int getTimeout( )

Return the number of seconds that must elapse before a connection is considered to have timed-out.
  • Access: public

[ Top ]

getTracepointsPerPage   [line 678]

int getTracepointsPerPage( )

Maximum number of tracepoints per page.

Use like:

  1.  $osm = new Services_OpenStreetMap();
  2.  $tracepoints $osm->getTracepointsPerPage();

  • Access: public

[ Top ]

getTransport   [line 500]

Services_OpenStreetMap_Transport. getTransport( )

Retrieve the current Transport instance.
  • Access: public

[ Top ]

getValue   [line 206]

mixed getValue( [string $name = null])

Get the value of a configuration setting - if none is set all are returned.

Use like:

  1.  $config $osm->getConfig();

  • Return: value of $name parameter, array of all configuration parameters if $name is not given
  • Throws: Services_OpenStreetMap_InvalidArgumentException If the parameter is unknown
  • Access: public

Parameters:

string   $name   —  name. optional.

[ Top ]

getXmlValue   [line 766]

string getXmlValue( SimpleXMLElement $xml, string $tag, string $attribute, [mixed $default = null])

Given SimpleXMLElement, retrieve tag value.
  • Access: public

Parameters:

SimpleXMLElement   $xml   —  Object
string   $tag   —  name of tag
string   $attribute   —  name of attribute
mixed   $default   —  default value, optional

[ Top ]

setAcceptLanguage   [line 333]

Services_OpenStreetMap_Config setAcceptLanguage( string $language)

Set the 'Accept' language.
  • Access: public

Parameters:

string   $language   —  Accept Language

[ Top ]

setPasswordfile   [line 441]

Services_OpenStreetMap_Config setPasswordfile( string $file)

Set and parse a password file, setting username and password as specified in the file.

A password file is a ASCII text file, with username and passwords pairs on each line, separated [delimited] by a semicolon. Lines starting with a hash [#] are comments. If only one non-commented line is present in the file, that username and password will be used for authentication. If more than one set of usernames and passwords are present, the username must be specified, and the matching password from the file will be used.

 # Example password file.
 fredfs@example.com:Wilma4evah
 barney@example.net:B3ttyRawks

  • Access: public

Parameters:

string   $file   —  file containing credentials

[ Top ]

setServer   [line 395]

Services_OpenStreetMap_Config setServer( string $server)

Connect to specified server.
  • Throws: Services_OpenStreetMap_Exception If valid response isn't received.
  • Access: public

Parameters:

string   $server   —  base server details, e.g. https://api.openstreetmap.org

[ Top ]

setTransport   [line 488]

Services_OpenStreetMap_Config setTransport( Services_OpenStreetMap_Transport $transport)

Set the Transport instance.
  • Access: public

Parameters:

Services_OpenStreetMap_Transport   $transport   —  Transport instance.

[ Top ]

setValue   [line 260]

Services_OpenStreetMap_Config setValue( mixed $config, [mixed $value = null])

Set at least one configuration variable.

Use like:

  1.  $osm->setConfig('user''fred@example.com');
  2.  $osm->setConfig(array('user' => 'fred@example.com''password' => 'Simples'));
  3.  $osm->setConfig('user' => 'f@example.com')->setConfig('password' => 'Sis');

The following parameters are available:

  • 'accept-language' - language to use for queries with Nominatim
  • 'adapter' - adapter to use (string)
  • 'api_version' - Version of API to communicate via (string)
  • 'password' - password (string, optional)
  • 'passwordfile' - passwordfile (string, optional)
  • 'server' - server to connect to (string)
  • 'User-Agent' - User-Agent (string)
  • 'user' - user (string, optional)
  • 'verbose' - verbose (boolean, optional)
  • 'oauth_token' - false
  • 'oauth_token_secret' - false
  • 'oauth_consumer_key' - false
  • 'consumer_secret' - false
  • 'ssl_verify_peer' - true
  • 'ssl_verify_host' - true
  • 'ssl_cafile' - null
  • 'ssl_local_cert' - null
  • 'ssl_passphrase' - null
SSL related parameters are documented at http://pear.php.net/manual/en/package.http.http-request2.config.php

  • Throws: Services_OpenStreetMap_InvalidArgumentException If the parameter is unknown
  • Access: public

Parameters:

mixed   $config   —  array containing config settings
mixed   $value   —  config value if $config is not an array

[ Top ]


Documentation generated on Tue, 28 May 2019 19:19:07 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.