protected function addResource(&$keys, ResourceObject $resource) { $type = $resource->type(); $id = $resource->id(); $this->resources[$type . "." . $id] = $resource; $keys[$type . "." . $id] =& $this->resources[$type . "." . $id]; }