Documentation

Presenter extends AbstractPresenter
in package

Base class for all controllers

Table of Contents

$errorCode  : int
Error code
$errorMessage  : string
Error message
$presenterName  : string
Presenter's name
$requestParams  : RequestParams|null
Request params fetcher
$successMessage  : string
Method sets success message
$view  : ViewInterface|null
View object
__construct()  : mixed
Constructor
getErrorCode()  : int
Method returns code of the last error
getErrorMessage()  : string
Method return last error description
getParamsFetcher()  : RequestParamsInterface
Method return $requestParams and thrown exception if it was not set
getPresenterName()  : string
Method returns presenter's name
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
Method sets code of the last error
setErrorMessage()  : void
Method sets last error description
setErrorMessageContent()  : void
Method sets last error message
setPresenterName()  : void
Method sets presenter's name
setSuccessMessage()  : void
Method sets success message
setSuccessMessageContent()  : void
Method sets success message content
setViewParameter()  : void
Method sets view's var

Properties

$successMessage

Method sets success message

private string $successMessage = ''

Methods

__construct()

Constructor

public __construct([ViewInterface $view = null ][, string $presenterName = '' ][, RequestParams|null $requestParams = null ]) : mixed
Parameters
$view : ViewInterface = null

view object

$presenterName : string = ''

Presenter name to be executed

$requestParams : RequestParams|null = null

request params fetcher

Return values
mixed

getErrorCode()

Method returns code of the last error

public getErrorCode() : int
Return values
int

code of the last error

getErrorMessage()

Method return last error description

public getErrorMessage() : string
Return values
string

last error description

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

setErrorCode()

Method sets code of the last error

public setErrorCode(int $errorCode) : void
Parameters
$errorCode : int
Return values
void

setErrorMessage()

Method sets last error description

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

last error description

Return values
void

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

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

Search results

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