Register aspects

@param array $aspects
497733
public function register(array $aspects)
    {
        $temp = \array_column($aspects, 'order');
        \array_multisort($temp, SORT_ASC, $aspects);
        $this->aspects = $aspects;
    }
530781
public function registerCoreComponents() {
        foreach ($this->coreComponents() as $id => $config) {
            $this->set($id, $config);
        }
    }
1055507
public function register($app)
    {
        $app['events']->listen(CacheHit::class, [$this, 'recordCacheHit']);
        $app['events']->listen(CacheMissed::class, [$this, 'recordCacheMissed']);

        $app['events']->listen(KeyWritten::class, [$this, 'recordKeyWritten']);
        $app['events']->listen(KeyForgotten::class, [$this, 'recordKeyForgotten']);
    }
213475
public static function register(array $directives)
    {
        collect($directives)->each(function ($item, $key) {
            Blade::directive($key, $item);
        });
    }
244252
public function init(array $options = [])
    {
        if ($this->wasInitialized) {
            return;
        }

        $this->options = $this->normalizeOptions($options);
        define('AOP_ROOT_DIR', $this->options['appDir']);
        define('AOP_CACHE_DIR', $this->options['cacheDir']);

        /** @var $container AspectContainer */
        $container = $this->container = new $this->options['containerClass'];
        $container->set('kernel', $this);
        $container->set('kernel.interceptFunctions', $this->hasFeature(Features::INTERCEPT_FUNCTIONS));
        $container->set('kernel.options', $this->options);

        SourceTransformingLoader::register();

        foreach ($this->registerTransformers() as $sourceTransformer) {
            SourceTransformingLoader::addTransformer($sourceTransformer);
        }

        // Register kernel resources in the container for debug mode
        if ($this->options['debug']) {
            $this->addKernelResourcesToContainer($container);
        }

        AopComposerLoader::init($this->options, $container);

        // Register all AOP configuration in the container
        $this->configureAop($container);

        $this->wasInitialized = true;
    }
538367
protected function registerCoreComponents()
    {
        $this->app->singleton(Component::CORE, $this->getCoreConfig('bindings.' . Component::CORE));
        $this->app->singleton(Component::AUTH, $this->getCoreConfig('bindings.' . Component::AUTH));
        $this->app->singleton(Component::MODULES, $this->getCoreConfig('bindings.' . Component::MODULES));
        $this->app->singleton(Component::CACHE, $this->getCoreConfig('bindings.' . Component::CACHE));
        $this->app->singleton(Component::API, $this->getCoreConfig('bindings.' . Component::API));
        $this->app->singleton(Component::MENU, $this->getCoreConfig('bindings.' . Component::MENU));
        $this->app->singleton(Component::ACL, $this->getCoreConfig('bindings.' . Component::ACL));
        $this->app->singleton(Component::NOTIFIER, $this->getCoreConfig('bindings.' . Component::NOTIFIER));
        $this->app->singleton(Component::ASSETS, $this->getCoreConfig('bindings.' . Component::ASSETS, AssetManager::class));

        $this->app->bind(CoreInterface::class, Component::CORE);
        $this->app->bind(AuthenticatorInterface::class, Component::AUTH);
        $this->app->bind(ModuleManagerInterface::class, Component::MODULES);
        $this->app->bind(CacheInterface::class, Component::CACHE);
        $this->app->bind(ApiCoreInterface::class, Component::API);
        $this->app->bind(MenuRepositoryInterface::class, Component::MENU);
        $this->app->bind(AclRepositoryInterface::class, Component::ACL);
        $this->app->bind(NotifierInterface::class, Component::NOTIFIER);
        $this->app->bind(AssetManagerInterface::class, Component::ASSETS);

        return $this;
    }
1223042
public static function register(array $permissions): void
    {
        $permissions = self::format($permissions);

        self::$permissions = array_merge(self::$permissions, $permissions);
    }
1014873
function register(array $options = array())
    {
        if ($this->alive()) {
            return $this->renew($options);
        } else {
            return $this->subscribe($options);
        }
    }
800237
public function register( $args = [ ] ) {
		foreach ( $this->getConfigKeys() as $slug ) {

			if ( $this->isReservedTerm( $slug ) ) {
				throw new ReservedTermException( $slug );
			}

			if ( static::DEFAULTS === $slug ) {
				continue;
			}

			$argsCollection = $this->prepareArguments( $slug, (array) $args );
			$this->doRegistration( $slug, $argsCollection );
		}
	}
467678
protected function registerTransformers(): array
    {
        $cacheManager     = $this->getContainer()->get('aspect.cache.path.manager');
        $filterInjector   = new FilterInjectorTransformer($this, SourceTransformingLoader::getId(), $cacheManager);
        $magicTransformer = new MagicConstantTransformer($this);

        $sourceTransformers = function () use ($filterInjector, $magicTransformer, $cacheManager) {
            $transformers = [];
            if ($this->hasFeature(Features::INTERCEPT_INITIALIZATIONS)) {
                $transformers[] = new ConstructorExecutionTransformer();
            }
            if ($this->hasFeature(Features::INTERCEPT_INCLUDES)) {
                $transformers[] = $filterInjector;
            }
            $transformers[]  = new SelfValueTransformer($this);
            $transformers[]  = new WeavingTransformer(
                $this,
                $this->container->get('aspect.advice_matcher'),
                $cacheManager,
                $this->container->get('aspect.cached.loader')
            );
            $transformers[] = $magicTransformer;

            return $transformers;
        };

        return [
            new CachingTransformer($this, $sourceTransformers, $cacheManager)
        ];
    }
1331715
public function boot()
    {
        /** @var AspectContainer $aspectContainer */
        $aspectContainer = $this->app->make(AspectContainer::class);

        // Let's collect all aspects and just register them in the container
        $aspects = $this->app->tagged('goaop.aspect');
        foreach ($aspects as $aspect) {
            $aspectContainer->registerAspect($aspect);
        }
    }
475962
protected function registerSingletons()
    {
        foreach ($this->singletons as $concrete => $abstracts) {
            if (!is_array($abstracts)) {
                $this->app->singleton($abstracts, $concrete);
                continue;
            }

            $first = array_shift($abstracts);

            $this->app->singleton($first, $concrete);

            foreach ($abstracts as $abstract) {
                $this->app->alias($first, $abstract);
            }
        }
    }
373167
private function loadAndRegisterAspects(array $unloadedAspects): void
    {
        foreach ($unloadedAspects as $unloadedAspect) {
            $this->aspectLoader->loadAndRegister($unloadedAspect);
        }
    }
774117
public function register()
    {
        $this->publishes([$this->configPath() => config_path('go_aop.php')]);
        $this->mergeConfigFrom($this->configPath(), 'go_aop');

        $this->app->singleton(AspectKernel::class, function () {
            $aspectKernel = AspectLaravelKernel::getInstance();
            $aspectKernel->init(config('go_aop'));

            return $aspectKernel;
        });

        $this->app->singleton(AspectContainer::class, function ($app) {
            /** @var AspectKernel $kernel */
            $kernel = $app->make(AspectKernel::class);

            return $kernel->getContainer();
        });
    }
252357
protected function registerAssets($files)
    {
        foreach ($files as $type => $_files) {
            if ($type == 'script') {
                foreach ($_files as $file) {
                    $this->view->registerJsFile($this->assetUrl . $file);
                }
            } else {
                foreach ($_files as $file) {
                    $this->view->registerCssFile($this->assetUrl . $file);
                }
            }
        }
    }
369679
protected function registerServerEvents(array $events): void
    {
        $eventInfo = [];

        // register event to swoole
        foreach ($events as $name => $cb) {
            // is a Closure callback, add by self::onSwoole()
            if (\is_object($cb) && \method_exists($cb, '__invoke')) {
                $eventInfo[] = [$name, \get_class($cb)];
                $this->server->on($name, $cb);
                continue;
            }

            if (\is_string($cb)) {
                if (\is_int($name)) {
                    $name = $cb;
                }

                $method = SwooleEvent::getHandler($cb);
                if ($method && \method_exists($this, $method)) {
                    $eventInfo[] = [$name, static::class . "->$method"];
                    $this->server->on($name, [$this, $method]);
                } elseif (\function_exists($cb)) {
                    $eventInfo[] = [$name, $cb];
                    $this->server->on($name, $cb);
                }
            }
        }

        Show::table($eventInfo, 'Registered events to the server', [
            'showBorder' => 0,
            'columns'    => ['event name', 'swoole event handler']
        ]);
    }
1144340
public function registerSections(array $sections)
    {
        foreach ($sections as $model => $section) {
            if (class_exists($section)) {
                $this->register(new $section($this->app, $model));
            } else {
                $this->missedSections[$model] = $section;
            }
        }

        return $this;
    }