Perforce Chronicle 2012.2/486814
API Documentation

P4Cms_Uri Class Reference

Extends Zend_Uri to provide additional utility methods. More...

List of all members.

Static Public Member Functions

static hasScheme ($uri)
 Determines if the given uri has a scheme component (e.g.
static isRelativeUri ($uri)
 Determine if the given uri is relative.

Detailed Description

Extends Zend_Uri to provide additional utility methods.

Copyright:
2011-2012 Perforce Software. All rights reserved
License:
Please see LICENSE.txt in top-level folder of this distribution.
Version:
2012.2/486814

Member Function Documentation

static P4Cms_Uri::hasScheme ( uri) [static]

Determines if the given uri has a scheme component (e.g.

http://).

Parameters:
string$urithe uri to examine.
Returns:
bool true if the uri has a scheme.
    {
        return (bool) preg_match("/^[a-zA-Z]+:\//", $uri);
    }
static P4Cms_Uri::isRelativeUri ( uri) [static]

Determine if the given uri is relative.

Parameters:
string$urithe uri to examine.
Returns:
boolean true if the uri is relative.
    {
        if (substr($uri, 0, 1) == "/") {
            return false;
        }
        if (static::hasScheme($uri)) {
            return false;
        }
        return true;
    }

The documentation for this class was generated from the following file: