# ApplicationUrl Class Reference

TODO: hierarchical scopes, not only path/query - subdomains may be involved too, ex: username.example.com. More...

Inheritance diagram for ApplicationUrl:
[legend]

List of all members.

## Public Member Functions

| setBase (HttpUrl $base)
| getBase ()
| setAbsolute ($absolute)
| isAbsolute ()
| setNavigationSchema (ScopeNavigationSchema $schema)
| getNavigationSchema ()
| addApplicationScope ($scope)
| addUserScope ($userScope)
| dropFromUserScope ($key)
| getUserScope ()
| setPath ($path)
| setPathByRequestUri ($requestUri, $normalize=true)
| getNavigationScope ()
| getArgSeparator ()
| setArgSeparator ($argSeparator)
| currentHref ($additionalScope=array(), $absolute=null)
| scopeHref ($scope, $absolute=null)
| cleanHref ($scope, $absolute=null)
| baseHref ($absolute=null)
| poorReference ($url)
| href ($url, $absolute=null)
| absoluteHref ($url)
| getUserQueryVars ()
| getApplicationQueryVars ()

## Static Public Member Functions

static | create ()

## Protected Member Functions

| getQueryVars ($scope)
| buildQuery ($scope)

## Protected Attributes

| $base = null
| $applicationScope = array()
| $userScope = array()
| $navigationScope = array()
| $argSeparator = null
| $navigationSchema = null
| $absolute = false

## Detailed Description

TODO: hierarchical scopes, not only path/query - subdomains may be involved too, ex: username.example.com.

Definition at line 17 of file ApplicationUrl.class.php.

## Member Function Documentation

ApplicationUrl::absoluteHref | ( | $ | url | ) |

Definition at line 292 of file ApplicationUrl.class.php.

References href().

Here is the call graph for this function:

ApplicationUrl::addApplicationScope | ( | $ | scope | ) |

Returns:
  ApplicationUrl

Definition at line 93 of file ApplicationUrl.class.php.

References Assert::isArray(), and ArrayUtils::mergeRecursiveUnique().

Here is the call graph for this function:

ApplicationUrl::addUserScope | ( | $ | userScope | ) |

Returns:
  ApplicationUrl

Definition at line 107 of file ApplicationUrl.class.php.

References $userScope, Assert::isArray(), and ArrayUtils::mergeRecursiveUnique().

Here is the call graph for this function:

ApplicationUrl::baseHref | ( | $ | absolute = `null` | ) |

Definition at line 254 of file ApplicationUrl.class.php.

References $absolute, and href().

Here is the call graph for this function:

ApplicationUrl::buildQuery | ( | $ | scope | ) | `[protected]`

Definition at line 328 of file ApplicationUrl.class.php.

References getArgSeparator().

Referenced by getQueryVars(), and href().

Here is the call graph for this function:

ApplicationUrl::cleanHref | ( | $ | scope,
|  | $ | absolute = `null` |
| ) |  |  |

Definition at line 243 of file ApplicationUrl.class.php.

References $absolute, href(), and Assert::isArray().

Referenced by scopeHref().

Here is the call graph for this function:

static ApplicationUrl::create | ( |  | ) | `[static]`

Returns:
  ApplicationUrl

Reimplemented in SimpleApplicationUrl.

Definition at line 34 of file ApplicationUrl.class.php.

Referenced by poorReference(), and setPathByRequestUri().

ApplicationUrl::currentHref | ( | $ | additionalScope = `array()`,
|  | $ | absolute = `null` |
| ) |  |  |

Definition at line 218 of file ApplicationUrl.class.php.

References $absolute, ArrayUtils::mergeRecursiveUnique(), and scopeHref().

Here is the call graph for this function:

ApplicationUrl::dropFromUserScope | ( | $ | key | ) |

Returns:
  ApplicationUrl

Definition at line 121 of file ApplicationUrl.class.php.

ApplicationUrl::getApplicationQueryVars | ( |  | ) |

Definition at line 302 of file ApplicationUrl.class.php.

References getQueryVars().

Here is the call graph for this function:

ApplicationUrl::getArgSeparator | ( |  | ) |

Definition at line 200 of file ApplicationUrl.class.php.

Referenced by buildQuery(), getQueryVars(), SimpleApplicationUrl::href(), and href().

ApplicationUrl::getBase | ( |  | ) |

Returns:
  HttpUrl

Definition at line 52 of file ApplicationUrl.class.php.

ApplicationUrl::getNavigationSchema | ( |  | ) |

Returns:
  ScopeNavigationSchema

Definition at line 85 of file ApplicationUrl.class.php.

ApplicationUrl::getNavigationScope | ( |  | ) |

Definition at line 195 of file ApplicationUrl.class.php.

ApplicationUrl::getQueryVars | ( | $ | scope | ) | `[protected]`

Definition at line 307 of file ApplicationUrl.class.php.

References buildQuery(), and getArgSeparator().

Referenced by getApplicationQueryVars(), and getUserQueryVars().

Here is the call graph for this function:

ApplicationUrl::getUserQueryVars | ( |  | ) |

Definition at line 297 of file ApplicationUrl.class.php.

References getQueryVars().

Here is the call graph for this function:

ApplicationUrl::getUserScope | ( |  | ) |

Definition at line 129 of file ApplicationUrl.class.php.

ApplicationUrl::href | ( | $ | url,
|  | $ | absolute = `null` |
| ) |  |  |

Reimplemented in SimpleApplicationUrl.

Definition at line 268 of file ApplicationUrl.class.php.

References $absolute, buildQuery(), getArgSeparator(), and poorReference().

Referenced by absoluteHref(), baseHref(), and cleanHref().

Here is the call graph for this function:

ApplicationUrl::isAbsolute | ( |  | ) |

Definition at line 67 of file ApplicationUrl.class.php.

ApplicationUrl::poorReference | ( | $ | url | ) |

Definition at line 259 of file ApplicationUrl.class.php.

References create(), and Assert::isNotNull().

Referenced by href().

Here is the call graph for this function:

ApplicationUrl::scopeHref | ( | $ | scope,
|  | $ | absolute = `null` |
| ) |  |  |

Definition at line 231 of file ApplicationUrl.class.php.

References $absolute, cleanHref(), Assert::isArray(), and ArrayUtils::mergeRecursiveUnique().

Referenced by currentHref().

Here is the call graph for this function:

ApplicationUrl::setAbsolute | ( | $ | absolute | ) |

Returns:
  ApplicationUrl

Definition at line 60 of file ApplicationUrl.class.php.

References $absolute.

ApplicationUrl::setArgSeparator | ( | $ | argSeparator | ) |

Returns:
  ApplicationUrl

Definition at line 211 of file ApplicationUrl.class.php.

References $argSeparator.

ApplicationUrl::setBase | ( | HttpUrl $ | base | ) |

Returns:
  ApplicationUrl

Definition at line 42 of file ApplicationUrl.class.php.

ApplicationUrl::setNavigationSchema | ( | ScopeNavigationSchema $ | schema | ) |

Returns:
  ApplicationUrl

Definition at line 75 of file ApplicationUrl.class.php.

ApplicationUrl::setPath | ( | $ | path | ) |

Returns:
  ApplicationUrl

Definition at line 137 of file ApplicationUrl.class.php.

Referenced by setPathByRequestUri().

ApplicationUrl::setPathByRequestUri | ( | $ | requestUri,
|  | $ | normalize = `true` |
| ) |  |  |

Returns:
  ApplicationUrl

Reimplemented in SimpleApplicationUrl.

Definition at line 160 of file ApplicationUrl.class.php.

References create(), and setPath().

Here is the call graph for this function:

## Member Data Documentation

ApplicationUrl::$absolute = false`[protected]`

Definition at line 29 of file ApplicationUrl.class.php.

Referenced by baseHref(), cleanHref(), currentHref(), SimpleApplicationUrl::href(), href(), scopeHref(), and setAbsolute().

ApplicationUrl::$applicationScope = array()`[protected]`

Definition at line 21 of file ApplicationUrl.class.php.

ApplicationUrl::$argSeparator = null`[protected]`

Definition at line 25 of file ApplicationUrl.class.php.

Referenced by setArgSeparator().

ApplicationUrl::$base = null`[protected]`

Definition at line 19 of file ApplicationUrl.class.php.

ApplicationUrl::$navigationSchema = null`[protected]`

Definition at line 27 of file ApplicationUrl.class.php.

ApplicationUrl::$navigationScope = array()`[protected]`

Definition at line 23 of file ApplicationUrl.class.php.

ApplicationUrl::$userScope = array()`[protected]`

Definition at line 22 of file ApplicationUrl.class.php.

Referenced by addUserScope().

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

- main/Application/ApplicationUrl.class.php