| @@ 78-92 (lines=15) @@ | ||
| 75 | * shortcode. |
|
| 76 | * @throws RuntimeException If the config could not be processed. |
|
| 77 | */ |
|
| 78 | public function __construct( |
|
| 79 | $shortcode_tag, |
|
| 80 | ConfigInterface $config, |
|
| 81 | ShortcodeAttsParserInterface $atts_parser, |
|
| 82 | DependencyManagerInterface $dependencies |
|
| 83 | ) {
|
|
| 84 | ||
| 85 | Assert\that( $shortcode_tag )->string()->notEmpty(); |
|
| 86 | ||
| 87 | $this->processConfig( $config ); |
|
| 88 | ||
| 89 | $this->shortcode_tag = $shortcode_tag; |
|
| 90 | $this->atts_parser = $atts_parser; |
|
| 91 | $this->dependencies = $dependencies; |
|
| 92 | } |
|
| 93 | ||
| 94 | /** |
|
| 95 | * Register the shortcode handler function with WordPress. |
|
| @@ 61-72 (lines=12) @@ | ||
| 58 | * to be enqueued. |
|
| 59 | * @throws RuntimeException If the config could not be processed. |
|
| 60 | */ |
|
| 61 | public function __construct( |
|
| 62 | $shortcode_tag, |
|
| 63 | ConfigInterface $config, |
|
| 64 | DependencyManagerInterface $dependencies |
|
| 65 | ) { |
|
| 66 | Assert\that( $shortcode_tag )->string()->notEmpty(); |
|
| 67 | ||
| 68 | $this->processConfig( $config ); |
|
| 69 | ||
| 70 | $this->shortcode_tag = $shortcode_tag; |
|
| 71 | $this->dependencies = $dependencies; |
|
| 72 | } |
|
| 73 | ||
| 74 | /** |
|
| 75 | * Register the shortcode UI handler function with WordPress. |
|