Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add missing docblocks

  • Loading branch information...
commit 8508cd56e8d29718846c20a5c664f9216fe56c35 1 parent ca1ec5b
@kenguest authored
View
5 Services/OpenStreetMap.php
@@ -45,6 +45,11 @@ class Services_OpenStreetMap
*/
protected $xml = null;
+ /**
+ * transport
+ *
+ * @var Services_OpenStreetMap_Transport
+ */
protected $transport = null;
/**
View
10 Services/OpenStreetMap/API/V06.php
@@ -32,8 +32,18 @@ class Services_OpenStreetMap_API_V06
*/
protected $elements = array('changeset', 'node', 'relation', 'way');
+ /**
+ * transport
+ *
+ * @var Services_OpenStreetMap_Transport
+ */
protected $transport = null;
+ /**
+ * Config object, contains setting on how to interact with API Endpoint
+ *
+ * @var Services_OpenStreetMap_Config $config
+ */
protected $config = null;
/**
View
40 Services/OpenStreetMap/Changeset.php
@@ -24,11 +24,46 @@
*/
class Services_OpenStreetMap_Changeset extends Services_OpenStreetMap_Object
{
+ /**
+ * What type object this is.
+ *
+ * @var string
+ */
protected $type = 'changeset';
+
+ /**
+ * Array containing members of what this changeset represents.
+ *
+ * @var array
+ */
protected $members = array();
+
+ /**
+ * Array of the Ids of the members of what this changeset represents.
+ *
+ * @var array
+ */
protected $membersIds = array();
+
+ /**
+ * Whether the changeset is open
+ *
+ * @var bool
+ */
protected $open = false;
+
+ /**
+ * The Id of this changeset
+ *
+ * @var string
+ */
protected $id = null;
+
+ /**
+ * The OsmChange XML for this changeset
+ *
+ * @var string
+ */
protected $osmChangeXml = null;
/**
@@ -232,7 +267,10 @@ public function getOsmChangeXml()
foreach ($this->members as $member) {
$blocks .= $member->getOsmChangeXml() . "\n";
}
- $this->setOsmChangeXml("<osmChange version='0.6' generator='Services_OpenStreetMap'>" . $blocks . '</osmChange>');
+ $this->setOsmChangeXml(
+ "<osmChange version='0.6' generator='Services_OpenStreetMap'>"
+ . $blocks . '</osmChange>'
+ );
}
return $this->osmChangeXml;
}
View
5 Services/OpenStreetMap/Node.php
@@ -24,6 +24,11 @@
*/
class Services_OpenStreetMap_Node extends Services_OpenStreetMap_Object
{
+ /**
+ * What type of object this is.
+ *
+ * @var string
+ */
protected $type = 'node';
/**
View
63 Services/OpenStreetMap/Nominatim.php
@@ -23,17 +23,78 @@
*/
class Services_OpenStreetMap_Nominatim
{
+ // http://wiki.openstreetmap.org/wiki/Nominatim
+
+ /**
+ * The server to connect to
+ *
+ * @var string
+ */
protected $server = 'http://nominatim.openstreetmap.org/';
+
+ /**
+ * Format to perform queries in (xml|json|html). Defaults to 'xml'
+ *
+ * @var string
+ */
protected $format = 'xml';
+
+ /**
+ * If 1, include a breakdown of the address into elements.
+ *
+ * @var int
+ */
protected $addresssdetails = 0;
+
+ /**
+ * Preferred language order. Standard rfc2616 string or a simple comma
+ * seperated list of language codes.
+ *
+ * @var string
+ */
protected $accept_language = 'en';
+
+ /**
+ * Output polygon outlines for items found.
+ *
+ * @var null|boolean
+ */
protected $polygon = null;
+
+ /**
+ * The preferred area to find search results
+ * <left>,<top>,<right>,<bottom>
+ *
+ * @var null|string
+ */
protected $viewbox = null;
+
+ /**
+ * If true, restrict results to those within the bounding box/view box.
+ *
+ * @var null|boolean
+ */
protected $bounded = null;
+
+ /**
+ * Remove duplicates?
+ *
+ * @var null|boolean
+ */
protected $dedupe = null;
+ /**
+ * Maximum number of entries to retrieve.
+ *
+ * @var int
+ */
protected $limit = null;
+ /**
+ * The transport to use
+ *
+ * @var Services_OpenStreetMap_Transport
+ */
protected $transport = null;
/**
@@ -105,7 +166,7 @@ public function search($place, $limit = null)
$xml = simplexml_load_string($response->getBody());
$places = $xml->xpath('//place');
return $places;
- } elseif ( $format == 'json' ) {
+ } elseif ($format == 'json' ) {
$places = json_decode($response->getBody());
return $places;
} elseif ($format == 'html') {
View
40 Services/OpenStreetMap/Object.php
@@ -24,6 +24,11 @@
*/
class Services_OpenStreetMap_Object
{
+ /**
+ * xml represention of the object
+ *
+ * @var string
+ */
protected $xml = null;
/**
@@ -33,10 +38,25 @@ class Services_OpenStreetMap_Object
*/
protected $tags = array();
+ /**
+ * The Id of this object
+ *
+ * @var string
+ */
protected $id = null;
+ /**
+ * transport
+ *
+ * @var Services_OpenStreetMap_Transport
+ */
protected $transport = null;
+ /**
+ * Config object, contains setting on how to interact with API Endpoint
+ *
+ * @var Services_OpenStreetMap_Config $config
+ */
protected $config = null;
/**
@@ -46,12 +66,32 @@ class Services_OpenStreetMap_Object
*/
protected $type = null;
+ /**
+ * The actual object that actions are performed on.
+ *
+ * @var mixed
+ */
protected $obj = null;
+ /**
+ * True if properties have changed.
+ *
+ * @var bool
+ */
protected $dirty = false;
+ /**
+ * The action being performed on this object
+ *
+ * @var mixed
+ */
protected $action = null;
+ /**
+ * The Changeset Id for this object, if applicable.
+ *
+ * @var int
+ */
protected $changesetId = null;
/**
View
27 Services/OpenStreetMap/Objects.php
@@ -24,14 +24,39 @@
class Services_OpenStreetMap_Objects implements Iterator, ArrayAccess, Countable
{
+ /**
+ * xml representation of the objects
+ *
+ * @var string
+ */
protected $xml = null;
+ /**
+ * Array of Services_OpenStreetMap_Object instances
+ *
+ * @var array
+ */
protected $objects = null;
+ /**
+ * position/pointer for navigating objects array
+ *
+ * @var int
+ */
protected $position = 0;
+ /**
+ * transport
+ *
+ * @var Services_OpenStreetMap_Transport
+ */
protected $transport = null;
+ /**
+ * Config object, contains setting on how to interact with API Endpoint
+ *
+ * @var Services_OpenStreetMap_Config $config
+ */
protected $config = null;
/**
@@ -47,7 +72,7 @@ public function getXml()
/**
* setXml
*
- * @param mixed $xml OSM XML
+ * @param SimpleXMLElement $xml OSM XML
*
* @return void
*/
View
6 Services/OpenStreetMap/OpeningHours.php
@@ -11,7 +11,6 @@
* @license BSD http://www.opensource.org/licenses/bsd-license.php
* @version Release: @package_version@
* @link OpeningHours.php
- * @todo
*/
/**
@@ -25,6 +24,11 @@
*/
class Services_OpenStreetMap_OpeningHours
{
+ /**
+ * The value set against the OpeningHours tag
+ *
+ * @var string
+ */
protected $value;
/**
View
11 Services/OpenStreetMap/Relation.php
@@ -24,8 +24,19 @@
*/
class Services_OpenStreetMap_Relation extends Services_OpenStreetMap_Object
{
+ /**
+ * What type of object this is.
+ *
+ * @var string
+ */
protected $type = 'relation';
+
+ /**
+ * Array containing members of this relation.
+ *
+ * @var array
+ */
protected $members = array();
/**
View
4 Services/OpenStreetMap/Transport/HTTP.php
@@ -56,11 +56,15 @@ public function __construct()
protected $request = null;
/**
+ * Config object, contains setting on how to interact with API Endpoint
+ *
* @var Services_OpenStreetMap_Config $config
*/
protected $config = null;
/**
+ * Log object
+ *
* @var Log $log
*/
protected $log = null;
View
5 Services/OpenStreetMap/Transport/HTTPCached.php
@@ -28,6 +28,11 @@ class Services_OpenStreetMap_Transport_HTTPCached
extends Services_OpenStreetMap_Transport_HTTP
{
+ /**
+ * cache object
+ *
+ * @var Cache
+ */
protected $cache;
/**
View
5 Services/OpenStreetMap/User.php
@@ -25,6 +25,11 @@
class Services_OpenStreetMap_User
{
+ /**
+ * User preferences
+ *
+ * @var array
+ */
protected $preferences = array();
/**
View
26 Services/OpenStreetMap/Way.php
@@ -24,9 +24,33 @@
*/
class Services_OpenStreetMap_Way extends Services_OpenStreetMap_Object
{
+ /**
+ * What type of object this is
+ *
+ * @inheritdoc
+ */
protected $type = 'way';
+
+
+ /**
+ * A way is a collection of nodes.
+ *
+ * @var Services_OpenStreetMap_Node[]
+ */
protected $nodes = array();
+
+ /**
+ * Nodes to the way
+ *
+ * @var array
+ */
protected $nodesNew = array();
+
+ /**
+ * Indicate whether nodes have been changed/added/deleted.
+ *
+ * @var boolean
+ */
protected $dirtyNodes = false;
/**
@@ -74,7 +98,7 @@ public function getNodes()
/**
* Add a node to the way.
*
- * @param node $node An Services_OpenStreetMap_Node object.
+ * @param Services_OpenStreetMap_Node $node Node to add to the way.
*
* @return Services_OpenStreetMap_Way
*/
View
4 package.php
@@ -12,14 +12,14 @@
'baseinstalldir' => '/',
'dir_roles' => array(
'examples' => 'doc',
- 'docs' => 'doc',
'tests' => 'test'
),
'ignore' => array(
'coverage.db',
'package.php',
'package.xml',
- 'package.xml.old'
+ 'package.xml.old',
+ 'docs',
),
'simpleoutput' => true)
);
Please sign in to comment.
Something went wrong with that request. Please try again.