Services_OpenStreetMap

# Class: Services_OpenStreetMap_Objects

Source Location: /OpenStreetMap/Objects.php

### Class Overview

Services_OpenStreetMap_Objects

#### Author(s):

- Ken Guest <kguest@php.net>

Implements interfaces:

- Iterator (internal interface)
- ArrayAccess (internal interface)
- Countable (internal interface)

### Variables

- $config
- $objects
- $position
- $transport
- $xml

### Methods

- count
- current
- getConfig
- getTransport
- getXml
- key
- next
- offsetExists
- offsetGet
- offsetSet
- offsetUnset
- rewind
- setConfig
- setTransport
- setVal
- setXml
- valid

### Child classes:

Services_OpenStreetMap_Ways
  Services_OpenStreetMap_Ways

Services_OpenStreetMap_Changesets
  Services_OpenStreetMap_Nodes

Services_OpenStreetMap_Relations
  Services_OpenStreetMap_Relations

Services_OpenStreetMap_Nodes
  Services_OpenStreetMap_Nodes

### Class Details

[line 24]
Services_OpenStreetMap_Objects

#### Tags:

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

[ Top ]

### Class Variables

#### $config = null

[line 35]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $objects = null

[line 29]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $position = 0

[line 31]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $transport = null

[line 33]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $xml = null

[line 27]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

### Class Methods

### method count [line 83]

`void count( )`

Return the number of objects

#### Tags:

access: | public

Implementation of:

Countable::count

[ Top ]

### method current [line 103]

`Services_OpenStreetMap_Object current( )`

Return the current object

#### Tags:

access: | public

Implementation of:

Iterator::current

[ Top ]

### method getConfig [line 226]

`Services_OpenStreetMap_Config getConfig( )`

Get current Config object

#### Tags:

access: | public

[ Top ]

### method getTransport [line 249]

`Services_OpenStreetMap_Transport. getTransport( )`

Retrieve the current Transport instance.

#### Tags:

access: | public

[ Top ]

### method getXml [line 42]

`string getXml( )`

getXml

#### Tags:

access: | public

[ Top ]

### method key [line 131]

`void key( )`

Return the key of the current internal iterator pointer

#### Tags:

access: | public

Implementation of:

Iterator::key

[ Top ]

### method next [line 121]

`void next( )`

Advance the internal iterator pointer

#### Tags:

access: | public

Implementation of:

Iterator::next

[ Top ]

### method offsetExists [line 154]

`bool offsetExists( int $offset)`

Check if the specified offset exists.

#### Tags:

access: | public

Implementation of:

ArrayAccess::offsetExists

#### Parameters:

int | $offset | N/A.

[ Top ]

### method offsetGet [line 166]

`Services_OpenStreetMap_Object offsetGet( int $offset)`

Get object from the specified offset.

#### Tags:

access: | public

Implementation of:

ArrayAccess::offsetGet

#### Parameters:

int | $offset | N/A.

[ Top ]

### method offsetSet [line 190]

`void offsetSet( int $offset, Services_OpenStreetMap_Object $value)`

Does nothing as collection is read-only: required for ArrayAccess.

#### Tags:

throws: | LogicException
access: | public

Implementation of:

ArrayAccess::offsetSet

#### Parameters:

int | $offset | N/A
Services_OpenStreetMap_Object | $value | N/A

[ Top ]

### method offsetUnset [line 203]

`void offsetUnset( int $offset)`

Does nothing as collection is read-only: required for ArrayAccess.

#### Tags:

throws: | LogicException
access: | public

Implementation of:

ArrayAccess::offsetUnset

#### Parameters:

int | $offset | N/A.

[ Top ]

### method rewind [line 93]

`void rewind( )`

Resets the internal iterator pointer

#### Tags:

access: | public

Implementation of:

Iterator::rewind

[ Top ]

### method setConfig [line 215]

`Services_OpenStreetMap_Changeset setConfig( Services_OpenStreetMap_Config $config)`

Set Config object

#### Tags:

access: | public

#### Parameters:

Services_OpenStreetMap_Config | $config | Config object

[ Top ]

### method setTransport [line 238]

`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 71]

`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 54]

`void setXml( SimpleXMLElement $xml)`

setXml

#### Tags:

access: | public

#### Parameters:

mixed | $xml | OSM XML

[ Top ]

### method valid [line 142]

`bool valid( )`

Returns whether the current internal iterator pointer is pointing to an existing/valid value.

#### Tags:

access: | public

Implementation of:

Iterator::valid

[ Top ]

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