Services_OpenStreetMap

# Class: Services_OpenStreetMap_Changeset

Source Location: /OpenStreetMap/Changeset.php

### Class Overview

    Services_OpenStreetMap_Object
       |
       --Services_OpenStreetMap_Changeset

Services_OpenStreetMap_Changeset

#### Author(s):

- Ken Guest <kguest@php.net>

### Variables

- $id
- $members
- $membersIds
- $open
- $osmChangeXml
- $type

### Methods

- __construct
- add
- begin
- commit
- getClosedAt
- getCreatedAt
- getId
- getMaxLat
- getMaxLon
- getMinLat
- getMinLon
- getOsmChangeXml
- isOpen
- setOsmChangeXml
- updateObjectId
- updateObjectIds

### Inherited Variables

#### Class: Services_OpenStreetMap_Object

Services_OpenStreetMap_Object::$action
Services_OpenStreetMap_Object::$changesetId
Services_OpenStreetMap_Object::$config
Services_OpenStreetMap_Object::$dirty
Services_OpenStreetMap_Object::$obj
Services_OpenStreetMap_Object::$tags
Services_OpenStreetMap_Object::$transport
Services_OpenStreetMap_Object::$xml

### Inherited Methods

#### Class: Services_OpenStreetMap_Object

Services_OpenStreetMap_Object::delete()
  Mark the object as deleted.
Services_OpenStreetMap_Object::getAttributes()
  Return the attributes set for this object in question.
Services_OpenStreetMap_Object::getConfig()
  Get current Config object
Services_OpenStreetMap_Object::getId()
  Retrieve the id of the object in question.
Services_OpenStreetMap_Object::getOsmChangeXml()
  Generate and return the OsmChange XML required to record the changes made to the object in question.
Services_OpenStreetMap_Object::getRelations()
  Get all relations referring to the object in question.
Services_OpenStreetMap_Object::getTag()
  Return value of specified tag as set against this object.
Services_OpenStreetMap_Object::getTags()
  Return the tags set for this object in question.
Services_OpenStreetMap_Object::getTransport()
  Retrieve the current Transport instance.
Services_OpenStreetMap_Object::getType()
  Return which type of object this is.
Services_OpenStreetMap_Object::getUid()
  Retrieve the uid of the object in question.
Services_OpenStreetMap_Object::getUser()
  Retrieve the user (creator/editor) of the object in question.
Services_OpenStreetMap_Object::getVersion()
  Retrieve the version of the object in question
Services_OpenStreetMap_Object::getXml()
  getXml
Services_OpenStreetMap_Object::history()
  Get each distinct version of an object.
Services_OpenStreetMap_Object::osmChangeXml()
  Amend changeXML with specific updates as appropriate.
Services_OpenStreetMap_Object::setChangesetId()
  Set the Changeset Id for this object.
Services_OpenStreetMap_Object::setConfig()
  Set Config object
Services_OpenStreetMap_Object::setId()
  Set the id value of the object in question.
Services_OpenStreetMap_Object::setTag()
  setTag
Services_OpenStreetMap_Object::setTags()
  Set a number of tags at once, using an associative array.
Services_OpenStreetMap_Object::setTransport()
  Set the Transport instance.
Services_OpenStreetMap_Object::setVal()
  Store a specified value.
Services_OpenStreetMap_Object::setXml()
  setXml
Services_OpenStreetMap_Object::__toString()
  If modified, return the osmChangeXML for the object, otherwise the defining XML.

### Class Details

[line 25]
Services_OpenStreetMap_Changeset

#### Tags:

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

[ Top ]

### Class Variables

#### $id = null

[line 31]

#### Tags:

access: | protected

Type: | mixed
Overrides: | Array

[ Top ]

#### $members = array()

[line 28]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $membersIds = array()

[line 29]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $open = false

[line 30]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $osmChangeXml = null

[line 32]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $type = 'changeset'

[line 27]

#### Tags:

access: | protected

Type: | mixed
Overrides: | Array

[ Top ]

### Class Methods

### constructor __construct [line 39]

`Services_OpenStreetMap_Changeset __construct( )`

__construct

#### Tags:

access: | public

[ Top ]

### method add [line 107]

`void add( Services_OpenStreetMap_Object $object)`

add object to the changeset so changes can be transmitted to the server

#### Tags:

throws: | Services_OpenStreetMap_RuntimeException If an object has already been added to the changeset or has been added to a closed changeset.
access: | public

#### Parameters:

Services_OpenStreetMap_Object | $object | OSM object

[ Top ]

### method begin [line 52]

`void begin( string $message)`

begin

#### Tags:

throws: | Services_OpenStreetMap_RuntimeException If either user or password are not set.
access: | public

#### Parameters:

string | $message | The changeset log message.

[ Top ]

### method commit [line 137]

`void commit( )`

commit

Generate osmChange document and post it to the server, when successful close the changeset.

#### Tags:

link: | http://wiki.openstreetmap.org/wiki/OsmChange
throws: | Services_OpenStreetMap_RuntimeException If changeset Id is not numeric
access: | public

[ Top ]

### method getClosedAt [line 268]

`string getClosedAt( )`

getClosedAt

#### Tags:

access: | public

[ Top ]

### method getCreatedAt [line 258]

`string getCreatedAt( )`

getCreatedAt

#### Tags:

access: | public

[ Top ]

### method getId [line 335]

`numeric getId( )`

getId

#### Tags:

return: | value or null if none set
access: | public

Overrides Services_OpenStreetMap_Object::getId() (Retrieve the id of the object in question.)
[ Top ]

### method getMaxLat [line 324]

`float getMaxLat( )`

getMaxLat

#### Tags:

access: | public

[ Top ]

### method getMaxLon [line 314]

`float getMaxLon( )`

getMaxLon

#### Tags:

access: | public

[ Top ]

### method getMinLat [line 303]

`float getMinLat( )`

getMinLat

#### Tags:

access: | public

[ Top ]

### method getMinLon [line 293]

`float getMinLon( )`

getMinLon

#### Tags:

access: | public

[ Top ]

### method getOsmChangeXml [line 226]

`string getOsmChangeXml( )`

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

#### Tags:

link: | http://wiki.openstreetmap.org/wiki/OsmChange
access: | public

Overrides Services_OpenStreetMap_Object::getOsmChangeXml() (Generate and return the OsmChange XML required to record the changes made to the object in question.)
[ Top ]

### method isOpen [line 278]

`boolean isOpen( )`

isOpen

#### Tags:

access: | public

[ Top ]

### method setOsmChangeXml [line 247]

`Services_OpenStreetMap_Changeset setOsmChangeXml( string $xml)`

setOsmChangeXml

#### Tags:

access: | public

#### Parameters:

string | $xml | OsmChange XML

[ Top ]

### method updateObjectId [line 380]

`void updateObjectId( string $type, integer $old_id, integer $new_id)`

Update id of some type of object

#### Tags:

access: | public

#### Parameters:

string | $type | Object type
integer | $old_id | Old id
integer | $new_id | New id

[ Top ]

### method updateObjectIds [line 353]

`void updateObjectIds( string $body)`

Given diffResult xml, update Ids of objects that are members of the current changeset.

#### Tags:

access: | public

#### Parameters:

string | $body | diffResult xml

[ Top ]

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