public function addAppPathUsePsr4($path, $namespace, $psr4_prefix, $priority = self::PRIORITY_LOW)
    {
        $dirs = $this->config('directory.apps');
        if (! $dirs) $dirs = [];

        // root (path - namespace)
        $root = substr($path, 0, -1 - strlen($namespace) + strlen($psr4_prefix));
        
        $dirs[] = ['dir' => $path, 'root' => $root, 'namespace' => $namespace, 'priority' => $priority, 'index' => count($dirs)];
        usort($dirs, function($a, $b) {
            if ($a['priority'] == $b['priority']) {
                return $a['index'] > $b['index'] ? -1 : 1;
            }
            return $a['priority'] > $b['priority'] ? -1 : 1;
        });
        $this->config('directory.apps', $dirs);
        $this->config('directory.app', $dirs[0]['dir']);

        // register namespacer
        Namespacer::register($namespace, $path);
    }