public static function getPathFromUrl($url) {
        if (substr($url, 0, strlen(ROOT_URL)) != ROOT_URL) {
            throw new common_Exception($url.' does not lie within the tao instalation path');
        }
        $subUrl = substr($url, strlen(ROOT_URL));
        $parts = array();
        foreach (explode('/', $subUrl) as $directory) {
            $parts[] = urldecode($directory);
        }
        $path = ROOT_PATH.implode(DIRECTORY_SEPARATOR, $parts);
        if (self::securityCheck($path)) {
            return $path;
        } else {
            throw new common_Exception($url.' is not secure');
        }
    }
public static function getPathFromUrl($url) {
        if (substr($url, 0, strlen(ROOT_URL)) != ROOT_URL) {
            throw new common_Exception($url.' does not lie within the tao instalation path');
        }
        $subUrl = substr($url, strlen(ROOT_URL));
        $parts = array();
        foreach (explode('/', $subUrl) as $directory) {
            $parts[] = urldecode($directory);
        }
        $path = ROOT_PATH.implode(DIRECTORY_SEPARATOR, $parts);
        if (self::securityCheck($path)) {
            return $path;
        } else {
            throw new common_Exception($url.' is not secure');
        }
    }
public static function getPathFromUrl ( $ url ) { if ( substr ( $ url , 0 , strlen ( ROOT_URL ) ) != ROOT_URL ) { throw new common_Exception ( $ url . ' does not lie within the tao instalation path' ) ; } $ subUrl = substr ( $ url , strlen ( ROOT_URL ) ) ; $ parts = array ( ) ; foreach ( explode ( '/' , $ subUrl ) as $ directory ) { $ parts [ ] = urldecode ( $ directory ) ; } $ path = ROOT_PATH . implode ( DIRECTORY_SEPARATOR , $ parts ) ; if ( self :: securityCheck ( $ path ) ) { return $ path ; } else { throw new common_Exception ( $ url . ' is not secure' ) ; } }
Gets the local path to a publicly available resource
no verification if the file should be accessible

@param string $url
@throws common_Exception
@return string
Gets the local path to a publicly available resource no verification if the file should be accessible