Register all standard parsers.

@return void
328174
protected function registerDefaultParsers()
    {
        $this->parsers = [
            new AutolinkParser(),
            new RawHTMLParser(),
            new CodeSpanParser(),
            new ImageParser(),
            new LinkParser(),
            new StrongEmphasisParser(),
            new EmphasisParser(),
            new LineBreakParser(),
            new TextParser(),
        ];
    }
1275974
protected function registerCommands()
    {
        if ($this->app->runningInConsole()) {
            $this->commands([
                ModulesCommand::class,
                ModelsCommand::class,
                EnumsCommand::class,
                RequestsCommand::class,
                MakeModuleCommand::class,
                VersionCommand::class
            ]);
        }
    }
1229347
def register_parser(self, type, parser, **meta):
        
        try:
            self.registered_formats[type]['parser'] = parser
        except KeyError:
            self.registered_formats[type] = {'parser': parser}
        if meta:
            self.register_meta(type, **meta)
433068
public function registerServiceProviders()
    {
        $this->register(new SilexProvider\HttpFragmentServiceProvider());
        $this->register(new SilexProvider\UrlGeneratorServiceProvider());
        $this->register(new SilexProvider\ServiceControllerServiceProvider());
        $this->register(new PhpillipProvider\InformatorServiceProvider());
        $this->register(new PhpillipProvider\PygmentsServiceProvider());
        $this->register(new PhpillipProvider\ParsedownServiceProvider());
        $this->register(new PhpillipProvider\DecoderServiceProvider());
        $this->register(new PhpillipProvider\ContentServiceProvider());
        $this->register(new PhpillipProvider\TwigServiceProvider());
        $this->register(new PhpillipProvider\SubscriberServiceProvider());
        $this->register(new PhpillipProvider\ContentControllerServiceProvider());
    }
659184
public function register()
    {
        if ($this->app->runningInConsole() === false) {
            return;
        }

        if ($this->isLumen() === false) {
            $this->publishes([
                __DIR__ . '/../config/localization-helpers.php' => config_path('localization-helpers.php'),
            ], 'config');
        }

        $this->commands([
            Commands\MissingCommand::class,
            Commands\ExportCommand::class,
            Commands\ImportCommand::class,
        ]);
    }
161552
public function registerHttpServiceProvider()
    {
        $this->registerRateLimiting();
        $this->registerHttpValidation();
        $this->registerHttpParsers();
        $this->registerResponseFactory();
        $this->registerMiddleware();
    }
861032
protected function registerCommands()
    {
        $this->commands([
            CheckForUpdate::class,
        ]);

        // Register custom commands from config
        collect(config('self-update.artisan_commands.pre_update'))->each(function ($command) {
            $this->commands([$command['class']]);
        });
        collect(config('self-update.artisan_commands.post_update'))->each(function ($command) {
            $this->commands([$command['class']]);
        });
    }
592552
protected function compileClasses()
	{
		$this->registerClassPreloaderCommand();

		$this->callSilent('compile', array(
			'--config' => implode(',', $this->getClassFiles()),
			'--output' => $this->laravel->getCachedCompilePath(),
			'--strip_comments' => 1,
		));
	}
154479
protected function registerDefaultParser()
    {
        $this->registerMediaTypeParser('application/json', function (string $input) {
            $result = json_decode($input, true);
            if (! is_array($result)) {
                return null;
            }

            return $result;
        }, null);
        $this->registerMediaTypeParser('application/xml', function (string $input) {
            $backup        = libxml_disable_entity_loader(true);
            $backup_errors = libxml_use_internal_errors(true);
            $result        = simplexml_load_string($input);
            libxml_disable_entity_loader($backup);
            libxml_clear_errors();
            libxml_use_internal_errors($backup_errors);
            if ($result === false) {
                return null;
            }

            return $result;
        }, null);
        $this->registerMediaTypeParser('text/xml', function (string $input) {
            $backup        = libxml_disable_entity_loader(true);
            $backup_errors = libxml_use_internal_errors(true);
            $result        = simplexml_load_string($input);
            libxml_disable_entity_loader($backup);
            libxml_clear_errors();
            libxml_use_internal_errors($backup_errors);
            if ($result === false) {
                return null;
            }

            return $result;
        }, null);
        $this->registerMediaTypeParser('application/x-www-form-urlencoded', function (string $input) {
            parse_str($input, $data);
            return $data;
        }, null);
    }
412863
private function registerCommands()
    {
        if ($this->app->runningInConsole()) {
            $this->commands([
                \Brotzka\TranslationManager\Module\Console\Commands\TranslationToDatabase::class,
                \Brotzka\TranslationManager\Module\Console\Commands\TranslationToFile::class
            ]);
        }
    }
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');
	}
139346
protected function registerCompiler()
    {
        $this->app->singleton('markdown.compiler', function (Container $app) {
            $markdown = $app['markdown'];
            $files = $app['files'];
            $storagePath = $app->config->get('view.compiled');

            return new MarkdownCompiler($markdown, $files, $storagePath);
        });

        $this->app->alias('markdown.compiler', MarkdownCompiler::class);
    }
1005036
protected function registerTwigParser()
    {
        /*
         * Register system Twig environment
         */
        App::singleton('twig.environment', function ($app) {
            $twig = new Twig_Environment(new TwigLoader, ['auto_reload' => true]);
            $twig->addExtension(new TwigExtension);
            return $twig;
        });

        /*
         * Register .htm extension for Twig views
         */
        App::make('view')->addExtension('htm', 'twig', function () {
            return new TwigEngine(App::make('twig.environment'));
        });
    }
114067
public function register()
    {
        $tokens = PHP_CodeSniffer_Tokens::$scopeOpeners;
        $tokens[] = T_OPEN_TAG;
        $tokens[] = T_WHITESPACE;
        $tokens[] = T_COMMENT;
        return $tokens;
    }
1226684
public function register()
    {
        $tokens = array();
        foreach ($this->deprecatedTypeCasts as $token => $versions) {
            $tokens[] = constant($token);
        }

        return $tokens;
    }
873554
protected function registerDefaultParsers()
    {
        $this->parsers = [
            new HTMLBlockParser(),
            new FencedCodeBlockParser(),
            new SetextHeaderParser(),
            new HorizontalRuleParser(),
            new AtxHeaderParser(),
            new BlockquoteParser(),
            new ListParser(),
            new CodeBlockParser(),
            new LinkReferenceParser($this->links, $this->titles),
            new ParagraphParser(),
        ];
    }
392507
public function register()
    {
        $this->registerTranslationManager();
        $this->setupRoutes($this->app->router);

        $this->app->singleton('langfile', function($app){ return new LangFiles($app['config']['app']['locale']); });

        // use this if your package has a config file
        // config([
        //         'config/translationmanager.php',
        // ]);
    }