Load the 'fedora.messages' entry points and register the message classes.
321529
def load_message_classes():
    """"""
    for message in pkg_resources.iter_entry_points("fedora.messages"):
        cls = message.load()
        _log.info(
            "Registering the '%s' key as the '%r' class in the Message "
            "class registry",
            message.name,
            cls,
        )
        _schema_name_to_class[message.name] = cls
        _class_to_schema_name[cls] = message.name
    global _registry_loaded
    _registry_loaded = True
919166
def get_name(cls):
    
    global _registry_loaded
    if not _registry_loaded:
        load_message_classes()

    try:
        return _class_to_schema_name[cls]
    except KeyError:
        raise TypeError(
            "The class {} is not in the message registry, which indicates it is"
            ' not in the current list of entry points for "fedora_messaging".'
            " Please check that the class has been added to your package's"
            " entry points.".format(repr(cls))
        )
379231
public function loadMessages()
    {
        $message = new IncomingMessage(Audio::PATTERN, $this->event->get('from')['id'], $this->event->get('chat')['id'],
            $this->event);
        $message->setAudio($this->getAudio());

        $this->messages = [$message];
    }
296333
def load_reg():
    '''
    
    '''
    reg_dir = _reg_dir()
    regfile = os.path.join(reg_dir, 'register')
    try:
        with salt.utils.files.fopen(regfile, 'r') as fh_:
            return salt.utils.msgpack.load(fh_)
    except Exception:
        log.error('Could not write to msgpack file %s', __opts__['outdir'])
        raise
281115
protected void init() {
		// Get all our messages
		objectSingularName = getApplicationConfig().messageResolver().getMessage(
				modelId + ".objectName.singular");
		objectPluralName = getApplicationConfig().messageResolver().getMessage(
				modelId + ".objectName.plural");
	}
1295197
def startup():
    
    model.setup()
    index.scan_index(config.content_folder)
    index.background_scan(config.content_folder)
199857
public function bootstrap()
    {

        // register the default autoloader
        require SERVER_AUTOLOADER;

        // synchronize the application instance and register the class loaders
        $application = $this->application;
        $application->registerClassLoaders();

        // register the applications annotation registries
        $application->registerAnnotationRegistries();

        // create a reference to the workers/messages
        $workers = $this->workers;
        $messages = $this->messages;
        $managerSettings = $this->managerSettings;

        // try to load the profile logger
        if ($this->profileLogger = $application->getInitialContext()->getLogger(LoggerUtils::PROFILE)) {
            $this->profileLogger->appendThreadContext(sprintf('message-queue-%s', $this->getName()));
        }

        // prepare the storages
        $jobsToExceute = array();

        // initialize the counter for the storages
        $counter = 0;

        // create a separate queue for each priority
        foreach (PriorityKeys::getAll() as $priorityKey) {
            // create the containers for the worker
            $jobsToExceute[$counter] = new GenericStackable();

            // initialize and start the queue worker
            $queueWorker = new QueueWorker();
            $queueWorker->injectMessages($messages);
            $queueWorker->injectApplication($application);
            $queueWorker->injectPriorityKey($priorityKey);
            $queueWorker->injectManagerSettings($managerSettings);

            // attach the storages
            $queueWorker->injectJobsToExecute($jobsToExceute[$counter]);

            // start the worker instance
            $queueWorker->start();

            // add the queue instance to the module
            $workers[$this->uniqueWorkerName($priorityKey)] = $queueWorker;

            // raise the counter
            $counter++;
        }
    }
1097770
public function loadMessages()
    {
        $message = new IncomingMessage(File::PATTERN, $this->event->get('from')['id'], $this->event->get('chat')['id'],
            $this->event);
        $message->setFiles($this->getFiles());

        $this->messages = [$message];
    }
404829
public function boot()
    {
        if (config('modules.register.translations', true) === true) {
            $this->registerTranslation();
        }

        if ($this->isLoadFilesOnBoot()) {
            $this->registerFiles();
        }

        $this->fireEvent('boot');
    }
931115
public function boot() {
		$this->loadViewsFrom(__DIR__ . '/../../assets/views', 'notify');

		$this->publishes([
			__DIR__ . '/../../config' => base_path('config')
		], 'config');

		$this->publishes([
			__DIR__ . '/../../assets/less' => base_path('resources/assets/vendor/marwelln/notifier')
		], 'less');

		// Send notifier variable to given views.
		view()->composer(config('marwelln.notifier.notifierViews', ['layout.default']), function($view) {
			$view->with('notifier', new Notify(Session::get('notifier', [])));
		});
	}
534905
def load_commands(self, parser):
        

        entrypoints = self._get_entrypoints()

        already_loaded = set()
        for entrypoint in entrypoints:
            if entrypoint.name not in already_loaded:
                command_class = entrypoint.load()
                command_class(entrypoint.name, self, parser).prepare()
                already_loaded.add(entrypoint.name)
667392
public function bootstrap()
    {

        // setup autoloader
        require SERVER_AUTOLOADER;

        // register the application's class loaders
        $application = $this->getApplication();
        $application->registerClassLoaders();

        // register the applications annotation registries
        $application->registerAnnotationRegistries();

        // try to load the system logger
        $this->systemLogger = $this->getLogger(LoggerUtils::SYSTEM);

        // try to load the profile logger
        if ($this->profileLogger = $this->getLogger(LoggerUtils::PROFILE)) {
            $this->profileLogger->appendThreadContext('servlet-engine-garbage-collector');
        }
    }
994650
def _init(self):
        

        self._entry_points = {}
        for entry_point in self.raw_entry_points:
            if entry_point.dist.project_name != self.reserved.get(
                    entry_point.name, entry_point.dist.project_name):
                logger.error(
                    "registry '%s' for '%s' is reserved for package '%s'",
                    entry_point.name, self.registry_name,
                    self.reserved[entry_point.name],
                )
                continue

            if self.get_record(entry_point.name):
                logger.warning(
                    "registry '%s' for '%s' is already registered.",
                    entry_point.name, self.registry_name,
                )
                existing = self._entry_points[entry_point.name]
                logger.debug(
                    "registered '%s' from '%s'", existing, existing.dist)
                logger.debug(
                    "discarded '%s' from '%s'", entry_point, entry_point.dist)
                continue

            logger.debug(
                "recording '%s' from '%s'", entry_point, entry_point.dist)
            self._entry_points[entry_point.name] = entry_point
991513
def main():
    """"""
    message_names = set()
    packages = []
    messages = []
    extensions = []
    constants = []

    # Extract everything needed to generate output file
    for info in extract_message_info():
        message_names.add(info.title)
        packages.append(
            'from {0} import {1}'.format(
                BASE_PACKAGE, info.module))
        messages.append(
            'from {0}.{1} import {2}'.format(
                BASE_PACKAGE, info.module, info.title))
        extensions.append(
            'ProtocolMessage.{0}: {1}.{2},'.format(
                info.const, info.module, info.accessor))
        constants.append(
            '{0} = ProtocolMessage.{0}'.format(
                info.const))


    # Look for remaining messages
    for module_name, message_name in extract_unreferenced_messages():
        if message_name not in message_names:
            message_names.add(message_name)
            messages.append('from {0}.{1} import {2}'.format(
                    BASE_PACKAGE, module_name, message_name))

    # Print file output with values inserted
    print(OUTPUT_TEMPLATE.format(
        packages='\n'.join(sorted(packages)),
        messages='\n'.join(sorted(messages)),
        extensions='\n    '.join(sorted(extensions)),
        constants='\n'.join(sorted(constants))))

    return 0
1201561
def _register_resources(self, api_dirs, do_checks):
        ''''''
        msg = 'Looking-up for APIs in the following directories: {}'
        log.debug(msg.format(api_dirs))
        if do_checks:
            check_and_load(api_dirs)
        else:
            msg = 'Loading module "{}" from directory "{}"'
            for loader, mname, _ in pkgutil.walk_packages(api_dirs):
                sys.path.append(os.path.abspath(loader.path))
                log.debug(msg.format(mname, loader.path))
                import_module(mname)
798971
protected function setupFacades()
    {
        // Setup alias loader.
        $loader = AliasLoader::getInstance();

        // Load Sentinel
        // - Activation
        // - Reminder
        // - Sentinel
        $loader->alias('Activation', Activation::class);
        $loader->alias('Reminder', Reminder::class);
        $loader->alias('Sentinel', Sentinel::class);

        // Load Flash
        $loader->alias('Flash', Flash::class);

        // Load Ekko
        $loader->alias('Ekko', Ekko::class);

        // Carbon
        $loader->alias('Carbon', Carbon::class);

        // Load Form
        // - Form
        // - BootForm
        $loader->alias('Form', Form::class);
        $loader->alias('BootForm', BootForm::class);
    }
538354
public function loadMessages()
    {
        if ($this->payload->get('callback_query') !== null) {
            $callback = Collection::make($this->payload->get('callback_query'));

            $messages = [
                new IncomingMessage($callback->get('data'), $callback->get('from')['id'],
                    $callback->get('message')['chat']['id'], $callback->get('message')),
            ];
        } elseif ($this->isValidLoginRequest()) {
            $messages = [
                new IncomingMessage('', $this->queryParameters->get('id'), $this->queryParameters->get('id'), $this->queryParameters),
            ];
        } else {
            $messages = [
                new IncomingMessage($this->event->get('text'), $this->event->get('from')['id'], $this->event->get('chat')['id'],
                    $this->event),
            ];
        }

        $this->messages = $messages;
    }