protected function injectCacheMetadata($metakey, &$value, $class, $method, $groups, $resultMap) {
		$metadata = new \stdClass();
		$metadata->class = $class;
		$metadata->method = $method;
		$metadata->groups = empty($groups) ? null : $groups;
		$metadata->resultMap = $resultMap;
	
		if (is_array($value) || $value instanceof \ArrayObject)
			$value[$metakey] = $metadata;
		else
			$value->$metakey = $metadata;
	}