/** * Extracts case-type for property-node. * * @param \DOMXPath $xpath * @param \DOMElement $propertyNode * * @return CaseTypeMetadata */ protected function getCaseType(\DOMXPath $xpath, \DOMElement $propertyNode) { $type = new CaseTypeMetadata(); foreach ($xpath->query('orm:field', $propertyNode) as $fieldNode) { if (null === ($case = $this->getField($xpath, $fieldNode))) { continue; } $type->addCase($case); } return $type; }