rules as $rules) { foreach ($rules as $rule) { $values = $rule->extract($resource); if (empty($values)) { continue; } $identifier = \tao_helpers_Uri::getUniqueId($resource->getUri()); $path = $this->serializePath($rule->getPath()); if (! isset($metadataValues[$path])) { $metadataValues[$identifier] = $values; } else { $metadataValues[$identifier] = array_merge($metadataValues[$identifier], $values); } } } return $metadataValues; } }