Register blade extensions
197084
protected function registerBladeExtensions()
    {
        // Potion asset url
        \Blade::extend(function($view, $compiler)
        {
            $pattern = $this->createBladeMatcher('potion_asset_url');
            return preg_replace($pattern, '$1<?php echo(\ClassyGeeks\Potion\BladeHelpers::assetUrl$2); ?>', $view);
        });

        // Potion Css
        \Blade::extend(function($view, $compiler)
        {
            $pattern = $this->createBladeMatcher('potion_asset_css');
            return preg_replace($pattern, '$1<?php echo(\ClassyGeeks\Potion\BladeHelpers::assetCss$2); ?>', $view);
        });

        // Potion Js
        \Blade::extend(function($view, $compiler)
        {
            $pattern = $this->createBladeMatcher('potion_asset_js');
            return preg_replace($pattern, '$1<?php echo(\ClassyGeeks\Potion\BladeHelpers::assetJs$2); ?>', $view);
        });

        // Potion Img
        \Blade::extend(function($view, $compiler)
        {
            $pattern = $this->createBladeMatcher('potion_asset_img');
            return preg_replace($pattern, '$1<?php echo(\ClassyGeeks\Potion\BladeHelpers::assetImg$2); ?>', $view);
        });
    }
629064
protected function enableBladeMarkdownEngine()
    {
        $app = $this->app;

        $app->view->getEngineResolver()->register('blademd', function () use ($app) {
            $compiler = $app['blade.compiler'];
            $markdown = $app['markdown'];

            return new BladeMarkdownEngine($compiler, $markdown);
        });

        $app->view->addExtension('md.blade.php', 'blademd');
    }
644958
protected function registerExtensions()
    {
        $validator = $this->getValidator();

        foreach ($this->extensions as &$extension) {
            $validator->extend($extension->name(), function ($attribute, $value) use (&$extension) {
                return (bool) $extension->passes($attribute, $value);
            }, $extension->message());
        }
    }
463164
private function registerBladeExtensions()
    {
        Blade::directive('repeater', function ($expression = []) {
            return "<?php echo \RenderEngine::renderRepeater({$expression}); ?>";
        });

        Blade::directive('field', function ($expression = []) {
            return "<?php echo \RenderEngine::renderField({$expression}); ?>";
        });

        Blade::directive('render', function ($expression = []) {
            return "<?php echo \RenderEngine::render({$expression}); ?>";
        });
    }
1342710
protected function registerOptions()
    {
        $this->app->bindIf('twig.extension', function () {
            return $this->app['config']->get('twigbridge.twig.extension');
        });

        $this->app->bindIf('twig.options', function () {
            $options = $this->app['config']->get('twigbridge.twig.environment', []);

            // Check whether we have the cache path set
            if (!isset($options['cache']) || is_null($options['cache'])) {
                // No cache path set for Twig, lets set to the Laravel views storage folder
                $options['cache'] = storage_path('framework/views/twig');
            }

            return $options;
        });

        $this->app->bindIf('twig.extensions', function () {
            $load = $this->app['config']->get('twigbridge.extensions.enabled', []);

            // Is debug enabled?
            // If so enable debug extension
            $options = $this->app['twig.options'];
            $isDebug = (bool) (isset($options['debug'])) ? $options['debug'] : false;

            if ($isDebug) {
                array_unshift($load, DebugExtension::class);
            }

            return $load;
        });

        $this->app->bindIf('twig.lexer', function () {
            return null;
        });
    }
630814
public function registerBladeStringEngine($resolver) {
        $app = $this->app;

        // The Compiler engine requires an instance of the CompilerInterface, which in
        // this case will be the Blade compiler, so we'll first create the compiler
        // instance to pass into the engine so it can compile the views properly.

        $app->singleton('blade.string.compiler', function ($app) {
            $cache = $app['config']['view.compiled'];

            return new BladeStringCompiler($app['files'], $app['blade.compiler'], $cache);
        });

        $resolver->register('blade.string', function () use ($app) {
            return new CompilerEngine($app['blade.string.compiler'], $app['files']);
        });
    }
58627
public function registerMacros()
    {
        $pageKeyword = $this->pageKeyword;
        $router = $this->router;

        $router->macro('paginate', function ($uri, $action) use ($pageKeyword, $router) {
            $route = null;

            $router->group(
                ['middleware' => 'Spatie\PaginateRoute\SetPageMiddleware'],
                function () use ($pageKeyword, $router, $uri, $action, &$route) {
                    $route = $router->get($uri.'/{pageQuery?}', $action)->where('pageQuery', $pageKeyword.'/[0-9]+');
                });

            return $route;
        });
    }
106375
protected function registerExtensions()
    {
        // Bind extension manager as singleton,
        // so user can call it and add own extensions
        $this->app->singleton(ExtensionManager::class, function ($app) {
            $manager = new ExtensionManager($app);

            // Register the extensions
            foreach ($this->app->make('config')->get('doctrine.extensions', []) as $extension) {
                if (!class_exists($extension)) {
                    throw new ExtensionNotFound("Extension {$extension} not found");
                }

                $manager->register($extension);
            }

            return $manager;
        });
    }
294437
public function registerExtensions()
    {
        // register extensions
        $extensions = $this->servicesByTag('Smarty.Extension', SmartyExtensionInterface::class);

        /**
         * @var $e SmartyExtensionInterface
         */
        if (count($extensions) > 0) {
            $methods = get_class_methods(SmartyExtensionInterface::class);
            foreach ($extensions as $e) {
                foreach ($methods as $m) {
                    if ($m != 'getName') {
                        $plugins = $e->{$m}();
                        foreach ($plugins as $p) {
                            $this->registerPlugin($p);
                        }
                    }
                }
            }
        }
    }
448423
public function register()
    {

        // include the package config
        $this->mergeConfigFrom(
            __DIR__.'/../config/blade.php', 'blade'
        );

        // load the alias (handled by the Laravel autoloader)
        //$this->app->alias('StringBlade', 'Wpb\String_Blade_Compiler\Facades\StringBlade');

        $this->registerEngineResolver();

        $this->registerViewFinder();

        $this->registerFactory();
    }
333280
public function register()
    {
        $app = $this->app;
        $resolver = $app['view.engine.resolver'];
        
        $app->singleton('inky.compiler', function ($app) {
            $cache = $app['config']['view.compiled'];
            
            return new InkyCompiler($app['blade.compiler'], $app['files'], $cache);
        });

        $resolver->register('inky', function () use ($app) {
            return new InkyCompilerEngine($app['inky.compiler'], $app['files']);
        });
    }
1275717
public function registering()
    {
        require_once 'helpers/helpers.php';

        $this->app->singleton(self::PROVIDES_STRING_COMPILER, function (Application $app) {
            return new StringCompiler($app->make('files'), storage_path('views'));
        });

        $this->app->singleton(self::PROVIDES_SERVICE, function (Application $app) {

            $compiler = new BladedCompiler(
                $app->make('blade.compiler'),
                $app,
                'Bladed::getCommand',
                self::PROVIDES_SERVICE
            );

            return new BladedManager($compiler, $app, $app->make(self::PROVIDES_STRING_COMPILER));
        });

        $this->app->singleton(IBladedManager::class, function (Application $app) {
            return $app->make(self::PROVIDES_SERVICE);
        });
    }
891803
public function registerHamlBladeCompiler() {

		// Add resolver
		$this->app['view.engine.resolver']->register('haml.blade', function() {
			return new CompilerEngine($this->app['Bkwld\LaravelHaml\HamlBladeCompiler']);
		});

		// Add extensions
		$this->app['view']->addExtension('haml.blade', 'haml.blade');
		$this->app['view']->addExtension('haml.blade.php', 'haml.blade');
	}
897581
private void registerExtensions() {
    Iterator<Cache2kExtensionProvider> it =
      ServiceLoader.load(Cache2kExtensionProvider.class, CacheManager.class.getClassLoader()).iterator();
    while (it.hasNext()) {
      try {
        it.next().registerCache2kExtension();
      } catch (ServiceConfigurationError ex) {
        Log.getLog(CacheManager.class.getName()).debug("Error loading cache2k extension", ex);
      }
    }
  }
754433
private function registerAliases()
    {
        $aliasLoader = AliasLoader::getInstance();
//        $aliasLoader->alias( 'TranslationCache', \Waavi\Translation\Facades\TranslationCache::class );
        $aliasLoader->alias( 'Activation', \Cartalyst\Sentinel\Laravel\Facades\Activation::class );
        $aliasLoader->alias( 'Reminder', \Cartalyst\Sentinel\Laravel\Facades\Reminder::class );
        $aliasLoader->alias( 'Sentinel', \Cartalyst\Sentinel\Laravel\Facades\Sentinel::class );
        $aliasLoader->alias( 'GlideImage', \Roboc\Glide\Support\Facades\GlideImage::class );
        $aliasLoader->alias( 'Excel', \Maatwebsite\Excel\Facades\Excel::class );
    }
457948
private function registerBladeDirectives()
    {
        /** @var  \Illuminate\View\Compilers\BladeCompiler  $blade */
        $blade = $this->app['view']->getEngineResolver()->resolve('blade')->getCompiler();

        $blade->directive('parsedown', function ($markdown) {
            return "<?php echo markdown()->parse($markdown); ?>";
        });

        $blade->directive('markdown', function () {
            return '<?php markdown()->begin(); ?>';
        });

        $blade->directive('endmarkdown', function () {
            return '<?php echo markdown()->end(); ?>';
        });
    }
39181
protected function installRegisterExt()
	{
		
		$this->log('d', 'Registering extension '.$this->extension->getId());
		common_ext_ExtensionsManager::singleton()->registerExtension($this->extension);
		common_ext_ExtensionsManager::singleton()->setEnabled($this->extension->getId());
		
		
	}