PHP Mini Documentation

AttributeBag extends Stringable

PHP Mini Framework

Tags
copyright

busarm.com

license

https://github.com/Busarm/php-mini/blob/master/LICENSE (MIT License)

codeCoverageIgnore

Table of Contents

all()  : array<string|int, mixed>
Get all attributes
clear()  : void
Remove all attribute
get()  : mixed
Get attribute
has()  : bool
Checks if an attribute exists
pull()  : mixed
Pull attribute: Get and delete
remove()  : void
Remove attribute
replace()  : void
Set bulk attributes
set()  : bool
Set attribute

Methods

all()

Get all attributes

public all() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>

clear()

Remove all attribute

public clear() : void
Tags
Return values
void

get()

Get attribute

public get(string $name[, mixed $default = null ]) : mixed
Parameters
$name : string
$default : mixed = null
Tags
Return values
mixed

has()

Checks if an attribute exists

public has(string $name) : bool
Parameters
$name : string
Tags
Return values
bool

pull()

Pull attribute: Get and delete

public pull(string $name[, mixed $default = null ]) : mixed
Parameters
$name : string
$default : mixed = null
Tags
Return values
mixed

remove()

Remove attribute

public remove(string $name) : void
Parameters
$name : string
Tags
Return values
void

replace()

Set bulk attributes

public replace(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>
Tags
Return values
void

set()

Set attribute

public set(string $name, mixed $value[, mixed $options = NULL ]) : bool
Parameters
$name : string
$value : mixed
$options : mixed = NULL
Tags
Return values
bool

        

Search results