Example #1
0
 function get_object($object, $key)
 {
     $url = 'https://' . $this->node . '/api/getObject.sjs';
     $options['key'] = $key;
     $options['object'] = $object;
     list($status, $data) = $this->client->send($url, $options);
     return DemocracyInAction_Parser::parse_object($data);
 }
Example #2
0
 function testParseObject()
 {
     $xml = file_get_contents(dirname(__FILE__) . '/fixtures/get/getObject.sjs.xml');
     $result = DemocracyInAction_Parser::parse_object($xml);
     $this->assertEqual('Web', $result['Source']);
 }