public static function mapPath($virtualPath = null) {
        if (empty($virtualPath)) {
            return PHPMVC_ROOT_PATH;
        }

        if ($virtualPath[0] == '~' || $virtualPath[0] == '/') {
            $result = PHPMVC_ROOT_PATH;
            $result .= trim(substr($virtualPath, 1, strlen($virtualPath) - 1), '\\/');
        }
        elseif ($virtualPath[0] == '.') {
            $result = realpath(PHPMVC_ROOT_PATH . $virtualPath);
        }
        else {
            $result = PHPMVC_ROOT_PATH . $virtualPath;
        }

        return self::normalizePathSeparators($result);
    }
public static function mapPath($virtualPath = null) {
        if (empty($virtualPath)) {
            return PHPMVC_ROOT_PATH;
        }

        if ($virtualPath[0] == '~' || $virtualPath[0] == '/') {
            $result = PHPMVC_ROOT_PATH;
            $result .= trim(substr($virtualPath, 1, strlen($virtualPath) - 1), '\\/');
        }
        elseif ($virtualPath[0] == '.') {
            $result = realpath(PHPMVC_ROOT_PATH . $virtualPath);
        }
        else {
            $result = PHPMVC_ROOT_PATH . $virtualPath;
        }

        return self::normalizePathSeparators($result);
    }
public static function mapPath ( $ virtualPath = null ) { if ( empty ( $ virtualPath ) ) { return PHPMVC_ROOT_PATH ; } if ( $ virtualPath [ 0 ] == '~' || $ virtualPath [ 0 ] == '/' ) { $ result = PHPMVC_ROOT_PATH ; $ result .= trim ( substr ( $ virtualPath , 1 , strlen ( $ virtualPath ) - 1 ) , '\\/' ) ; } elseif ( $ virtualPath [ 0 ] == '.' ) { $ result = realpath ( PHPMVC_ROOT_PATH . $ virtualPath ) ; } else { $ result = PHPMVC_ROOT_PATH . $ virtualPath ; } return self :: normalizePathSeparators ( $ result ) ; }
Converts a virtual path to an physical path.

@param string $virtualPath The virtual path to convert to physical path.

@return string
Converts a virtual path to an physical path .