コード例 #1
0
 public function register(Container $app)
 {
     if (empty($app['geshi'])) {
         $geshi = new GeshiServiceProvider();
         $geshi->register($app);
     }
     $app['highlighter'] = function () use($app) {
         return new CodeHighlighter($app);
     };
 }
コード例 #2
0
 public function register(Application $app)
 {
     if (empty($app['geshi'])) {
         $geshi = new GeshiServiceProvider();
         $geshi->register($app);
     }
     $app['highlighter'] = $app->share(function () use($app) {
         return new CodeHighlighter($app);
     });
 }