@@ 120-126 (lines=7) @@ | ||
117 | * @param array|\Traversable|Options $options |
|
118 | * @return Document|Result|NULL |
|
119 | */ |
|
120 | public function load($source, string $contentType, $options = []) { |
|
121 | $contentType = $this->normalizeContentType($contentType); |
|
122 | if ($loader = $this->get($contentType)) { |
|
123 | return $loader->load($source, $contentType, $options); |
|
124 | } |
|
125 | return NULL; |
|
126 | } |
|
127 | ||
128 | /** |
|
129 | * @param mixed $source |
|
@@ 135-141 (lines=7) @@ | ||
132 | * @return DocumentFragment|NULL |
|
133 | * @throws \UnexpectedValueException |
|
134 | */ |
|
135 | public function loadFragment($source, string $contentType, $options = []) { |
|
136 | $contentType = $this->normalizeContentType($contentType); |
|
137 | if ($loader = $this->get($contentType)) { |
|
138 | return $loader->loadFragment($source, $contentType, $options); |
|
139 | } |
|
140 | return NULL; |
|
141 | } |
|
142 | ||
143 | /** |
|
144 | * @param string $contentType |