PHP Класс Twitter\Widgets\Buttons\PeriscopeOnAir

С версии: 1.3.0
Наследование: extends Twitter\Widgets\BaseWidget
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$ALLOWED_SIZES Allowed values for the size property

Защищенные свойства (Protected)

Свойство Тип Описание
$size Size of the button
$username Periscope username

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

Метод Описание
__construct ( $username, $validate = true ) Require username
fromArray ( array $options ) : __CLASS__ Build a Periscope On Air object from an associative array
getUsername ( ) : string Retrieve the stored Periscope username
getWebProfileURL ( ) : Periscope Build a Periscope web profile URL
setSize ( string $size ) : __CLASS__ Set the desired size of the On Air button
toArray ( ) : array Convert the class object into an array, removing default field values
toHTML ( string $html_builder_class = '\Twitter\Helpers\HTMLBuilder' ) : string Generate a link to a Periscope web profile configured for enhancement by the Twitter for Websites JavaScript

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

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

Require username
С версии: 1.3.0
public __construct ( $username, $validate = true )

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

Build a Periscope On Air object from an associative array
С версии: 1.3.0
public static fromArray ( array $options ) : __CLASS__
$options array associative array of options { @type string option name @type string option value }
Результат __CLASS__ support chaining

getUsername() публичный метод

Retrieve the stored Periscope username
С версии: 1.3.0
public getUsername ( ) : string
Результат string Periscope username or empty string if username not set

getWebProfileURL() публичный метод

Build a Periscope web profile URL
С версии: 1.3.0
public getWebProfileURL ( ) : Periscope
Результат Periscope web profile URL or empty string if username not set

setSize() публичный метод

Set the desired size of the On Air button
С версии: 1.3.0
public setSize ( string $size ) : __CLASS__
$size string button size
Результат __CLASS__ support chaining

toArray() публичный метод

Convert the class object into an array, removing default field values
С версии: 1.3.0
public toArray ( ) : array
Результат array properties as associative array

toHTML() публичный метод

Generate a link to a Periscope web profile configured for enhancement by the Twitter for Websites JavaScript
С версии: 1.3.0
public toHTML ( string $html_builder_class = '\Twitter\Helpers\HTMLBuilder' ) : string
$html_builder_class string callable HTML builder with a static anchorElement class
Результат string HTML markup or empty string if minimum requirements not met

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

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

Allowed values for the size property
С версии: 1.3.0
public static $ALLOWED_SIZES

$size защищенное свойство

Size of the button
С версии: 1.3.0
protected $size

$username защищенное свойство

Periscope username
С версии: 1.3.0
protected $username