Documentation

TestingVariadicPresenter extends VariadicPresenter
in package

Presenter class for testing purposes

Tags
author

Dodonov A.A.

Table of Contents

$wasCalled  : bool
Flag was presenter executed
$configKey  : string
Config key to read presenter 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
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
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
presenterResult2()  : void
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
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 presenter settings

protected string $configKey = 'testing-variadic-presenter'

$localPresenter

Local presenter class name

protected string $localPresenter = MezonApplicationPresenter::class

$remotePresenter

Remote presenter class name

protected string $remotePresenter = MezonApplicationTestsTestingPresenter::class

$successMessage

Method sets success message

private string $successMessage = ''

Methods

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

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