Registers a named object in the store.
794
function(obj, type, name, nameIsUnique, oldName) {
    var nameMap, objList

    this._store[type] = nameMap = this._store[type] || {}
    nameMap[name] = objList = nameMap[name] || []

    // Adding new mapping
    if (objList.indexOf(obj) === -1) {
      if (nameIsUnique && objList.length > 0)
        throw new Error('there is already a ' + type + ' with name "' + name + '"')
      objList.push(obj)
    }

    // Removing old mapping
    if (oldName) {
      objList = nameMap[oldName]
      objList.splice(objList.indexOf(obj), 1)
    }

    exports.emitter.emit('namedObjects:registered:' + type, obj)
  }
707090
public function registerStandardObjects()
	{
		$this->extensionMap = new ExtensionMap();
		$this->extensions = $this->extensionMap->getRegisteredExtensionNames();
		$this->finder->files();
	}
834978
protected void store(Object obj, Identity oid, ClassDescriptor cld,  boolean insert)
    {
        store(obj, oid, cld, insert, false);
    }
122889
def register(self, name, fun, description=None):
        
        self.methods[name] = fun
        self.descriptions[name] = description
1094962
def register(cls, name, entrypoint):
        
        if not issubclass(entrypoint, Entrypoint):
            raise ValidationError(
                "Invalid type for entry '{}', MUST implement "
                "kser.entry.Entrypoint".format(name),
                extra=dict(entrypoint=name)
            )
        cls.ENTRYPOINTS[name] = entrypoint
        logger.debug("{}.Registered: {}".format(cls.__name__, name))
607184
public void registerJavaPropertyNameProcessor( Class target, PropertyNameProcessor propertyNameProcessor ) {
      if( target != null && propertyNameProcessor != null ) {
         javaPropertyNameProcessorMap.put( target, propertyNameProcessor );
      }
   }
1203078
@Override
    public ObjectInstance registerMBean(Object object, ObjectName name)
            throws MBeanRegistrationException, NotCompliantMBeanException
    {
        while (true) {
            try {
                // try to register the mbean
                return mbeanServer.registerMBean(object, name);
            }
            catch (InstanceAlreadyExistsException ignored) {
            }

            try {
                // a mbean is already installed, try to return the already registered instance
                ObjectInstance objectInstance = mbeanServer.getObjectInstance(name);
                log.debug("%s already bound to %s", name, objectInstance);
                return objectInstance;
            }
            catch (InstanceNotFoundException ignored) {
                // the mbean was removed before we could get the reference
                // start the whole process over again
            }
        }
    }
171382
public static void registerMbean(MBeanServer server, ModelMBean mbean, ObjectName name) {
        try {
            synchronized(LOCK) {
                if(server.isRegistered(name))
                    JmxUtils.unregisterMbean(server, name);
                server.registerMBean(mbean, name);
            }
        } catch(Exception e) {
            logger.error("Error registering mbean:", e);
        }
    }
963603
def register_named_scope! # :nodoc
      @klass.define_singleton_method(:search_for) do |query = '', options = {}|
        # klass may be different to @klass if the scope is called on a subclass
        klass = self
        definition = klass.scoped_search_definition

        search_scope = klass.all
        find_options = ScopedSearch::QueryBuilder.build_query(definition, query || '', options)
        search_scope = search_scope.where(find_options[:conditions])   if find_options[:conditions]
        search_scope = search_scope.includes(find_options[:include])   if find_options[:include]
        search_scope = search_scope.joins(find_options[:joins])        if find_options[:joins]
        search_scope = search_scope.reorder(find_options[:order])      if find_options[:order]
        search_scope = search_scope.references(find_options[:include]) if find_options[:include]

        search_scope
      end
    end
996845
def register_fetcher(self, name, fetcher):
        
        assert name not in self.fetchers
        self.fetchers[name] = fetcher
207938
public function register($name, &$ref)
    {
        if (array_key_exists($name, $this->_storage)) {
            trigger_error(
                "Name $name produces collision, cannot re-register",
                E_USER_ERROR
            );
            return;
        }
        $this->_storage[$name] =& $ref;
    }
509504
protected function registerObject(ObjectId $umi, PersistentObject $obj, $buildDepth, $varName) {
    if ($buildDepth == 0) {
      $buildDepth=BuildDepth::SINGLE;
    }
    // save the object in the session
    $umiStr = $umi->toString();
    $objects = $this->session->get($varName);
    if (!isset($objects[$umiStr])) {
      $objects[$umiStr] = [];
    }
    $objects[$umiStr][$buildDepth] = $obj;
    $this->session->set($varName, $objects);
  }
624741
public boolean register(E e, String name) {
        if (resolve.containsKey(name)) {
            return false;
        }
        resolve.put(name, e);
        rev.put(e, name);
        return true;
    }
5127
def register(cls):
    
    registry_entry = RegistryEntry(category = cls.category, namespace = cls.namespace, name = cls.name, cls=cls)
    if registry_entry not in registry and not exists_in_registry(cls.category, cls.namespace, cls.name):
        registry.append(registry_entry)
    else:
        log.warn("Class {0} already in registry".format(cls))
828908
public static void register(@NonNull String name, @NonNull Lexicon lexicon) {
      lexiconCache.put(name.toLowerCase(), lexicon);
   }
750086
@Override
    public void registerStore(IStore store) {
        _store = store;
        _store.setStoreCallback(_storeCallback);
        if (store instanceof ISessionObserver) {
            this.registerSessionObserver((ISessionObserver) store);
        }
        if (store instanceof ISessionStateObserver) {
            this.registerSessionStateObserver((ISessionStateObserver) store);
        }
    }
856393
public void registerSingleton(String name, Class<?> clazz, MutablePropertyValues pvs) throws BeansException {
        GenericBeanDefinition bd = new GenericBeanDefinition();
        bd.setBeanClass(clazz);
        bd.setPropertyValues(pvs);
        getDefaultListableBeanFactory().registerBeanDefinition(name, bd);
    }