public function registerNamespace($ns, $def)
    {
        list($ns, $def) = $this->fireEvent('namespace.register', [ $ns, $def ]);

        $this->namespaces[$ns] = $def;

        return $this;
    }