Constants

STRICT

STRICT

Throw exception on duplicate.

REPLACE

REPLACE

Replace/override on duplicate.

IGNORE

IGNORE

Keep first/ignore on duplicate.

ALL

ALL

Keep all.

Properties

$name

$name : string

Entity name stored.

Type

string

$mode

$mode : integer

Duplicate mode.

Type

integer

$modes

$modes : array

Available modes.

Type

array

$identify

$identify : string

Identity callback to name an entity.

Type

string

Methods

__construct()

__construct(  $name = 'entity',   $mode = self::STRICT,   $identify = 'getName') 

Parameters

$name
$mode
$identify

setMode()

setMode(  $mode) 

Parameters

$mode

addMode()

addMode(  $mode,   $handler) 

Parameters

$mode
$handler

identifyEntity()

identifyEntity(  $entity) 

Parameters

$entity

isDuplicateEntity()

isDuplicateEntity(  $entity) 

Parameters

$entity

attach()

attach(  $object,   $data = null) 

Parameters

$object
$data

findAllByName()

findAllByName(  $name) 

Parameters

$name

findFirstByName()

findFirstByName(  $name) 

Parameters

$name

attachStrictMode()

attachStrictMode(self  $storage,   $entity) 

Parameters

self $storage
$entity

attachReplaceMode()

attachReplaceMode(self  $storage,   $entity) 

Parameters

self $storage
$entity

attachIgnoreMode()

attachIgnoreMode(self  $storage,   $entity) 

Parameters

self $storage
$entity

attachAllMode()

attachAllMode()