code: public function registerNamespace($ns, $def)
      {
          list($ns, $def) = $this->fireEvent('namespace.register', [ $ns, $def ]);
  
          $this->namespaces[$ns] = $def;
  
          return $this;
      }
docs: Register namespace.
  @param  string $ns  Namespace name.
  @param  string $def Namespace path.
  @return self