PHP Class Pocket, addons

Afficher le fichier Open project: vanilla/addons Class Usage Examples

Méthodes publiques

Свойство Type Description
$Body $var string The text to display in the pocket.
$Disabled Whether or not the pocket is disabled. The pocket can also be in testing-mode.
$EmbeddedNever $var bool Whether to disable the pocket for embedded comments. *
$Format The format of the pocket.
$Location $var string The location on the page to display the pocket.
$MobileNever $var array The repeat frequency.
$MobileOnly $var array The repeat frequency.
$Name $var string A descriptive name for the pocket to help keep it organized.
$NameTranslations array
$Page $var string The name of the page to put the pocket on.
$RepeatFrequency $var array The repeat frequency.
$RepeatType $var string How the pocket repeats on the page.
$ShowInDashboard boolean
$Type $var string Pocket type

Méthodes publiques

Méthode Description
__construct ( string $Location = '' ) Pocket constructor.
canRender ( array $Data ) : boolean Whether or not this pocket should be processed based on its state.
isAd ( ) : boolean Determine whether the pocket is of type 'ad'.
load ( array $Data ) Load the pocket's data from an array.
pageName ( null $NameOrObject = null ) : mixed | null | string
parseRepeat ( $Repeat ) : array
render ( array $Data = NULL ) Render the pocket to the page.
repeat ( string $Type, integer | array $Frequency ) Set the repeat of the pocket.
toString ( null $Data = NULL ) : mixed | string
touch ( $Name, $Value )

Method Details

__construct() public méthode

Pocket constructor.
public __construct ( string $Location = '' )
$Location string

canRender() public méthode

Whether or not this pocket should be processed based on its state.
public canRender ( array $Data ) : boolean
$Data array Data specific to the request.
Résultat boolean

isAd() public méthode

Determine whether the pocket is of type 'ad'.
public isAd ( ) : boolean
Résultat boolean

load() public méthode

Load the pocket's data from an array.
public load ( array $Data )
$Data array

pageName() public static méthode

public static pageName ( null $NameOrObject = null ) : mixed | null | string
$NameOrObject null
Résultat mixed | null | string

parseRepeat() public static méthode

public static parseRepeat ( $Repeat ) : array
$Repeat
Résultat array

render() public méthode

@param array $Data additional data for the pocket.
public render ( array $Data = NULL )
$Data array

repeat() public méthode

@param string $Type The repeat type, contained in the various Pocket::REPEAT_* constants. - every: Repeats every x times. If $Frequency is an array then it will be interpretted as array($Frequency, $Begin). - indexes: Renders only at the given indexes, starting at 1.
public repeat ( string $Type, integer | array $Frequency )
$Type string
$Frequency integer | array The frequency of the repeating, see the $Type parameter for how this works.

toString() public méthode

public toString ( null $Data = NULL ) : mixed | string
$Data null
Résultat mixed | string

touch() public static méthode

public static touch ( $Name, $Value )
$Name
$Value

Property Details

$Body public_oe property

$var string The text to display in the pocket.
public $Body

$Disabled public_oe property

Whether or not the pocket is disabled. The pocket can also be in testing-mode.
public $Disabled

$EmbeddedNever public_oe property

$var bool Whether to disable the pocket for embedded comments. *
public $EmbeddedNever

$Format public_oe property

The format of the pocket.
public $Format

$Location public_oe property

$var string The location on the page to display the pocket.
public $Location

$MobileNever public_oe property

$var array The repeat frequency.
public $MobileNever

$MobileOnly public_oe property

$var array The repeat frequency.
public $MobileOnly

$Name public_oe property

$var string A descriptive name for the pocket to help keep it organized.
public $Name

$NameTranslations public_oe static_oe property

public static array $NameTranslations
Résultat array

$Page public_oe property

$var string The name of the page to put the pocket on.
public $Page

$RepeatFrequency public_oe property

$var array The repeat frequency.
public $RepeatFrequency

$RepeatType public_oe property

$var string How the pocket repeats on the page.
public $RepeatType

$ShowInDashboard public_oe property

public bool $ShowInDashboard
Résultat boolean

$Type public_oe property

$var string Pocket type
public $Type