final class Button implements ButtonInterface

Properties

protected Since: 5.0.0
$name

Button name, CMD string.

protected Since: 5.0.0
$props

Button properties.

protected Since: 5.0.0
$options

Button options.

Methods

__construct(string $name, array $props = [], array $options = [])

Class constructor;

string
getButtonName()

Return Button name, CMD string.

mixed
get(string $name, string $default = null)

Return Button property.

set(string $name, mixed $value)

Set Button property.

array
getOptions()

Return Button options.

setOptions(array $options)

Set Button options.

string|null
__get(string $name) deprecated

Magic method to access a property.

void
__set(string $name, mixed $value) deprecated

Magic method to access property.

Details

__construct(string $name, array $props = [], array $options = [])

Since: 5.0.0

Class constructor;

Parameters

string $name

The button name

array $props

The button properties.

array $options

The button options.

string getButtonName()

Since: 5.0.0

Return Button name, CMD string.

Return Value

string

mixed get(string $name, string $default = null)

Since: 5.0.0

Return Button property.

Parameters

string $name

Property name

string $default

Default value

Return Value

mixed

ButtonInterface set(string $name, mixed $value)

Since: 5.0.0

Set Button property.

Parameters

string $name

Property name

mixed $value

Property value

Return Value

ButtonInterface

array getOptions()

Since: 5.0.0

Return Button options.

Return Value

array

ButtonInterface setOptions(array $options)

Since: 5.0.0

Set Button options.

Parameters

array $options

The button options.

Return Value

ButtonInterface

string|null __get(string $name) deprecated

Since: 5.0.0

deprecated 6.0 This is a B/C proxy for deprecated read accesses

Magic method to access a property.

Parameters

string $name

The name of the property.

Return Value

string|null

A value if the property name is valid, null otherwise.

void __set(string $name, mixed $value) deprecated

Since: 5.0.0

deprecated 6.0 This is a B/C proxy for deprecated write accesses

Magic method to access property.

Parameters

string $name

The name of the property.

mixed $value

The value of the property.

Return Value

void