| @@ 666-681 (lines=16) @@ | ||
| 663 | * |
|
| 664 | * @return array |
|
| 665 | */ |
|
| 666 | static public function synthesize_markups_config(array $fragments) |
|
| 667 | { |
|
| 668 | $markups = []; |
|
| 669 | ||
| 670 | foreach ($fragments as $path => $fragment) |
|
| 671 | { |
|
| 672 | if (empty($fragment['patron.markups'])) |
|
| 673 | { |
|
| 674 | continue; |
|
| 675 | } |
|
| 676 | ||
| 677 | $markups = array_merge($markups, $fragment['patron.markups']); |
|
| 678 | } |
|
| 679 | ||
| 680 | return $markups; |
|
| 681 | } |
|
| 682 | ||
| 683 | /** |
|
| 684 | * Synthesizes the "patron.functions" config. |
|
| @@ 690-705 (lines=16) @@ | ||
| 687 | * |
|
| 688 | * @return array |
|
| 689 | */ |
|
| 690 | static public function synthesize_functions_config(array $fragments) |
|
| 691 | { |
|
| 692 | $functions = []; |
|
| 693 | ||
| 694 | foreach ($fragments as $path => $fragment) |
|
| 695 | { |
|
| 696 | if (empty($fragment['patron.functions'])) |
|
| 697 | { |
|
| 698 | continue; |
|
| 699 | } |
|
| 700 | ||
| 701 | $functions = array_merge($functions, $fragment['patron.functions']); |
|
| 702 | } |
|
| 703 | ||
| 704 | return $functions; |
|
| 705 | } |
|
| 706 | ||
| 707 | /** |
|
| 708 | * Attaches event hooks to `MarkupCollection::alter` and `FunctionCollection::alter` in order |
|