Register the Package Service Provider.

@param array $properties

@return void

@throws \Nova\Packages\FileMissingException
515025
protected function registerServiceProvider($properties)
    {
        $namespace = $this->resolveNamespace($properties);

        $name = Str::studly(
            isset($properties['type']) ? $properties['type'] : 'package'
        );

        // The main service provider from a package should be named like:
        // AcmeCorp\Pages\Providers\PackageServiceProvider

        $provider = "{$namespace}\\Providers\\{$name}ServiceProvider";

        if (! class_exists($provider)) {
            // We will try to find the alternate service provider, named like:
            // AcmeCorp\Pages\PageServiceProvider

            $name = Str::singular(
                $properties['basename']
            );

            if (! class_exists($provider = "{$namespace}\\{$name}ServiceProvider")) {
                return;
            }
        }

        $this->app->register($provider);
    }
1062236
public function setIdentification($properties)
    {
        $this->reset($properties);

        if (!empty($this->model)) {
            $this->generic = false;
        }
        
        $this->identified |= Constants\Id::MATCH_UA;
    }
745697
public function register( $args = [ ] ) {
		foreach ( $this->getConfigKeys() as $contentType ) {
			$this->registerContentType(
				$contentType,
				$this->config->getSubConfig( $contentType )
			);
		}
	}
1235630
public function registerProviders(string $filePath = null)
    {
        is_file($filePath) || $filePath = App::getBasePath() . $filePath;

        if (is_file($filePath)) {
            /** @noinspection PhpIncludeInspection */
            $providers = require_once $filePath;

            $providers = is_array($providers) ? $providers : [];

            IOC::addProviders($providers);

            Event::dispatch('minimal.loaded.providers', [$filePath, $providers]);
        }
    }
1097835
protected function registerServices()
    {
        foreach ($this->serviceBindings as $key => $value) {
            is_numeric($key)
                    ? $this->app->singleton($value)
                    : $this->app->singleton($key, $value);
        }
    }
1278399
public function register($settings)
    {
        if (!$this->enabled) {
            return;
        }

        if ($this->buffersize === 0 || $this->buffersize === 1) {
            $this->write($settings);

            return;
        }

        $settings = $this->parseSettings($settings);

        $payload = $this->getPayload($settings);

        $this->buffer[] = $payload;

        ++$this->buffercount;

        if ($this->buffersize !== -1 && $this->buffercount >= $this->buffersize) {
            $this->flush();
        }
    }
412697
public function registerAssetBundle()
    {
        if (isset($this->clientOptions['plugins']) && in_array('drag_drop', $this->clientOptions['plugins'])) {
            JuiAsset::register($this->getView());
        }
        MicroPluginAsset::register($this->getView());
        SifterAsset::register($this->getView());
        SelectizeAsset::register($this->getView());
    }
771333
public function registerServices($services)
	{
	    
	    if (!is_array($services) && !($services instanceof Traversable)) {
	        throw new Exception\InvalidArgumentException(sprintf(
                'Expected an array or Traversable; received "%s"',
                (is_object($services) ? get_class($services) : gettype($services))
	        ));
	    }
	    
		foreach($services as $key => $impl){
		    
		    if (is_string($impl)) {
		        $impl = ['name' => $impl];
		    }
		    
			$id 		= isset($impl['id']) ? $impl['id'] : $key;
			$name 	    = isset($impl['name']) ? $impl['name'] : null;
			$service 	= isset($impl['service']) ? $impl['service'] : null;
			$factory 	= isset($impl['factory']) ? $impl['factory'] : null;
			$options 	= isset($impl['options']) ? $impl['options'] : null;
			$priority 	= isset($impl['priority']) ? $impl['priority'] : 1;
			
			if (!$service && isset($impl['class'])) {
			    $service = $impl['class'];
			}

			if(is_null($options) && isset($impl['config'])){
			    $options = $impl['config'];
			}
			
			if(!$name){
				throw new Exception\InvalidArgumentException('Service name is not defined for service: '.$id);
			}
			
			$this->registerService($id, $name, $service, $options, $priority);
			
			if (array_key_exists('enabled', $impl) && !$impl['enabled']) {
			    $this->disableService($id);
			}
			
			if($factory){
			    $this->getServicePluginManager()->setFactory(
		            $id, $factory);
			}
		}
		
		return $this;
	}
687356
protected function registerProviders()
    {
        $providers = $this->def('provider');

        if ($providers)
        {
            if (is_array($providers))
            {
                foreach ($providers as $provider)
                {
                    $this->app->register($instance = new $provider($this->app));
                }
            }
            else
            {
                $this->app->register($instence = new $providers($this->app));
            }
        }
    }
1124313
public function register()
    {
        $this->app->bindShared('packages', function ($app)
        {
            $repository = new Repository($app['config'], $app['files']);

            return new PackageManager($app, $repository);
        });
    }
150601
public function setProperties(array $properties)
    {
        foreach ($properties as $property => $value) {
            $method = sprintf('set%s', str_replace('_', '', $property));

            if (!method_exists($this, $method)) {
                 throw SchemaException::invalidColumnProperty($this->getName(), $property);
            }

            $this->$method($value);
        }
    }
61531
public function configure(array $properties)
    {
        foreach ($properties as $name => $value) {
            $methodName = 'set' . ucfirst(strtolower($name));
            if (method_exists($this, $methodName)) {
                $this->$methodName($value);
            }
        }
    }
882415
public static function register(Package $package, ...$bootload): void {
        $pid = $package->pid();

        if (!$pid) {
            throw new \RuntimeException("package id of ".
                get_class($package)." can not be null");
        }
        if (self::instance()->has($pid)) {
            throw new \RuntimeException(get_class($package).
                " class package id $pid is conflicted");
        }
        self::instance()->set($pid, $package);

        self::$_bootloads[$pid] = $bootload;
    }
847962
protected function registerProviders(Collection $providers)
    {
        // loop through providers to be registered.
        $providers->each(function ($providerClass) {
            // register a provider class.
            $this->app->register($providerClass);
        });
    }
934392
protected function registerProviders(): void
    {
        foreach ($this->providers as $provider) {
            $this->app->register($provider);
        }
    }
852714
private function registerConfigs()
    {
        foreach ($this->files as $config) {
            $params = array();

            if ($config['_params'] != null) {
                if (isset($this->app[$config['_params']])) {
                    $params = $this->app[$config['_params']];
                }
            }

            $this->app->register(new ConfigServiceProvider($config['file'], $params));
        }

        unset($this->app['_params']);
        unset($this->app['_priority']);
    }
197789
protected function register(array $options)
    {
        foreach ($options as $option => $argument) {
            if (is_bool($argument)) {
                add_theme_support($option);

                continue;
            }

            add_theme_support($option, $argument);
        }
    }