Class: I2CE FieldContainer Factory (4.1.7)
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.1.7-release
- 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 375
- 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 446
- 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 221
- 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 379
- Signature: public function cleanup()
clearFieldData()
Clear out the loaded field data because it may be out of date.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 209
- Signature: public function clearFieldData($name)
- Parameters:
- $name
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 244
- 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
createContainersFromPost()
Create all containers of the given name from the post variables
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 339
- Signature: public function createContainersFromPost($post,$name,$populate_on_set_id,$skip_ids)
- Parameters:
- Returns: array
of I2CE_FieldContainer
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
getContainerIndex()
Get the container's index. Either of the form "$id" or "0:$counter" @var I2CE_FieldContianer $containerObj
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 308
- Signature: public function getContainerIndex($containerObj)
- Parameters:
- $containerObj
- Returns: string
or null on failure
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 455
- 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.
getHTMLName()
Get the HTMLName for the container obj. Either of the form "$id" or "0:$counter" @var I2CE_FieldContianer $containerObj
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer_Factory.php on line 292
- Signature: public function getHTMLName($containerObj)
- Parameters:
- $containerObj
- Returns: string
or null on failure
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 229
- 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 402
- 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()