/** * Render a representation of a ResourceMetadata object. * * @param ResourceMetadata $resource A resource metadata object. * * @return A representation of the object. */ public function renderResourceMetadata(ResourceMetadata $resource) { $xml = ''; foreach ($resource->getProperties() as $name => $value) { $xml .= '<' . $name . '>' . $value . '</' . $name . '>'; } return $xml; }
/** * Render a representation of a ResourceMetadata object. * * @param ResourceMetadata $resource A resource metadata object. * * @return A representation of the object. */ public function renderResourceMetadata(ResourceMetadata $resource) { $data = array(); foreach ($resource->getProperties() as $name => $value) { $data[$name] = $value; } return $data; }