Class: I2CE FieldContainer Factory (Development)
This article describes the abstract class I2CE_FieldContainer_Factory .
- Extends the class: I2CE_Fuzzy.
- Child Classes:
- Location: Part of the module Fields in the package I2CE 4.0-dev
- Source: Defined in the file modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 30
- Author: Luke Duncan <lduncan@intrahealth.org>
- Since: v1.0.0
This factory is used to create instances of I2CE_Form objects from the form name.
Variables
$instance
The single instance of this class.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 35
- Type: static protected I2CE_FormFactory $instance
$meta
Array of meta attributes indexed by named container
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 177
- Type: protected array $meta
$fieldData
Array of meta attributes indexed by named container
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 183
- Type: protected array $fieldData
$containerCache
@var protected array $conatinerCache. An doubly indexed array of of {I2CE_FieldContainer}s with the first index being the name of the container and the second being the id
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 273
- Type: protected $containerCache
Methods
__construct()
Constructor
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 71
- Signature: protected function __construct()
_createContainer()
Worker method to create an instance of am I2CE_FieldContainer from the factory.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 319
- Signature: abstract protected function _createContainer($factory,$name,$id)
- Parameters:
- I2CE_FieldContainer_Factory $factory
- string $name
The name of the field container - string $id
The id of the field container. Defaults to '0'- Default Value: '0'
- Returns: I2CE_FieldContainer
or null on failure
_getFieldData()
Worker method et data needed to create all the fields in this field container
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 190
- Signature: abstract protected function _getFieldData($name)
- Parameters:
- string $name
The name of the container
- string $name
- Returns: array.
_loadMetaAttributes()
Worker method et data needed to create all the fields in this field container
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 211
- Signature: abstract protected function _loadMetaAttributes($name)
- Parameters:
- string $name
The name of the container
- string $name
- Returns: array.
cleanup()
Cleanup any field containers
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 277
- Signature: public function cleanup()
createContainer()
Return an instance of a I2CE_FieldContainer from the factory.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 234
- Signature: public function createContainer($nameId,$no_cache)
- Parameters:
- mixed $nameId
The a string which is either the name of the field container, the name and id in the form of "$name|$id" or an array with two elements, the first is a name and the second is an id - boolean $no_cache
Defaults to false. If true then we don't check the cache when the id is non-zero- Default Value: false
- mixed $nameId
- Returns: I2CE_FieldContianer
or null on failure
exists()
Checks to see if the given field container name has been registered.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 54
- Signature: abstract public function exists($name)
- Parameters:
- string $name
The name of the field container
- string $name
- Returns: boolean
getContainerType()
Return type of container this factory makes
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 66
- Signature: abstract public function getContainerType()
- Returns: string
getFieldData()
Get data needed to create all the fields in this field container
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 198
- Signature: public function getFieldData($name)
- Parameters:
- string $name
The name of the container
- string $name
- Returns: array.
getFieldNames()
Get the fields for the named container @param mixed $restict. Defaults to the empty array. If non-empty is data to restrict the field names returns.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 328
- Signature: public function getFieldNames($name,$restrictions)
- Parameters:
- string $name
the name of the form - $restrictions
- Default Value: array()
- string $name
- Returns: associative
array of string.
getMetaAttribute()
Return the meta value for a given meta attribute of the named field container
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 116
- Signature: public function getMetaAttribute($name,$key)
- Parameters:
- Returns: mixed
getNames()
get the available names for this field container
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 60
- Signature: abstract public function getNames()
- Returns: array
with values the field container names
hasMetaAttribute()
Return true if a given meta attribute exists for the named field container.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 149
- Signature: public function hasMetaAttribute($name,$key)
- Parameters:
- Returns: boolean;
instance()
Return the instance of this factory and create it if it doesn't exist.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 40
- Signature: static public function instance()
loadMetaAttributes()
Get data needed to create all the fields in this field container
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 219
- Signature: public function loadMetaAttributes($name)
- Parameters:
- string $name
The name of the container
- string $name
- Returns: array.
removeFromCache()
Remvoe a given I2CE_FieldContainer from the cache
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 293
- Signature: public function removeFromCache($containerObj)
- Parameters:
- I2CE_FieldContainer $containerObj
setMetaAttribute()
Set a meta attribtue for the named field container.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 83
- Signature: public function setMetaAttribute($name,$key,$value)
- Parameters:
Inherited Methods
_hasMethod()
This public method is inherited from I2CE_Fuzzy->_hasMethod()
Inherited Fuzzy Methods
userMessage()
This method is inherited from I2CE_Fuzzy->userMessage()