Register method to keep list of dbs.
173073
def register_db(cls, dbname):
        """"""
        def decorator(subclass):
            """Register as decorator function."""
            cls._dbs[dbname] = subclass
            subclass.name = dbname
            return subclass
        return decorator
412466
def _finalize_db(self):
        """"""
        for k, v in self._els_idxed.items():
            self._els_idxed[k] = dict(v)
        self._els_idxed = dict(self._els_idxed)
284318
def register_defs(self, def_list, **kwargs):
        
        for item in def_list:
            if isinstance(item, tuple):
                self.register_rml_def(*item, **kwargs)
            elif isinstance(item, dict):
                cp_kwargs = kwargs.copy()
                item.update(kwargs)
                self.register_rml_def(**item)
418348
def remove_dbs(self, double):
        
        one = []
        for dup in double:
            if dup not in one:
                one.append(dup)
        return one
43387
private void registerOperations() {
    Class<?> type = getClass();
    for (Method method : type.getMethods()) {
      if (isOperationMethod(method)) {
        registerMethod(method);
      }
    }
  }
12417
private function registerRepository()
    {
        $this->app->singleton('migration.repository', function ($app) {
            $table = $app['config']['database.migrations'];

            return new DatabaseMigrationRepository($app['db'], $table);
        });
    }
1270359
public static void register() {
        try {
            Class<? extends List<Object>> listObjectClass;
            listObjectClass = (Class<List<Object>>) NumberedListConverter.class
                                .getMethod("getString", List.class).getParameterTypes()[0];
            NumberedListConverter converter = new NumberedListConverter();
            ConverterRegistry.addConverter(listObjectClass, converter);
            ConverterRegistry.addConverter(ArrayList.class, new NumberedArrayListConverter(converter));
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
971396
def __dbfRecords(self):
        """"""
        f = self.__getFileObj(self.dbf)
        for record in self.records:
            if not self.fields[0][0].startswith("Deletion"):
                f.write(b(' ')) # deletion flag
            for (fieldName, fieldType, size, dec), value in zip(self.fields, record):
                fieldType = fieldType.upper()
                size = int(size)
                if fieldType.upper() == "N":
                    value = str(value).rjust(size)
                elif fieldType == 'L':
                    value = str(value)[0].upper()
                else:
                    value = str(value)[:size].ljust(size)
                assert len(value) == size
                value = b(value)
                f.write(value)
555452
private void init(final List<DbLicense> licenses) {
        licensesRegexp.clear();

        for (final DbLicense license : licenses) {
            if (license.getRegexp() == null ||
                    license.getRegexp().isEmpty()) {
                licensesRegexp.put(license.getName(), license);
            } else {
                licensesRegexp.put(license.getRegexp(), license);
            }
        }
    }
558086
public void setRegisterBlueprints(Collection blueprints) throws RegisterBlueprintException {
        for (Object blueprint : blueprints) {
            if (blueprint instanceof Class) {
                registerBlueprint((Class) blueprint);
            } else if (blueprint instanceof String) {
                registerBlueprint((String) blueprint);
            } else if (blueprint instanceof String) {
                registerBlueprint(blueprint);
            } else {
                throw new RegisterBlueprintException("Only supports List comprised of Class<Blueprint>, Blueprint, or String className");
            }
        }
    }
136747
public static void registerDataPersisters(DataPersister... dataPersisters) {
		// we build the map and replace it to lower the chance of concurrency issues
		List<DataPersister> newList = new ArrayList<DataPersister>();
		if (registeredPersisters != null) {
			newList.addAll(registeredPersisters);
		}
		for (DataPersister persister : dataPersisters) {
			newList.add(persister);
		}
		registeredPersisters = newList;
	}
1169685
synchronized void bulkRegisterSingleton() {
        for (Map.Entry<Class<? extends AppService>, AppService> entry : registry.entrySet()) {
            if (isSingletonService(entry.getKey())) {
                app.registerSingleton(entry.getKey(), entry.getValue());
            }
        }
    }
1247115
private function registerModelChecks()
    {
        $models = $this->getRegistryCache()->getModels();

        /** @var $modelObj Model */
        foreach ($models as $name => $modelObj) {
            if (!$modelObj->hasMethod('checks')) {
                continue;
            }

            self::getCheckRegistry()->register([$modelObj, 'checks'], [Tags::Model]);
        }
    }
872066
def collections(self, values):
        """"""
        # if cache server is configured, save collection list
        if self.cache:
            self.cache.set(
                self.app.config['COLLECTIONS_CACHE_KEY'], values)
1030072
def register_proper_name(self, name):
        """"""
        with self.proper_names_db_path.open("a") as f:
            f.write(u"{0}\n".format(name))
1049465
protected function registerResources()
    {
        $basDirectory = $this->getLanguageDirectory();
        $languages = $this->getContainer()->get('translation.languages');

        /** @var Translator $translator */
        $translator = $this->getContainer()->get('translator');

        foreach ($languages as $language) {
            $translator->addResource('php', $basDirectory . DIRECTORY_SEPARATOR . $language, $language);
        }
    }
478289
protected void setRegisters(int[] registers) {
        this.registers = Arrays.copyOf(registers, registers.length);
        this.length = registers.length;
    }