\Hazaar\Model
Email
Email Address Strict Model

This is a simple model that enforces the format of an email address.

It currently has a single field called ‘address’ that is used to validate the email address format.

Tags

Author

Jamie Carl <[email protected]>

Since

2.2

Summary
Methods Properties Constants
ake
get
has
key
set
No constants
Properties
Inherited
$__label
$__label
Inherited
$allow_undefined
$allow_undefined
Inherited
$convert_nulls
$convert_nulls
Inherited
$current
$current
The current value for array access returned by each()
Inherited
$disable_callbacks
$disable_callbacks
Inherited
$fields
$fields
Inherited
$ignore_undefined
$ignore_undefined
Inherited
$values
$values
Methods
__construct()
__construct($data)

Parameters

$data

No description

__toString()
__toString()
init()
init() : array[]
Initialise the model.

Returns

array[]
Inherited
__set()
__set($key, $value)

Parameters

$key

No description

$value

No description

Inherited
ake()
ake($key, $default = null, $non_empty = false)

Parameters

$key

No description

$default

No description

$non_empty

No description

Inherited
append()
append($key, $item)
Append an element to an array item

Parameters

$keymixed

No description

$itemmixed

No description

Inherited
convertType()
convertType($value, $type)

Parameters

$value

No description

$type

No description

Inherited
count()
count() : int
Returns the number of fields stored in the model.

Tags

Since

1.3.0

Returns

int
Inherited
current()
current()

Return the current element in the Map

Tags

Since

1.0.0

Inherited
exportHMV()
exportHMV($ignore_empty = false, $export_all = false, $obj = null) : array
Export the mdel in HazaarModelView format for easy display in views.

Tags

Since

2.0.0

Parameters

$ignore_empty

No description

$export_all

No description

$obj

No description

Returns

array

The array of values stored in the model in key => (label, value) tuples. Returns NULL if model is empty.

Inherited
extend()
extend($values, $run_callbacks = true, $ignore_keys = null)

Parameters

$values

No description

$run_callbacks

No description

$ignore_keys

No description

Inherited
get()
get($key, $run_callbacks = true)

Parameters

$key

No description

$run_callbacks

No description

Inherited
getDefinition()
getDefinition($key)

Parameters

$key

No description

Inherited
getType()
getType($key)

Parameters

$key

No description

Inherited
has()
has($key)

Parameters

$key

No description

Inherited
isObject()
isObject($key)

Parameters

$key

No description

Inherited
key()
key()

Return the current key from the Map

Tags

Since

1.0.0

Inherited
label()
label()
Inherited
loadDefinition()
loadDefinition($field_definition)

Parameters

$field_definitionarray

No description

Inherited
next()
next()

Move to the next element in the Map

Tags

Since

1.0.0

Inherited
offsetExists()
offsetExists($offset)
Array Access Methods

Parameters

$offset

No description

Inherited
offsetGet()
offsetGet($offset)

Parameters

$offset

No description

Inherited
offsetSet()
offsetSet($offset, $value)

Parameters

$offset

No description

$value

No description

Inherited
offsetUnset()
offsetUnset($offset)

Parameters

$offset

No description

Inherited
populate()
populate($data, $exec_filters = false)

Parameters

$data

No description

$exec_filters

No description

Inherited
prepare()
prepare($data)

Parameters

$data

No description

Inherited
rewind()
rewind()

Set the internal pointer the first element

Tags

Since

1.0.0

Inherited
set()
set($key, $value, $run_callbacks = true)

Parameters

$key

No description

$value

No description

$run_callbacks

No description

Inherited
toArray()
toArray($disable_callbacks = false, $depth = null, $show_hidden = false)
Convert data into an array

If field values are Strict models, then convert them to arrays as well.

Tags

Since

1.0.0

Parameters

$disable_callbacks

No description

$depth

No description

$show_hidden

No description

Inherited
valid()
valid()

Test that an element exists at the current internal pointer position

Tags

Since

1.0.0