MetaFox

TraitAttributeBag

Trait PropertyBagTrait.

Tags
protected

<string,string> $named

protected

<string,mixed> $attributes

protected

<string,mixed> $defaultProperties

Table of Contents

Properties

$attributes  : array<string, mixed|null>

Methods

__call()  : self|mixed|string|null
config()  : $this
This method is deprecated. Prefer `setAttributes` to be safe.
getAttribute()  : mixed|null
removeAttribute()  : $this
Remove an attribute by specific name.
setAttribute()  : $this
Set attribute name/value pair.
setAttributes()  : self

Properties

Methods

__call()

public __call(string $method, array<int, mixed> $args) : self|mixed|string|null
Parameters
$method : string
$args : array<int, mixed>
Return values
self|mixed|string|null

config()

This method is deprecated. Prefer `setAttributes` to be safe.

public config(array<string, mixed> $options) : $this
Parameters
$options : array<string, mixed>
Tags
deprecated
Return values
$this

getAttribute()

public getAttribute(string $name[, mixed $value = null ]) : mixed|null
Parameters
$name : string
$value : mixed = null
Return values
mixed|null

removeAttribute()

Remove an attribute by specific name.

public removeAttribute(string $name) : $this
Parameters
$name : string
Return values
$this

setAttribute()

Set attribute name/value pair.

public setAttribute(string $name, mixed|null $value) : $this
Parameters
$name : string
$value : mixed|null
Return values
$this

setAttributes()

public setAttributes(array<string|int, mixed> $attributes) : self
Parameters
$attributes : array<string|int, mixed>
Return values
self

        
On this page

Search results