switch ($apidata['content-type']) {
case 'xml':
$this->init_document('xml');
- common_element('version', null, LACONICA_VERSION);
+ $this->element('version', null, LACONICA_VERSION);
$this->end_document('xml');
break;
case 'json':
$this->end_document('json');
break;
default:
- $this->client_error(_('API method not found!'), $code=404);
+ $this->clientError(_('API method not found!'), $code=404);
}
}
switch ($apidata['content-type']) {
case 'xml':
$this->init_document('xml');
- common_element_start('config');
+ $this->elementStart('config');
// XXX: check that all sections and settings are legal XML elements
foreach ($keys as $section => $settings) {
- common_element_start($section);
+ $this->elementStart($section);
foreach ($settings as $setting) {
$value = common_config($section, $setting);
if (is_array($value)) {
} else if ($value === true) {
$value = 'true';
}
- common_element($setting, null, $value);
+ $this->element($setting, null, $value);
}
- common_element_end($section);
+ $this->elementEnd($section);
}
- common_element_end('config');
+ $this->elementEnd('config');
$this->end_document('xml');
break;
case 'json':
$this->end_document('json');
break;
default:
- $this->client_error(_('API method not found!'), $code=404);
+ $this->clientError(_('API method not found!'), $code=404);
}
}
function wadl($args, $apidata)
{
parent::handle($args);
- common_server_error(_('API method under construction.'), 501);
+ $this->serverError(_('API method under construction.'), 501);
}
+
}