\Phile\ModelAbstractModel

Abstract model which implements the ArrayAccess interface

Summary

Methods
Properties
Constants
get()
getAll()
set()
__get()
__set()
__call()
offsetExists()
offsetGet()
offsetSet()
offsetUnset()
No public properties found
No constants found
No protected methods found
$data
N/A
No private methods found
No private properties found
N/A

Properties

$data

$data :array

Type

array—the storage

Methods

get()

get(string  $key): null|mixed

get value for given key

Parameters

string $key

Returns

null|mixed

getAll()

getAll(): array

get all entries

Returns

array

set()

set(string  $key,mixed  $value)

set value for given key

Parameters

string $key

the key

mixed $value

the value

__get()

__get(string  $name): null|mixed

magic method to get value

Parameters

string $name

Returns

null|mixed

__set()

__set(string  $name,mixed  $value)

magic method to set value

Parameters

string $name
mixed $value

__call()

__call(string  $name,array  $args): mixed|null|void

magic method to access properties by getter / setter

Parameters

string $name

the name of method

array $args

the arguments of the method

Returns

mixed|null|void

offsetExists()

offsetExists(mixed  $offset): boolean

(PHP 5 >= 5.0.0) Whether a offset exists

Parameters

mixed $offset

An offset to check for.

Returns

boolean —

true on success or false on failure. The return value will be casted to boolean if non-boolean was returned.

offsetGet()

offsetGet(mixed  $offset): mixed

(PHP 5 >= 5.0.0) Offset to retrieve

Parameters

mixed $offset

The offset to retrieve.

Returns

mixed —

Can return all value types.

offsetSet()

offsetSet(mixed  $offset,mixed  $value): void

(PHP 5 >= 5.0.0) Offset to set

Parameters

mixed $offset

The offset to assign the value to.

mixed $value

The value to set.

offsetUnset()

offsetUnset(mixed  $offset): void

(PHP 5 >= 5.0.0) Offset to unset

Parameters

mixed $offset

The offset to unset.