General method to register advices
430663
private function registerAdviceInContainer(string $pointcutExpression, Advice $adviceToInvoke): void
    {
        $this->container->registerAdvisor(
            new LazyPointcutAdvisor($this->container, $pointcutExpression, $adviceToInvoke),
            $this->getPointcutId($pointcutExpression)
        );
    }
517287
def register():
    
    try:
        signals.article_generator_init.connect(feed_parser_initialization)
        signals.article_generator_context.connect(fetch_github_activity)
    except ImportError:
        logger.warning('`github_activity` failed to load dependency `feedparser`.'
                       '`github_activity` plugin not loaded.')
696593
def register_from_data(cls, key, format, data):
        """"""

        if key in cls._stock:
            logger.info('Warning, replacing resource ' + str(key))
        cls._stock[key] = {'type': 'data', 'data': data, 'format': format }
        logger.info('%s registered as %s' % ('data', key))
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());
        }
    }
209665
def register(linter):
    """"""
    linter.register_checker(NewDbFieldWithDefaultChecker(linter))
    if not compat.LOAD_CONFIGURATION_SUPPORTED:
        load_configuration(linter)
544770
def register(self, ModelClass, form_field=None, widget=None, title=None, prefix=None, has_id_value=True):
        
        if any(urltype.model == ModelClass for urltype in self._url_types):
            raise ValueError("Model is already registered: '{0}'".format(ModelClass))

        opts = ModelClass._meta
        opts = opts.concrete_model._meta

        if not prefix:
            # Store something descriptive, easier to lookup from raw database content.
            prefix = '{0}.{1}'.format(opts.app_label, opts.object_name.lower())
        if not title:
            title = ModelClass._meta.verbose_name

        if self.is_external_url_prefix(prefix):
            raise ValueError("Invalid prefix value: '{0}'.".format(prefix))
        if self[prefix] is not None:
            raise ValueError("Prefix is already registered: '{0}'".format(prefix))
        if form_field is not None and widget is not None:
            raise ValueError("Provide either a form_field or widget; use the widget parameter of the form field instead.")

        urltype = UrlType(ModelClass, form_field, widget, title, prefix, has_id_value)
        signals.post_save.connect(_on_model_save, sender=ModelClass)
        self._url_types.append(urltype)
        return urltype
948148
def register(cls, key, filename):
        """"""

        if key in cls._stock:
            logger.info('Warning, replacing resource ' + str(key))
        cls._stock[key] = {'type': 'custom', 'filename': filename}
        logger.info('%s registered as %s' % (filename, key))
62279
public function registerDefaultHelpers()
    {
        $this->helpers->registerHelper('question', 'Danzabar\CLI\Tasks\Helpers\Question');
        $this->helpers->registerHelper('confirm', 'Danzabar\CLI\Tasks\Helpers\Confirmation');
        $this->helpers->registerHelper('table', 'Danzabar\CLI\Tasks\Helpers\Table');
    }
199234
public static function register_elements() {
		foreach ( self::$_elements as $element => $locations ) {
			$class = self::get_element_class_name( $element );

			if ( method_exists( $class, 'init' ) ) {
				call_user_func( [ $class, 'init' ], $locations );
			}
		}
	}
1351388
def register(self, job):
        """"""
        with self.lock:
            self.cur.execute(
                'insert into "jobs" ("name", "session", "status") '
                'values (?, ?, ?)', (job.name, self.session, Status.INACTIVE))
            self.jobs[self.cur.lastrowid] = job
            return JobMessage(self.cur.lastrowid, job.node)
671045
def register(cls, note, provider):
        """"""
        basenote, name = cls.parse_note(note)
        if 'provider_registry' not in vars(cls):
            cls.provider_registry = {}
        cls.provider_registry[basenote] = provider
640774
def register(self):
        """"""
        # connect to tracker
        result = requests.post(urljoin(self.tracker, 'models'), data=json.dumps(self.metadata))
        logger.debug("registered at server %s: %s", self.tracker, result)
        self.metadata["tracker"] = result.json()
1094349
def register():
    """"""
    from pelican import signals

    signals.initialized.connect(setup_git)

    signals.article_generator_finalized.connect(replace_git_url)
767479
protected function registerComments()
    {
        $this->app->singleton('comments', function ($app) {
            $blog = new Comments($app['jlourenco.comments.comment']);

            return $blog;
        });

        $this->app->alias('comments', 'jlourenco\comments\Comments');
    }
31885
def register(self, *handlers, **params):
        
        for handler in handlers:

            if issubclass(handler, PWModel):
                handler = type(
                    handler._meta.db_table.title() + 'Admin',
                    (PWAdminHandler,), dict(model=handler, **params))
                self.app.register(handler)
                continue

            name = handler.name.lower()
            self.handlers[name] = handler
453348
function registerHelpers(helpers) {
    var s = this;
    var names = Object.keys(helpers || {});

    for (var i = 0, len = names.length; i < len; i++) {
      var name = names[i];
      s.registerHelper(name, helpers[name]);
    }

    return s;
  }
396591
def register():
    """"""
    if not plim:
        logger.warning('`slim` failed to load dependency `plim`. '
                       '`slim` plugin not loaded.')
        return
    if not mako:
        logger.warning('`slim` failed to load dependency `mako`. '
                       '`slim` plugin not loaded.')
        return
    if not bs:
        logger.warning('`slim` failed to load dependency `BeautifulSoup4`. '
                       '`slim` plugin not loaded.')
        return
    if not minify:
        logger.warning('`slim` failed to load dependency `htmlmin`. '
                       '`slim` plugin not loaded.')
        return

    signals.get_writer.connect(get_writer)