PHP Класс Pocket, addons

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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

Открытые методы

Метод Описание
__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 )

Описание методов

__construct() публичный Метод

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

canRender() публичный Метод

Whether or not this pocket should be processed based on its state.
public canRender ( array $Data ) : boolean
$Data array Data specific to the request.
Результат boolean

isAd() публичный Метод

Determine whether the pocket is of type 'ad'.
public isAd ( ) : boolean
Результат boolean

load() публичный Метод

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

pageName() публичный статический Метод

public static pageName ( null $NameOrObject = null ) : mixed | null | string
$NameOrObject null
Результат mixed | null | string

parseRepeat() публичный статический Метод

public static parseRepeat ( $Repeat ) : array
$Repeat
Результат array

render() публичный Метод

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

repeat() публичный Метод

@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 toString ( null $Data = NULL ) : mixed | string
$Data null
Результат mixed | string

touch() публичный статический Метод

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

Описание свойств

$Body публичное свойство

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

$Disabled публичное свойство

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

$EmbeddedNever публичное свойство

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

$Format публичное свойство

The format of the pocket.
public $Format

$Location публичное свойство

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

$MobileNever публичное свойство

$var array The repeat frequency.
public $MobileNever

$MobileOnly публичное свойство

$var array The repeat frequency.
public $MobileOnly

$Name публичное свойство

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

$NameTranslations публичное статическое свойство

public static array $NameTranslations
Результат array

$Page публичное свойство

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

$RepeatFrequency публичное свойство

$var array The repeat frequency.
public $RepeatFrequency

$RepeatType публичное свойство

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

$ShowInDashboard публичное свойство

public bool $ShowInDashboard
Результат boolean

$Type публичное свойство

$var string Pocket type
public $Type