Documentation

PlayerPage extends Page
in package

AbstractYes

A container that holds data needed to create a new page.

Table of Contents

Properties

$allowAjax  : bool
Used to allow a page to be processed from an AJAX call.
$file  : string
Template file associated with page (for display pages only).
$skipRedirect  : bool
Used to skip redirect hooks at the beginning of page processing.
$underAttack  : bool
Storage to remember if we need to display the Under Attack message.

Methods

build()  : void
getLandingPage()  : self
Returns the default display page when in or out of a game.
go()  : never
Forward to the page identified by this container.
href()  : string
Create an HREF (based on a random SN) to link to this page.
isLinkReusable()  : bool
Defines if the page is is always available, or if it is invalid after one use (i.e. if you get a back button error when navigating back to it).
process()  : void
Process this page by executing the associated file.
showUnderAttack()  : bool
Determine if we should show the player that they are under attack, since it needs to persist across ajax updates.

Properties

$allowAjax

Used to allow a page to be processed from an AJAX call.

public bool $allowAjax = false

$file

Template file associated with page (for display pages only).

public string $file = ''

$skipRedirect

Used to skip redirect hooks at the beginning of page processing.

public bool $skipRedirect = false

$underAttack

Storage to remember if we need to display the Under Attack message.

protected bool $underAttack = false

Methods

getLandingPage()

Returns the default display page when in or out of a game.

public static getLandingPage([string|null $msg = null ]) : self
Parameters
$msg : string|null = null
Return values
self

go()

Forward to the page identified by this container.

public go() : never
Return values
never

href()

Create an HREF (based on a random SN) to link to this page.

public href([bool $forceFullURL = false ]) : string

The container is saved in the Smr\Session under this SN so that on the next request, we can grab the container out of the Smr\Session.

Parameters
$forceFullURL : bool = false
Return values
string

isLinkReusable()

Defines if the page is is always available, or if it is invalid after one use (i.e. if you get a back button error when navigating back to it).

public isLinkReusable() : bool

Only relevant to pages stored as links in the session.

Return values
bool

process()

Process this page by executing the associated file.

public process() : void

showUnderAttack()

Determine if we should show the player that they are under attack, since it needs to persist across ajax updates.

public showUnderAttack(AbstractPlayer $player, bool $ajax) : bool
Parameters
$player : AbstractPlayer
$ajax : bool
Return values
bool

        
On this page

Search results