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

Class: Services_OpenStreetMap_Object

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

Class Overview


Services_OpenStreetMap_Object


Author(s):

Variables

Methods


Child classes:

Services_OpenStreetMap_Relation
Services_OpenStreetMap_Relation
Services_OpenStreetMap_Node
Services_OpenStreetMap_Node
Services_OpenStreetMap_Changeset
Services_OpenStreetMap_Changeset
Services_OpenStreetMap_Comment
Services_OpenStreetMap_Comment
Services_OpenStreetMap_Note
Services_OpenStreetMap_Note
Services_OpenStreetMap_Way
Services_OpenStreetMap_Way

Inherited Variables

Inherited Methods


Class Details

[line 27]
Services_OpenStreetMap_Object


[ Top ]


Class Variables

$action =  null

[line 90]

The action being performed on this object
  • Access: protected

Type:   mixed


[ Top ]

$changesetId =  null

[line 97]

The Changeset Id for this object, if applicable.
  • Access: protected

Type:   string|null


[ Top ]

$config =  null

[line 62]

Config object, contains setting on how to interact with API Endpoint
  • Access: protected



[ Top ]

$dirty =  false

[line 83]

True if properties have changed.
  • Access: protected

Type:   bool


[ Top ]

$id =  null

[line 48]

The Id of this object
  • Access: protected

Type:   string|null


[ Top ]

$obj =  null

[line 76]

The actual object that actions are performed on.
  • Access: protected

Type:   mixed


[ Top ]

$tags =  []

[line 41]

Array of tags in key/value format
  • Access: protected

Type:   array


[ Top ]

$transport =  null

[line 55]

Transport object
  • Access: protected



[ Top ]

$type =  null

[line 69]

Type of object
  • Access: protected

Type:   string


[ Top ]

$xml =  null

[line 34]

XML represention of the object
  • Access: protected

Type:   string|null


[ Top ]



Method Detail

delete   [line 574]

Services_OpenStreetMap_Object delete( )

Mark the object as deleted.
  • Access: public

[ Top ]

getAttributes   [line 342]

mixed getAttributes( )

Return the attributes set for this object in question.
  • Access: public

[ Top ]

getConfig   [line 609]

Services_OpenStreetMap_Config getConfig( )

Get current Config object
  • Access: public

[ Top ]

getId   [line 263]

null|string getId( )

Retrieve the id of the object in question.
  • Return: id of the object
  • Access: public

Overridden in child classes as:

Services_OpenStreetMap_Changeset::getId()
Get changeset Id.

[ Top ]

getOsmChangeXml   [line 180]

string|null getOsmChangeXml( )

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

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 ]

getRelations   [line 422]

Services_OpenStreetMap_Relations getRelations( )

Get all relations referring to the object in question.
  • Access: public

[ Top ]

getTag   [line 370]

string|null getTag( string $key)

Return value of specified tag as set against this object.

If tag isn't set, return null.

  • Access: public

Parameters:

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

[ Top ]

getTags   [line 356]

array getTags( )

Return the tags set for this object in question.
  • Return: tags
  • Access: public

[ Top ]

getTransport   [line 633]

Services_OpenStreetMap_Transport. getTransport( )

Retrieve the current Transport instance.
  • Access: public

[ Top ]

getType   [line 384]

string getType( )

Return which type of object this is.
  • Return: type
  • Access: public

Overridden in child classes as:

Services_OpenStreetMap_Relation::getType()
Type

[ Top ]

getUid   [line 300]

integer getUid( )

Retrieve the uid of the object in question.
  • Return: uid of the object
  • Access: public

[ Top ]

getUser   [line 314]

string getUser( )

Retrieve the user (creator/editor) of the object in question.
  • Return: user of the object
  • Access: public

[ Top ]

getVersion   [line 328]

integer getVersion( )

Retrieve the version of the object in question
  • Return: version of the object
  • Access: public

[ Top ]

getXml   [line 104]

string getXml( )

Get XML.
  • Access: public

[ Top ]

history   [line 394]

Services_OpenStreetMap_Objects history( )

Get each distinct version of an object.
  • Access: public

[ Top ]

isDirty   [line 585]

bool isDirty( )

Indicate whether object has had a tag added, edited or removed.
  • Access: public

[ Top ]

osmChangeXml   [line 253]

string osmChangeXml( string $xml)

Amend changeXML with specific updates as appropriate.

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 ]

removeTag   [line 527]

Services_OpenStreetMap_Object removeTag( mixed $key)

Remove a tag.

  1.  $obj->removeTag("name:en");

  • Access: public

Parameters:

mixed   $key   —  Name of a tag key to remove.

[ Top ]

removeTags   [line 549]

Services_OpenStreetMap_Object removeTags( array $keys)

Remove tags.

Remove more than one tag from the object.

  1.  $obj->removeTags(array("name:en""name:kl"));

  • Access: public

Parameters:

array   $keys   —  Associate array of keys to remove.

[ Top ]

setAllTags   [line 510]

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

Set all tags.

This will overwrite all/any tags that are already set.

  1.  $obj->setAllTags(
  2.   array(
  3.    'key' => 'value',
  4.    'key2''value2',
  5.   )
  6.  );

  • Access: public

Parameters:

array   $tags   —  array of tags.

[ Top ]

setChangesetId   [line 167]

Services_OpenStreetMap_Object setChangesetId( string $id)

Set the Changeset Id for this object.
  • Access: public

Parameters:

string   $id   —  Changeset Id (numeric)

[ Top ]

setConfig   [line 597]

Services_OpenStreetMap_Object setConfig( Services_OpenStreetMap_Config $config)

Set Config object
  • Access: public

Parameters:

Services_OpenStreetMap_Config   $config   —  Config object

[ Top ]

setId   [line 289]

Services_OpenStreetMap_Object setId( string $value)

Set the id value of the object in question.

Specified id should be numeric.

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

  • Access: public

Parameters:

string   $value   —  new id of the object

[ Top ]

setTag   [line 456]

Services_OpenStreetMap_Object setTag( mixed $key, mixed $value)

Set tag to [new] key/value pair.

The object is returned, supporting Fluent coding style.

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

  • Access: public

Parameters:

mixed   $key   —  key
mixed   $value   —  value

[ Top ]

setTags   [line 484]

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

Set tags.

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

  1.  $obj->setTag(
  2.   array(
  3.    'key' => 'value',
  4.    'key2''value2',
  5.   )
  6.  );

  • Access: public

Parameters:

array   $tags   —  array of tags.

[ Top ]

setTransport   [line 621]

Services_OpenStreetMap_Object setTransport( Services_OpenStreetMap_Transport $transport)

Set the Transport instance.
  • Access: public

Parameters:

Services_OpenStreetMap_Transport   $transport   —  Transport instance.

[ Top ]

setVal   [line 154]

Services_OpenStreetMap_Object setVal( string $value)

Store a specified value.
  • Access: public

Parameters:

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

[ Top ]

setXml   [line 133]

Services_OpenStreetMap_Object setXml( SimpleXMLElement $xml)

Set XML.
  • Access: public

Overridden in child classes as:

Services_OpenStreetMap_Relation::setXml()
Set the Xml
Services_OpenStreetMap_Comment::setXml()
Set XML
Services_OpenStreetMap_Note::setXml()
Set XML

Parameters:

SimpleXMLElement   $xml   —  OSM XML

[ Top ]

__toString   [line 116]

string __toString( )

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

[ Top ]


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