@constructor

@param {Array} namespaces - Namespaces to register
485116
function(namespaces)
{
    var self        = this;
    this.namespaces = {
        default: {}
    };

    if (namespaces && util.isArray(namespaces)) {

        namespaces.forEach(function(namespace) {
            self.namespaces[namespace] = {};
        });
    }
}
1255665
function () {
        var namespaces = [
            this._initialDefinition.$namespace,
            this._extractRelativeNamespaceFromName()
        ].filter(function (namespacePart) {
            return namespacePart;
        });
        if (namespaces.length) {
            this._namespace = namespaces.join(".");
        }
    }
373219
public function registerComposerNamespaces(array $namespaces) {
		foreach ($namespaces as $namespace => $dirs) {
			$namespaceDir = trim($namespace, '\ ');
			$namespaceDir = str_replace('\\', DIRECTORY_SEPARATOR, $namespaceDir);
			
			foreach ($dirs as $dir) {
				$dir .= DIRECTORY_SEPARATOR . $namespaceDir;
				
				$this->registerNamespace($namespace, $dir);
			}
		}
		
		return $this;
	}
831821
protected function initNamespace()
    {
        $namespaces = $this->config->get('namespaces', null);

        if ($namespaces !== null) {
            foreach ($namespaces as $namespace => $path) {
                $this->loader->registerNamespaces([$namespace => $path], true);
            }
            $this->loader->register();
            $this->di->set('loader', $this->loader);
        }
    }
1348595
public static function registerNamespace($namespace, $prepend = false)
    {
        if (false === $prepend) {
            self::$namespaces[] = $namespace;
        } else {
            array_unshift(self::$namespaces, $namespace);
        }
    }
256912
function createModel (namespace) {
  const model = (namespace) ? { namespace: namespace } : {}
  model.models = {}
  model.reducers = {}
  model.effects = {}
  model.subscriptions = {}
  model.state = {}

  return {
    start: function () {
      return model
    },
    state: function (value) {
      mutate(model.state, value)
    },
    reducer: function (key, value) {
      model.reducers[key] = value
    },
    subscription: function (key, value) {
      model.subscriptions[key] = value
    },
    effect: function (key, value) {
      model.effects[key] = value
    }
  }
}
1076196
def _add_namespace(self, namespace):
        """"""
        src_name = namespace.source_name
        if "*" in src_name:
            self._regex_map.append((namespace_to_regex(src_name), namespace))
        else:
            self._add_plain_namespace(namespace)
962448
function(type) {
        var namespaces = emberA(Namespace.NAMESPACES), types = emberA(), self = this;
        var typeSuffixRegex = new RegExp(classify(type) + "$");

        namespaces.forEach(function(namespace) {
          if (namespace !== Ember) {
            for (var key in namespace) {
              if (!namespace.hasOwnProperty(key)) { continue; }
              if (typeSuffixRegex.test(key)) {
                var klass = namespace[key];
                if (typeOf(klass) === 'class') {
                  types.push(dasherize(key.replace(typeSuffixRegex, '')));
                }
              }
            }
          }
        });
        return types;
      }
868539
public function registerNamespaces($namespaces, $merge = true)
    {
        foreach ($namespaces as $namespace => $path) {
            $path = rtrim($path, '\\/');
            if (DIRECTORY_SEPARATOR === '\\') {
                $namespaces[$namespace] = strtr($path, '\\', '/');
            }
        }

        $this->_namespaces = $merge ? array_merge($this->_namespaces, $namespaces) : $namespaces;

        return $this;
    }
664262
function Messenger(namespace) {
	assert(namespace, 'A namespace is required to use the process messenger.');

	assert(Object.prototype.toString.call(namespace) === '[object String]',
		'The namespace must be a string.');

	this.namespace = namespace;

	this.setupWorker();
	this.setupMaster();
}
1169077
function(namespace, ressource, args, options) {
            var d = Q.defer();
            var namespace_configs = _.extend({}, Resources.namespaces[namespace] || {}, options || {});
            var loader = namespace_configs.loader || namespace;
            
            if (Resources.loaders[loader] == null) {
                logging.error("Loader doesn't exists ", loader, "namespace=",namespace);
                d.reject();
                return d.promise;
            }
            Resources.loaders[loader](ressource, d, args, namespace_configs);
            return d.promise;
        }
1271286
function(namespace, target) {
      
      target = target || {};
      
      var names = namespace.split('.'),
          context = target;
      
      for (var i = 0; i < names.length; i++) {
        var name = names[i];
        context = (name in context) ? context[name] : (context[name] = {});
      }
      
      return target;
    }
848799
private void initNamespaces()
    {
        // The initial prefix mappings will never be deleted because they are at element depth -1
        // (a kludge)

        // Define the default namespace (initially maps to "" uri)
        Stack stack;
        MappingRecord nn;
        nn = new MappingRecord(EMPTYSTRING, EMPTYSTRING, -1);
        stack = createPrefixStack(EMPTYSTRING);
        stack.push(nn);

        // define "xml" namespace
        nn = new MappingRecord(XML_PREFIX, "http://www.w3.org/XML/1998/namespace", -1);
        stack = createPrefixStack(XML_PREFIX);
        stack.push(nn);
    }
862066
function Plugin(opts) {
  this.namespace = opts.namespace;
  this._fns = {};
  this.util = _.clone(util);
}
1255870
function (checkNamespaces) {
                var i, j
                if (!checkNamespaces)
                  return true
                if (!this.namespaces)
                  return false
                for (i = checkNamespaces.length; i--;) {
                  for (j = this.namespaces.length; j--;) {
                    if (checkNamespaces[i] === this.namespaces[j])
                      return true
                  }
                }
                return false
              }
236128
protected function generateNamespaceContext(array & $tokens)
	{
		$namespaceContext = new NamespaceContext();
		
		for($size = count($tokens), $i = 0; $i < $size; $i++)
		{
			if(is_array($tokens[$i]))
			{
				switch($tokens[$i][0])
				{
					case T_NAMESPACE:
						
						$namespace = '';
						
						for($i++; $i < $size; $i++)
						{
							if(is_array($tokens[$i]))
							{
								switch($tokens[$i][0])
								{
									case T_WHITESPACE:
									case T_COMMENT:
									case T_DOC_COMMENT:
										continue 2;
									case T_NS_SEPARATOR:
									case T_STRING:
										$namespace .= $tokens[$i][1];
										continue 2;
								}
							}
							
							break;
						}
						
						$namespaceContext = new NamespaceContext($namespace);
						
						break;
					case T_USE:
						do
						{
							$i++;
							$this->readImport($tokens, $i, $namespaceContext);
						}
						while($tokens[$i] == ',');
						
						break;
					case T_CLASS:
					case T_INTERFACE:
					case T_TRAIT:
						// Abort namespace detection as soon as code declaring a type is reached.
						break 2;
				}
			}
		}
		
		return $namespaceContext;
	}
572164
def register_namespace(self, namespace_handler):
        
        if not isinstance(namespace_handler, namespace.ClientNamespace):
            raise ValueError('Not a namespace instance')
        if self.is_asyncio_based() != namespace_handler.is_asyncio_based():
            raise ValueError('Not a valid namespace class for this client')
        namespace_handler._set_client(self)
        self.namespace_handlers[namespace_handler.namespace] = \
            namespace_handler