Class: TCloningFactory

TCloningFactory

The TCloningFactory is a kind a factory that performe instanciation by cloning a base instance.

new TCloningFactory(parameters)

Parameters:
Name Type Description
parameters
Author:
License:
Source:

Extends

Members


allowOverride

Inherited From:
Overrides:
Source:

collection

Inherited From:
Overrides:
Source:

keys

Inherited From:
Overrides:
Source:

keyValidators

Inherited From:
Overrides:
Source:

values

Inherited From:
Overrides:
Source:

valueValidators

Inherited From:
Overrides:
Source:

Methods


add(key, value, force)

Allow to add new key value pair, the key cannot be null, undefined, or an empty string. In case the key already exist, the value will be overwritten if force params is true or this allow overriding else it throw an TypeError.
Parameters:
Name Type Default Description
key *
value *
force Boolean false
Inherited From:
Overrides:
Source:
Returns:
The current instance (this)
Type
TStore

clear()

Clear the cache and reset collection to an empty object.
Inherited From:
Overrides:
Source:
Returns:
The current instance (this)
Type
TStore

contain(key)

Parameters:
Name Type Description
key
Inherited From:
Overrides:
Source:
Returns:
Type
boolean

create(key, parameters)

Parameters:
Name Type Argument Description
key
parameters <repeatable>
Overrides:
Source:
Returns:
Type
*

get(key)

Return the value associated to the key.
Parameters:
Name Type Description
key
Inherited From:
Overrides:
Source:
Returns:
Type
*

remove(key)

Remove to value from the cache. Does nothing if the key does not exist.
Parameters:
Name Type Description
key
Inherited From:
Overrides:
Source:
Returns:
The current instance (this)
Type
TStore

setAllowOverride(value)

Parameters:
Name Type Description
value
Inherited From:
Overrides:
Source:
Returns:
The current instance (this)
Type
TStore

setCollection(value)

Parameters:
Name Type Description
value
Inherited From:
Overrides:
Source:
Returns:
The current instance (this)
Type
TStore

setKeyValidators(value)

Parameters:
Name Type Description
value
Inherited From:
Overrides:
Source:
Returns:
The current instance (this)
Type
TStore

setValueValidators(value)

Parameters:
Name Type Description
value
Inherited From:
Overrides:
Source:
Returns:
The current instance (this)
Type
TStore