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

Class: Services_OpenStreetMap_Object

Source Location: /OpenStreetMap/Object.php

Class Overview


Services_OpenStreetMap_Object


Author(s):

Variables

Methods


Child classes:

Services_OpenStreetMap_Relation
Services_OpenStreetMap_Relation
Services_OpenStreetMap_Changeset
Services_OpenStreetMap_Changeset
Services_OpenStreetMap_Node
Services_OpenStreetMap_Node
Services_OpenStreetMap_Way
Services_OpenStreetMap_Way

Class Details

[line 25]
Services_OpenStreetMap_Object



Tags:

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


[ Top ]


Class Variables

$action =  null

[line 53]



Tags:

access:  protected

Type:   mixed


[ Top ]

$changesetId =  null

[line 55]



Tags:

access:  protected

Type:   mixed


[ Top ]

$config =  null

[line 40]



Tags:

access:  protected

Type:   mixed


[ Top ]

$dirty =  false

[line 51]



Tags:

access:  protected

Type:   mixed


[ Top ]

$id =  null

[line 36]



Tags:

access:  protected

Type:   mixed


[ Top ]

$obj =  null

[line 49]



Tags:

access:  protected

Type:   mixed


[ Top ]

$tags = array()

[line 34]

Array of tags in key/value format



Tags:

access:  protected

Type:   array


[ Top ]

$transport =  null

[line 38]



Tags:

access:  protected

Type:   mixed


[ Top ]

$type =  null

[line 47]

type of object



Tags:

access:  protected

Type:   string


[ Top ]

$xml =  null

[line 27]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


method delete [line 452]

void delete( )

Mark the object as deleted.

 $obj->delete();




Tags:

access:  public


[ Top ]

method getAttributes [line 293]

string getAttributes( )

Return the attributes set for this object in question.



Tags:

access:  public


[ Top ]

method getConfig [line 476]

Services_OpenStreetMap_Config getConfig( )

Get current Config object



Tags:

access:  public


[ Top ]

method getId [line 220]

integer getId( )

Retrieve the id of the object in question.



Tags:

return:  id of the object
access:  public


Overridden in child classes as:

Services_OpenStreetMap_Changeset::getId()
getId

[ Top ]

method getOsmChangeXml [line 138]

string getOsmChangeXml( )

Generate and return the OsmChange XML required to record the changes made to the object in question.



Tags:



Overridden in child classes as:

Services_OpenStreetMap_Changeset::getOsmChangeXml()
Generate and return the OsmChange XML required to record the changes made to the object in question.

[ Top ]

method getRelations [line 373]

Services_OpenStreetMap_Relations getRelations( )

Get all relations referring to the object in question.



Tags:

access:  public


[ Top ]

method getTag [line 321]

string getTag( string $key)

Return value of specified tag as set against this object.

If tag isn't set, return null.




Tags:

access:  public


Parameters:

string   $key   Key value, For example, 'amenity', 'highway' etc

[ Top ]

method getTags [line 307]

array getTags( )

Return the tags set for this object in question.



Tags:

return:  tags
access:  public


[ Top ]

method getTransport [line 499]

Services_OpenStreetMap_Transport. getTransport( )

Retrieve the current Transport instance.



Tags:

access:  public


[ Top ]

method getType [line 335]

string getType( )

Return which type of object this is.



Tags:

return:  type
access:  public


Overridden in child classes as:

Services_OpenStreetMap_Relation::getType()
type

[ Top ]

method getUid [line 254]

integer getUid( )

Retrieve the uid of the object in question.



Tags:

return:  uid of the object
access:  public


[ Top ]

method getUser [line 267]

string getUser( )

Retrieve the user (creator/editor) of the object in question.



Tags:

return:  user of the object
access:  public


[ Top ]

method getVersion [line 280]

string getVersion( )

Retrieve the version of the object in question



Tags:

return:  version of the object
access:  public


[ Top ]

method getXml [line 62]

string getXml( )

getXml



Tags:

access:  public


[ Top ]

method history [line 345]

Services_OpenStreetMap_Objects history( )

Get each distinct version of an object.



Tags:

access:  public


[ Top ]

method osmChangeXml [line 210]

string osmChangeXml( string $xml)

Amend changeXML with specific updates as appropriate.



Tags:



Overridden in child classes as:

Services_OpenStreetMap_Way::osmChangeXml()
Amend osmChangeXml with specific updates pertinent to this Way object.

Parameters:

string   $xml   OsmChange XML as generated by getOsmChangeXml

[ Top ]

method setChangesetId [line 125]

Services_OpenStreetMap_Object setChangesetId( integer $id)

Set the Changeset Id for this object.



Tags:

access:  public


Parameters:

integer   $id   Changeset Id (numeric)

[ Top ]

method setConfig [line 465]

Services_OpenStreetMap_Changeset setConfig( Services_OpenStreetMap_Config $config)

Set Config object



Tags:

access:  public


Parameters:

Services_OpenStreetMap_Config   $config   Config object

[ Top ]

method setId [line 243]

Services_OpenStreetMap_Object setId( integer $value)

Set the id value of the object in question.

 $obj->setId($id)->...




Tags:

access:  public


Parameters:

integer   $value   new id of the object

[ Top ]

method setTag [line 405]

Services_OpenStreetMap_Object setTag( mixed $key, mixed $value)

setTag

 $obj->setTag('key', 'value')->setTag(...);




Tags:

access:  public


Parameters:

mixed   $key   key
mixed   $value   value

[ Top ]

method setTags [line 435]

Services_OpenStreetMap_Object setTags( [array $tags = array()])

Set a number of tags at once, using an associative array.

 $obj->setTag(
  array(
   'key' => 'value',
   'key2', 'value2',
  )
 );




Tags:

access:  public


Parameters:

array   $tags   array of tags.

[ Top ]

method setTransport [line 488]

Services_OpenStreetMap_Config setTransport( Services_OpenStreetMap_Transport $transport)

Set the Transport instance.



Tags:

access:  public


Parameters:

Services_OpenStreetMap_Transport   $transport   Transport instance.

[ Top ]

method setVal [line 112]

void setVal( string $value)

Store a specified value.



Tags:

access:  public


Parameters:

string   $value   Most likely an id value, returned from the server.

[ Top ]

method setXml [line 91]

void setXml( SimpleXMLElement $xml)

setXml



Tags:

access:  public


Overridden in child classes as:

Services_OpenStreetMap_Relation::setXml()
setXml

Parameters:

SimpleXMLElement   $xml   OSM XML

[ Top ]

method __toString [line 74]

string __toString( )

If modified, return the osmChangeXML for the object, otherwise the defining XML.



Tags:



[ Top ]


Documentation generated on Wed, 26 Sep 2012 01:24:53 +0100 by phpDocumentor 1.4.4