@@ 27-42 (lines=16) @@ | ||
24 | /** |
|
25 | * {@inheritdoc} |
|
26 | */ |
|
27 | protected function loadMetadataFromFile($className, $file) |
|
28 | { |
|
29 | /* @var $xmlRoot \SimpleXMLElement */ |
|
30 | $xmlRoot = $this->getElement($className, $file); |
|
31 | $xmlRoot->registerXPathNamespace('cubiche', 'cubiche'); |
|
32 | ||
33 | try { |
|
34 | $classMetadata = new ClassMetadata($className); |
|
35 | } catch (\ReflectionException $e) { |
|
36 | throw MappingException::classNotFound($className); |
|
37 | } |
|
38 | ||
39 | $this->addMetadataFor($xmlRoot, $classMetadata); |
|
40 | ||
41 | return $classMetadata; |
|
42 | } |
|
43 | ||
44 | /** |
|
45 | * @param \SimpleXMLElement $item |
@@ 34-48 (lines=15) @@ | ||
31 | /** |
|
32 | * {@inheritdoc} |
|
33 | */ |
|
34 | protected function loadMetadataFromFile($className, $file) |
|
35 | { |
|
36 | $this->className = $className; |
|
37 | $config = $this->getElement($className, $file); |
|
38 | ||
39 | try { |
|
40 | $classMetadata = new ClassMetadata($className); |
|
41 | } catch (\ReflectionException $e) { |
|
42 | throw MappingException::classNotFound($className); |
|
43 | } |
|
44 | ||
45 | $this->addMetadataFor($config, $classMetadata); |
|
46 | ||
47 | return $classMetadata; |
|
48 | } |
|
49 | ||
50 | /** |
|
51 | * {@inheritdoc} |