private function namespaceFromLegacyNamespace($namespace, $className)
    {
        $qcn = str_replace('_', '\\', $className);

        $lastBackslash = strrpos($qcn, '\\');
        if ($lastBackslash) {
            $namespace = rtrim($namespace, '\\') . '\\' . substr($qcn, 0, $lastBackslash);
        }

        return $namespace;
    }
private function namespaceFromLegacyNamespace($namespace, $className)
    {
        $qcn = str_replace('_', '\\', $className);

        $lastBackslash = strrpos($qcn, '\\');
        if ($lastBackslash) {
            $namespace = rtrim($namespace, '\\') . '\\' . substr($qcn, 0, $lastBackslash);
        }

        return $namespace;
    }
private function namespaceFromLegacyNamespace ( $ namespace , $ className ) { $ qcn = str_replace ( '_' , '\\' , $ className ) ; $ lastBackslash = strrpos ( $ qcn , '\\' ) ; if ( $ lastBackslash ) { $ namespace = rtrim ( $ namespace , '\\' ) . '\\' . substr ( $ qcn , 0 , $ lastBackslash ) ; } return $ namespace ; }
Extracts the namespace from the class name.

@param string $namespace
@param string $className

@return string
Extracts the namespace from the class name .