| @@ 398-413 (lines=16) @@ | ||
| 395 | /** |
|
| 396 | * {@inheritdoc} |
|
| 397 | */ |
|
| 398 | public function findTypeDescriptors(Expression $expr) |
|
| 399 | { |
|
| 400 | $this->assertPackagesLoaded(); |
|
| 401 | ||
| 402 | $typeDescriptors = array(); |
|
| 403 | ||
| 404 | foreach ($this->typeDescriptors->toArray() as $typeName => $descriptorsByPackage) { |
|
| 405 | foreach ($descriptorsByPackage as $typeDescriptor) { |
|
| 406 | if ($expr->evaluate($typeDescriptor)) { |
|
| 407 | $typeDescriptors[] = $typeDescriptor; |
|
| 408 | } |
|
| 409 | } |
|
| 410 | } |
|
| 411 | ||
| 412 | return $typeDescriptors; |
|
| 413 | } |
|
| 414 | ||
| 415 | /** |
|
| 416 | * {@inheritdoc} |
|
| @@ 379-394 (lines=16) @@ | ||
| 376 | /** |
|
| 377 | * {@inheritdoc} |
|
| 378 | */ |
|
| 379 | public function findPathMappings(Expression $expr) |
|
| 380 | { |
|
| 381 | $this->assertMappingsLoaded(); |
|
| 382 | ||
| 383 | $mappings = array(); |
|
| 384 | ||
| 385 | foreach ($this->mappings->toArray() as $mappingsByPackage) { |
|
| 386 | foreach ($mappingsByPackage as $mapping) { |
|
| 387 | if ($expr->evaluate($mapping)) { |
|
| 388 | $mappings[] = $mapping; |
|
| 389 | } |
|
| 390 | } |
|
| 391 | } |
|
| 392 | ||
| 393 | return $mappings; |
|
| 394 | } |
|
| 395 | ||
| 396 | /** |
|
| 397 | * {@inheritdoc} |
|