Changeset 6523 for sandbox/2.4.1-3/prototype/rest/hypermedia
- Timestamp:
- 06/15/12 14:49:24 (12 years ago)
- Location:
- sandbox/2.4.1-3/prototype/rest/hypermedia
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.4.1-3/prototype/rest/hypermedia/collection.php
r6437 r6523 29 29 public $type; 30 30 public $data; 31 31 public $links; 32 32 33 function __construct($config, $className ) {33 function __construct($config, $className, $id = null) { 34 34 foreach ($config as $key => $value) { 35 35 if ($value['class'] == $className) { 36 $uri = $key;36 $uri = ($id ? (preg_replace('/\/[:][a-zA-Z-0-9]+/', '', $key).'/'.$id ) : $key); 37 37 break; 38 38 } -
sandbox/2.4.1-3/prototype/rest/hypermedia/hypermedia.php
r6395 r6523 30 30 } 31 31 } 32 33 // functions adopted from http://www.sean-barton.co.uk/2009/03/turning-an-array-or-object-into-xml-using-php/34 32 35 33 function generateValidXmlFromObj(stdClass $obj, $node_block = 'nodes', $node_name = 'node') {
Note: See TracChangeset
for help on using the changeset viewer.