Register Post Adapter.

@return void
182929
protected function registerPostAdapter()
    {
        $this->app->bind('adapter.post', function ($app) {
            return new Post($app['config']);
        });

        $this->app->alias('adapter.post', Post::class);
    }
953283
public function register()
    {
        $this->app->singleton('viewResolver', function ($app) {
            return $app->make(View::class);
        });

        if (checkDebugbar()) {
            $debugbar = $this->app['debugbar'];

            if ($debugbar->shouldCollect('auto_views')) {
                $debugbar->addCollector(new AutoViewCollector());
            }
        }
    }
102192
public function registerViewComposerData()
    {
        View::composer('avored-ecommerce::layouts.left-nav', AdminNavComposer::class);
        View::composer('avored-ecommerce::site-currency._fields', SiteCurrencyFieldsComposer::class);
        View::composer(['avored-ecommerce::category._fields'], CategoryFieldsComposer::class);
        View::composer(['avored-ecommerce::admin-user._fields'], AdminUserFieldsComposer::class);
        View::composer(['avored-ecommerce::product.create',
                        'avored-ecommerce::product.edit',
                        ], ProductFieldsComposer::class);
    }
1101086
public function register()
    {
        // The system resource manager is used to resolve various system resource types.
        // It also implements the resolver interface which may be used by other components adding system resource types.
        $this->app->singleton('df.system.resource', function ($app) {
            return new SystemResourceManager($app);
        });

        $this->app->resolving('df.service', function (ServiceManager $df) {
            // Add the system service
            $df->addType(new ServiceType([
                    'name'              => 'system',
                    'label'             => 'System Management',
                    'description'       => 'Service supporting management of the system.',
                    'group'             => ServiceTypeGroups::SYSTEM,
                    'singleton'         => true,
                    'config_handler'    => Config::class,
                    'factory'           => function ($config) {
                        return new System($config);
                    },
                    'access_exceptions' => [
                        [
                            'verb_mask' => 31, //Allow all verbs
                            'resource'  => 'admin/session',
                        ],
                        [
                            'verb_mask' => 2, //Allow POST only
                            'resource'  => 'admin/password',
                        ],
                        [
                            'verb_mask' => 1,
                            'resource'  => 'environment',
                        ]
                    ],
                ]
            ));
        });
    }
1004984
protected function registerHipSupport()
    {
        $hipsupport = $this->initHipSupport();
        $this->app['hipsupport'] = $this->app->share(
            function ($app) use ($hipsupport) {
                return $hipsupport;
            }
        );
    }
781259
public function registerEmbedHandlerForExport() {
		wp_embed_register_handler(
			self::EMBED_ID,
			self::EMBED_URL_REGEX,
			function ( $matches, $attr, $url, $rawattr ) {
				global $id; // This is the Post ID, [@see WP_Query::setup_postdata, ...]
				$embed = $this->blade->render(
					'interactive.shared', [
						'title' => get_the_title( $id ),
						'url' => wp_get_shortlink( $id ),
					]
				);
				return apply_filters( 'embed_' . self::EMBED_ID, $embed, $matches, $attr, $url, $rawattr );
			}
		);
	}
741003
protected function registerConverter()
    {
        $this->app->singleton('converter', function ($app) {
            $measurements = $app['config']->get('cartalyst.converter.measurements');

            $converter = new Converter($app['converter.exchanger']);
            $converter->setMeasurements($measurements);

            return $converter;
        });
    }
1324535
public function register()
    {
        /** @var Settings $settings */
        $settings = $this->app->make(Settings::class);

        $this->instantiateUploadAdapters($this->app);

        if ($settings->get('overrideAvatarUpload')) {
            // .. todo
        }
    }
1016355
protected function registerAttachment()
	{
		$this->app->bind('Attachment', function($app, $params)
        {
			$config = $app->make('Config', array('name' => $params['name'], 'options' => $params['options']));
			$interpolator = $app->make('Interpolator');
			$imageProcessor = $app->make($params['options']['image_processing_library']);
			$resizer = $app->make('Resizer', array('imageProcessor' => $imageProcessor));
			$IOWrapper = $app->make('IOWrapper');

            $attachment = new Attachment($config, $interpolator, $resizer, $IOWrapper);
            
            $storageDriver = $app->make($params['options']['storage'], array('attachment' => $attachment));
            $attachment->setStorageDriver($storageDriver);

            return $attachment;
        });
	}
1179336
public function register()
    {
        $this->registerBindings();
        $this->app['events']->listen(BuildingSidebar::class, RegisterCartSidebar::class);

        $this->app['events']->listen(LoadingBackendTranslations::class, function (LoadingBackendTranslations $event) {
            $event->load('cartitems', array_dot(trans('cart::cartitems')));
            // append translations
        });
    }
230676
public function register()
    {
        $this->registerLoader();

        $this->app->singleton('translator', function ($app) {

            $loader = $app['translation.loader'];

            // When registering the translator component, we'll need to set the default
            // locale as well as the fallback locale.
            $locale = TransHelper::getLanguage();

            $trans = new \Netcore\Translator\Translator($loader, $locale);

            $trans->setFallback($app['config']['app.fallback_locale']);

            return $trans;
        });

        // Views
        $viewNamespace = 'translations';
        $this->loadViewsFrom(__DIR__.'/views', $viewNamespace);

        // Default config
        $this->mergeConfigFrom(
            __DIR__.'/config/translations.php',
            'translations'
        );

        // Publish config to override defaults
        $this->publishes([
            __DIR__.'/config/translations.php' => config_path('translations.php'),
        ], 'config');

        // Migrations
        $this->loadMigrationsFrom(__DIR__.'/migrations');

        // View composers
        view()->composer($viewNamespace.'::*', function(View $view) use ($viewNamespace) {
            $view->with(compact('viewNamespace'));
        });

        view()->composer($viewNamespace.'::languages.*', function(View $view) {
            $uiTranslations = config('translations.ui_translations.languages', []);
            $view->with(compact('uiTranslations'));
        });

        view()->composer($viewNamespace.'::translations.*', function(View $view) {
            $uiTranslations = config('translations.ui_translations.translations', []);
            $view->with(compact('uiTranslations'));
        });

        view()->composer($viewNamespace.'::partials.*', function(View $view) {
            $uiTranslations = config('translations.ui_translations.partials', []);
            $view->with(compact('uiTranslations'));
        });

        // Commands
        $this->commands([
            DownloadTranslations::class
        ]);

        Blade::directive('lg', function ($expression) {
            return "<?php echo lg($expression); ?>";
        });

        // Global helpers
        require_once __DIR__ . '/Helpers/Global.php';
    }
702931
public function register()
    {
        $this->registerAdapterPlugger();

        $this->registerPostAdapter();
        $this->registerTermAdapter();
        $this->registerUserAdapter();
        $this->registerMenuAdapter();
        $this->registerCommentAdapter();
    }
461471
public function register()
    {
        $this->app->afterResolving(TransportManager::class, function(TransportManager $manager) {
            $this->extendTransportManager($manager);
        });
    }
938674
public function register()
    {
        $uploadAdapter = function (Container $app) {
            return $this->instantiateUploadAdapter($app);
        };

        $this->app->when(UploadImageHandler::class)
            ->needs(UploadAdapterContract::class)
            ->give($uploadAdapter);
    }
513217
protected function registerSupports()
    {
        do_action("before_theme_add_supports");

        foreach ($this->getConfig("supports") as $feature => $enabled):
            if (!$enabled):
                continue;
            endif;
            add_theme_support($feature);
        endforeach;

        do_action("after_theme_add_supports");
    }
331426
public function register()
    {
        $this->loadViewsFrom(__DIR__.'/../../resources/views', 'sigesui');
        $this->publishes([
            __DIR__.'/../../public' => public_path(),
        ], 'sigespublic');
        $this->publishes([
            __DIR__.'/../../resources/views' => base_path('resources/views/vendor/sigesui'),
        ], 'sigesviews');
    }
1026321
protected function registerBindings()
    {
        // TODO: Change to bind the implementation to the interface instead.
        $this->app->bind(CorsService::class, function () {
            return new CorsService(config(self::CONFIG_KEY));
        });

        $this->app->alias(CorsService::class, CorsServiceContract::class);
    }