| Total Complexity | 4 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class Block extends Tag |
||
| 6 | { |
||
| 7 | public function __construct() |
||
| 8 | { |
||
| 9 | $this->content(); |
||
| 10 | $this->default(); |
||
| 11 | } |
||
| 12 | |||
| 13 | private function content() |
||
| 14 | { |
||
| 15 | foreach (Tag::$blocks as $blockName => $blockContent) { |
||
| 16 | |||
| 17 | $search = "/@(\s?)+block(\s?)+{$blockName}.*?@(\s?)+endblock/is"; |
||
| 18 | |||
| 19 | Tag::match($search, function() use ($blockContent) { |
||
| 20 | Tag::replace($blockContent); |
||
| 21 | $this->content(); |
||
| 22 | }); |
||
| 23 | } |
||
| 24 | } |
||
| 25 | |||
| 26 | private function default() |
||
| 33 | }); |
||
| 34 | } |
||
| 35 | } |
||
| 36 |