PHP Class Pagekit\Application\UrlProvider

Mostrar archivo Open project: pagekit/pagekit Class Usage Examples

Protected Properties

Property Type Description
$file Pagekit\Filesystem\Filesystem
$locator Pagekit\Filesystem\Locator
$router Pagekit\Routing\Router

Public Methods

Method Description
__construct ( Pagekit\Routing\Router $router, Filesystem $file, Pagekit\Filesystem\Locator $locator ) Constructor.
__invoke ( $path = '', $parameters = [], $referenceType = UrlGenerator::ABSOLUTE_PATH ) Get shortcut.
base ( mixed $referenceType = UrlGenerator::ABSOLUTE_PATH ) : string Gets the base path for the current request.
current ( mixed $referenceType = UrlGenerator::ABSOLUTE_PATH ) : string Gets the URL for the current request.
get ( string $path = '', mixed $parameters = [], mixed $referenceType = UrlGenerator::ABSOLUTE_PATH ) : string Gets the URL appending the URI to the base URI.
getRoute ( string $name, mixed $parameters = [], mixed $referenceType = UrlGenerator::ABSOLUTE_PATH ) : string | false Gets the URL to a named route.
getStatic ( string $path, mixed $parameters = [], mixed $referenceType = UrlGenerator::ABSOLUTE_PATH ) : string Gets the URL to a path resource.
previous ( ) : string Gets the URL for the previous request.

Protected Methods

Method Description
parseQuery ( string $url, array $parameters = [] ) : string Parses query parameters into a URL.

Method Details

__construct() public method

Constructor.
public __construct ( Pagekit\Routing\Router $router, Filesystem $file, Pagekit\Filesystem\Locator $locator )
$router Pagekit\Routing\Router
$file Pagekit\Filesystem\Filesystem
$locator Pagekit\Filesystem\Locator

__invoke() public method

Get shortcut.
See also: get()
public __invoke ( $path = '', $parameters = [], $referenceType = UrlGenerator::ABSOLUTE_PATH )

base() public method

Gets the base path for the current request.
public base ( mixed $referenceType = UrlGenerator::ABSOLUTE_PATH ) : string
$referenceType mixed
return string

current() public method

Gets the URL for the current request.
public current ( mixed $referenceType = UrlGenerator::ABSOLUTE_PATH ) : string
$referenceType mixed
return string

get() public method

Gets the URL appending the URI to the base URI.
public get ( string $path = '', mixed $parameters = [], mixed $referenceType = UrlGenerator::ABSOLUTE_PATH ) : string
$path string
$parameters mixed
$referenceType mixed
return string

getRoute() public method

Gets the URL to a named route.
public getRoute ( string $name, mixed $parameters = [], mixed $referenceType = UrlGenerator::ABSOLUTE_PATH ) : string | false
$name string
$parameters mixed
$referenceType mixed
return string | false

getStatic() public method

Gets the URL to a path resource.
public getStatic ( string $path, mixed $parameters = [], mixed $referenceType = UrlGenerator::ABSOLUTE_PATH ) : string
$path string
$parameters mixed
$referenceType mixed
return string

parseQuery() protected method

Parses query parameters into a URL.
protected parseQuery ( string $url, array $parameters = [] ) : string
$url string
$parameters array
return string

previous() public method

Gets the URL for the previous request.
public previous ( ) : string
return string

Property Details

$file protected_oe property

protected Filesystem,Pagekit\Filesystem $file
return Pagekit\Filesystem\Filesystem

$locator protected_oe property

protected Locator,Pagekit\Filesystem $locator
return Pagekit\Filesystem\Locator

$router protected_oe property

protected Router,Pagekit\Routing $router
return Pagekit\Routing\Router