PHP Класс Pagekit\Application\UrlProvider

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$file Pagekit\Filesystem\Filesystem
$locator Pagekit\Filesystem\Locator
$router Pagekit\Routing\Router

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
parseQuery ( string $url, array $parameters = [] ) : string Parses query parameters into a URL.

Описание методов

__construct() публичный метод

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() публичный метод

Get shortcut.
См. также: get()
public __invoke ( $path = '', $parameters = [], $referenceType = UrlGenerator::ABSOLUTE_PATH )

base() публичный метод

Gets the base path for the current request.
public base ( mixed $referenceType = UrlGenerator::ABSOLUTE_PATH ) : string
$referenceType mixed
Результат string

current() публичный метод

Gets the URL for the current request.
public current ( mixed $referenceType = UrlGenerator::ABSOLUTE_PATH ) : string
$referenceType mixed
Результат string

get() публичный метод

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
Результат string

getRoute() публичный метод

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
Результат string | false

getStatic() публичный метод

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
Результат string

parseQuery() защищенный метод

Parses query parameters into a URL.
protected parseQuery ( string $url, array $parameters = [] ) : string
$url string
$parameters array
Результат string

previous() публичный метод

Gets the URL for the previous request.
public previous ( ) : string
Результат string

Описание свойств

$file защищенное свойство

protected Filesystem,Pagekit\Filesystem $file
Результат Pagekit\Filesystem\Filesystem

$locator защищенное свойство

protected Locator,Pagekit\Filesystem $locator
Результат Pagekit\Filesystem\Locator

$router защищенное свойство

protected Router,Pagekit\Routing $router
Результат Pagekit\Routing\Router