PHP Class Pagekit\Application\UrlProvider

Afficher le fichier Open project: pagekit/pagekit Class Usage Examples

Protected Properties

Свойство Type Description
$file Pagekit\Filesystem\Filesystem
$locator Pagekit\Filesystem\Locator
$router Pagekit\Routing\Router

Méthodes publiques

Méthode 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.

Méthodes protégées

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

Method Details

__construct() public méthode

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 méthode

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

base() public méthode

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

current() public méthode

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

get() public méthode

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
Résultat string

getRoute() public méthode

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
Résultat string | false

getStatic() public méthode

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
Résultat string

parseQuery() protected méthode

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

previous() public méthode

Gets the URL for the previous request.
public previous ( ) : string
Résultat string

Property Details

$file protected_oe property

protected Filesystem,Pagekit\Filesystem $file
Résultat Pagekit\Filesystem\Filesystem

$locator protected_oe property

protected Locator,Pagekit\Filesystem $locator
Résultat Pagekit\Filesystem\Locator

$router protected_oe property

protected Router,Pagekit\Routing $router
Résultat Pagekit\Routing\Router