public function parse($object)
{
if (!is_array($object)) {
throw new ValidationException('Resources for a collection has to be in an array, "' . gettype($object) . '" given.');
}
if (count($object) > 0) {
foreach ($object as $resource) {
$this->container->set('', $this->parseResource($resource));
}
}
return $this;
}