src/Samurai/Component/Core/Namespacer.php
public static function pickAppDir($path)
    {
        // when relational path.
        if ($path[0] !== '/') return $path;

        $root = null;
        foreach (self::$namespaces as $p => $ns) {
            if (strpos($path, $p) === 0) {
                if ($root === null || strlen($root) < strlen($p)) $root = $p;
            }
        }

        return $root ? $root : $path;
    }
public static function pickAppDir($path)
    {
        // when relational path.
        if ($path[0] !== '/') return $path;

        $root = null;
        foreach (self::$namespaces as $p => $ns) {
            if (strpos($path, $p) === 0) {
                if ($root === null || strlen($root) < strlen($p)) $root = $p;
            }
        }

        return $root ? $root : $path;
    }
public static function pickAppDir ( $ path ) { // when relational path. if ( $ path [ 0 ] !== '/' ) return $ path ; $ root = null ; foreach ( self :: $ namespaces as $ p => $ ns ) { if ( strpos ( $ path , $ p ) === 0 ) { if ( $ root === null || strlen ( $ root ) < strlen ( $ p ) ) $ root = $ p ; } } return $ root ? $ root : $ path ; }
pick the app dir from some path.

@access  public
@param   string  $path
@return  string
pick the app dir from some path .