Documentation

VariadicPresenter extends Presenter
in package

Base class for all controllers

Table of Contents

$configKey  : string
Config key to read settings
$localPresenter  : string
Local presenter class name
$remotePresenter  : string
Remote presenter class name
$errorCode  : int
Error code
$errorMessage  : string
Error message
$presenterName  : string
Presenter's name
$realPresenter  : Presenter|null
Real presenter
$requestParams  : RequestParams|null
Request params fetcher
$successMessage  : string
Method sets success message
$view  : ViewInterface|null
View object
__construct()  : mixed
Constructor
getErrorCode()  : int
{@inheritdoc}
getErrorMessage()  : string
{@inheritdoc}
getParamsFetcher()  : RequestParamsInterface
Method return $requestParams and thrown exception if it was not set
getPresenterName()  : string
Method returns presenter's name
getRealPresenter()  : Presenter
Method returns real presenter
getRequestParamsFetcher()  : RequestParamsInterface
Method returns $this->requestParams and creates this object if necessery
getSuccessMessage()  : string
Method return success message
getViewParameter()  : mixed
Method gets view's var
run()  : mixed
Method runs controller
setErrorCode()  : void
{@inheritdoc}
setErrorMessage()  : void
{@inheritdoc}
setErrorMessageContent()  : void
Method sets last error message
setPresenterName()  : void
Method sets presenter's name
setRealPresenter()  : void
Method sets real presenter
setSuccessMessage()  : void
Method sets success message
setSuccessMessageContent()  : void
Method sets success message content
setViewParameter()  : void
Method sets view's var
setupRealPresenter()  : void
Method setups real presenter

Properties

$configKey

Config key to read settings

protected string $configKey = 'variadic-presenter-config-key'

$localPresenter

Local presenter class name

protected string $localPresenter = MezonApplicationPresenter::class

$remotePresenter

Remote presenter class name

protected string $remotePresenter = MezonApplicationPresenter::class

$successMessage

Method sets success message

private string $successMessage = ''

Methods

getParamsFetcher()

Method return $requestParams and thrown exception if it was not set

public getParamsFetcher() : RequestParamsInterface
Tags
deprecated

since 2020-07-06 use getRequestParamsFetcher

codeCoverageIgnore
Return values
RequestParamsInterface

request params fetcher

getPresenterName()

Method returns presenter's name

public getPresenterName() : string
Return values
string

presenter's name

getSuccessMessage()

Method return success message

public getSuccessMessage() : string
Return values
string

success message

getViewParameter()

Method gets view's var

public getViewParameter(string $name) : mixed
Parameters
$name : string

var name

Return values
mixed

view's variable

run()

Method runs controller

public run([string $presenterName = '' ]) : mixed
Parameters
$presenterName : string = ''
Return values
mixed

result of the controller

setErrorMessageContent()

Method sets last error message

public setErrorMessageContent(string $errorMessage) : void
Parameters
$errorMessage : string

last error message

Return values
void

setPresenterName()

Method sets presenter's name

public setPresenterName(string $presenterName) : void
Parameters
$presenterName : string
Return values
void

setRealPresenter()

Method sets real presenter

public setRealPresenter(Presenter|null $presenter) : void
Parameters
$presenter : Presenter|null
Return values
void

setSuccessMessage()

Method sets success message

public setSuccessMessage( $successMessage) : void
Parameters
$successMessage :

string message

Return values
void

setSuccessMessageContent()

Method sets success message content

public setSuccessMessageContent( $successMessage) : void
Parameters
$successMessage :

string message

Return values
void

setViewParameter()

Method sets view's var

public setViewParameter(string $name, mixed $value[, bool $setTemplateVar = true ]) : void
Parameters
$name : string

var name

$value : mixed

var value

$setTemplateVar : bool = true

do we need to set template parameter

Return values
void

setupRealPresenter()

Method setups real presenter

protected setupRealPresenter(string $configKey, PresenterInterface|null $presenter, string $localPresenterClassName, string $remotePresenterClassName[, array<string|int, mixed> $constructorParameters = [] ]) : void
Parameters
$configKey : string

config key

$presenter : PresenterInterface|null

presneter object

$localPresenterClassName : string

local presenter class name

$remotePresenterClassName : string

remote presenter class name

$constructorParameters : array<string|int, mixed> = []

constructor parameters

Return values
void

Search results

    Яндекс.Метрика