PHP Класс Habari\Controller

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

Открытые свойства

Свойство Тип Описание
$base_url

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

Метод Описание
dispatch_request ( ) Handle the requested action by firing off the matched handler action(s)
get_action ( ) : string Returns the action
get_base_url ( ) : string Returns the base URL
get_full_url ( ) : string Returns the full requested URL
get_handler ( ) : ActionHandler Returns the action handler
get_handler_vars ( ) : array Returns the action handler's variables
get_matched_rule ( ) : RewriteRule | null A convenience method for returning the rewrite rule that matches the requested URL
get_request_obj ( ) : stdClass Get an object that represents the request made
get_stub ( ) : string Returns the stub in its entirety
get_var ( string $name, mixed $default = null ) : mixed A convenience method for returning a handler variable (handler_var).
parse_request ( ) Parses the requested URL. Automatically translates URLs coming in from mod_rewrite and parses out any action and parameters in the slug.

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

Метод Описание
instance ( ) Enables singleton working properly

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

dispatch_request() публичный статический Метод

Handle the requested action by firing off the matched handler action(s)
public static dispatch_request ( )

get_action() публичный статический Метод

Returns the action
public static get_action ( ) : string
Результат string name of action

get_base_url() публичный статический Метод

Returns the base URL
public static get_base_url ( ) : string
Результат string base URL

get_full_url() публичный статический Метод

Returns the full requested URL
public static get_full_url ( ) : string
Результат string The full requested URL

get_handler() публичный статический Метод

Returns the action handler
public static get_handler ( ) : ActionHandler
Результат ActionHandler handler object

get_handler_vars() публичный статический Метод

Returns the action handler's variables
public static get_handler_vars ( ) : array
Результат array variables used by handler

get_matched_rule() публичный статический Метод

A convenience method for returning the rewrite rule that matches the requested URL
public static get_matched_rule ( ) : RewriteRule | null
Результат RewriteRule | null The rule that matches the requested URL

get_request_obj() публичный статический Метод

Get an object that represents the request made
public static get_request_obj ( ) : stdClass
Результат stdClass An object with properties named after rewrite rules, which are true if those rules were used to handle the current request

get_stub() публичный статический Метод

Returns the stub in its entirety
public static get_stub ( ) : string
Результат string the URL incoming stub

get_var() публичный статический Метод

This includes only parameters set on the url. The alternative to this, while possible to write, is just too long.
public static get_var ( string $name, mixed $default = null ) : mixed
$name string The name of the variable to return.
$default mixed A default value to return if the variable is not set.
Результат mixed The value of that variable in the handler

instance() защищенный статический Метод

Enables singleton working properly
protected static instance ( )

parse_request() публичный статический Метод

Parses the requested URL. Automatically translates URLs coming in from mod_rewrite and parses out any action and parameters in the slug.
public static parse_request ( )

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

$base_url публичное свойство

public $base_url