public function createResource($type)
{
$name = ucfirst($type);
$className = sprintf('Gc\\%s\\Collection', $name);
$method = sprintf('get%ss', $name);
$class = new $className();
$array = $class->{$method}();
if (empty($array)) {
return '';
}
return $class->toXml($array, $type . 's');
}