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

Class: Services_Openstreetmap_Transport

Source Location: /Openstreetmap/Transport.php

Class Overview


Services_Openstreetmap_Transport


Author(s):

Variables

Constants

Methods



Class Details

[line 25]
Services_Openstreetmap_Transport



Tags:

author:  Ken Guest <kguest@php.net>
link:  Transport.php
license:  BSD


[ Top ]


Class Variables

$config =  null

[line 62]



Tags:

access:  protected

Type:   mixed


[ Top ]

$request =  null

[line 60]

The HTTP_Request2 instance.

Customise this for proxy settings etc with the getRequest/setRequest methods if necessary.




Tags:

see:  Services_Openstreetmap::getRequest
see:  Services_Openstreetmap::setRequest
access:  protected

Type:   HTTP_Request2


[ Top ]



Class Methods


method getConfig [line 309]

Services_Openstreetmap_Config getConfig( )

Get current Config object



Tags:

access:  public


[ Top ]

method getObject [line 206]

object getObject( string $type, mixed $id, [mixed $version = null])

getObject

Returns false if the object is not found




Tags:

throws:  Services_Openstreetmap_Exception
access:  public


Parameters:

string   $type   object type
mixed   $id   id of object to retrieve
mixed   $version   version of object

[ Top ]

method getObjects [line 251]

void getObjects( string $type, array $ids)

getObjects



Tags:

access:  public


Parameters:

string   $type   object type
array   $ids   ids of objects to retrieve

[ Top ]

method getRequest [line 170]

HTTP_Request2 getRequest( )

Get HTTP_Request2 instance.



Tags:

access:  public


[ Top ]

method getResponse [line 81]

HTTP_Request2_Response getResponse( string $url, [string $method = HTTP_Request2::METHOD_GET], [string $user = null], [string $password = null], [string $body = null], [array $post_data = null], [array $headers = null])

Send request to OSM server and return the response.



Tags:

throws:  Services_Openstreetmap_Exception If something unexpected has happened while conversing with the server.
access:  public


Parameters:

string   $url   URL
string   $method   GET (default)/POST/PUT
string   $user   user (optional for read-only actions)
string   $password   password (optional for read-only actions)
string   $body   body (optional)
array   $post_data   (optional)
array   $headers   (optional)

[ Top ]

method searchObjects [line 322]

Services_Openstreetmap_Objects searchObjects( string $type, array $criteria)

searchObjects



Tags:

access:  public


Parameters:

string   $type   object type (e.g. changeset)
array   $criteria   array of criterion objects.

[ Top ]

method setConfig [line 299]

Services_Openstreetmap_API_V06 setConfig( Services_Openstreetmap_Config $config)

Set Config object



Tags:

access:  public


Parameters:

Services_Openstreetmap_Config   $config   Config settings.

[ Top ]

method setRequest [line 188]

Services_Openstreetmap setRequest( HTTP_Request2 $request)

Set the HTTP_Request2 instance and return the Services_Openstreetmap instance.

Use this to inject a specific HTTP_Request2 instance.




Tags:

access:  public


Parameters:

HTTP_Request2   $request   The HTTP_Request2 instance to set.

[ Top ]


Class Constants

GONE =  410

[line 46]

Resource no longer available.



Tags:

link:  
access:  public

[ Top ]

NOT_FOUND =  404

[line 42]

Resource not found.



Tags:

link:  
access:  public

[ Top ]

OK =  200

[line 34]

Ok



Tags:

link:  
access:  public

[ Top ]

UNAUTHORISED =  401

[line 38]

Unauthorised, e.g. login credentials wrong.



Tags:

link:  
access:  public

[ Top ]



Documentation generated on Wed, 11 Jan 2012 00:37:11 +0000 by phpDocumentor 1.4.4