PHP Класс App\Core\Controller

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

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

Свойство Тип Описание
$layout string The currently used Layout.
$template string The currently used Template.

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

Метод Описание
__construct ( ) Create a new Controller instance.
getLayout ( string | null $layout = null, array $data = [] ) : Template\Template | View\View Return a Layout instance.
getLayoutName ( ) : string Return the current Layout (class) name.
getTemplate ( ) : string Return the current Template name.

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

Метод Описание
getView ( array $data = [] ) : Nova\View\View Return a default View instance.
processResponse ( mixed $response ) : Response Create from the given result a Response instance and send it.

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

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

Create a new Controller instance.
public __construct ( )

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

Return a Layout instance.
public getLayout ( string | null $layout = null, array $data = [] ) : Template\Template | View\View
$layout string | null
$data array
Результат Template\Template | View\View

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

Return the current Layout (class) name.
public getLayoutName ( ) : string
Результат string

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

Return the current Template name.
public getTemplate ( ) : string
Результат string

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

Return a default View instance.
protected getView ( array $data = [] ) : Nova\View\View
$data array
Результат Nova\View\View

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

Create from the given result a Response instance and send it.
protected processResponse ( mixed $response ) : Response
$response mixed
Результат Symfony\Component\HttpFoundation\Response

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

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

The currently used Layout.
protected string $layout
Результат string

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

The currently used Template.
protected string $template
Результат string