1 | <?php |
||
21 | class BladeServiceProvider extends ServiceProvider |
||
22 | { |
||
23 | /** |
||
24 | * @var array |
||
25 | */ |
||
26 | protected $replacements = [ |
||
27 | 'macro' => "<?php \$___tiny['%s']=function(%s)use(\$__env){ ob_start(); ?>\n", |
||
28 | 'usemacro' => "<?php echo \$___tiny['%s'](%s); ?>\n", |
||
29 | ]; |
||
30 | |||
31 | /** |
||
32 | * Bootstrap any application services. |
||
33 | */ |
||
34 | public function boot() |
||
38 | |||
39 | /** |
||
40 | * Callback method for macro directive. |
||
41 | * |
||
42 | * @param string $name |
||
43 | * @param string $expression |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | protected function directive($name, $expression) |
||
53 | |||
54 | /** |
||
55 | * Return arguments and name from blade expression. |
||
56 | * |
||
57 | * @param $expression |
||
58 | * |
||
59 | * @return array |
||
60 | */ |
||
61 | protected function extractArgumentsAndName($expression) |
||
76 | |||
77 | /** |
||
78 | * Register any application services. |
||
79 | * |
||
80 | * This service provider is a great spot to register your various container |
||
81 | * bindings with the application. As you can see, we are registering our |
||
82 | * "Registrar" implementation here. You can add your own bindings too! |
||
83 | */ |
||
84 | public function register() |
||
87 | } |
||
88 |