Class: I2CE FormStorage CSV (Development): Difference between revisions

From IHRIS Wiki
No edit summary
No edit summary
 
Line 1: Line 1:
{{otherversions|Class: I2CE_FormStorage_CSV}}
{{otherversions|Class: I2CE_FormStorage_CSV}}
This article describes the class ''I2CE_FormStorage_CSV'' .
This article describes the class ''I2CE_FormStorage_CSV'' .
*Extends the class: [[Class: I2CE_FormStorage_Mechanism (Development) | I2CE_FormStorage_Mechanism]].
*Extends the class: [[Class: I2CE_FormStorage_File_Base (Development) | I2CE_FormStorage_File_Base]].
*Location: Part of the module [[I2CE Module List (Development)#forms-storage-CSV|forms-storage-CSV]] in the package [https://launchpad.net/i2ce I2CE] 4.0-dev
*Location: Part of the module [[I2CE Module List (Development)#forms-storage-CSV|forms-storage-CSV]] in the package [https://launchpad.net/i2ce I2CE] 4.1-dev
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L33 modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 33
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L33 modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 33
*Author: Carl Leitner <litlfred@ibiblio.org>
*Author: Carl Leitner <litlfred@ibiblio.org>
*Since: v4.0.0
*Since: v4.0.0
@filesource Class I2CE_FormStorage_CSV
@filesource Class I2CE_FormStorage_CSV
==Variables==
==Variables==
===$mod_time===
of int, the unix style mod time of the sdmx file associated to the form which is the index.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L39 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 39
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $mod_time
===$closeCSV===
whether or not to close the file pointer for a CSV between access.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L60 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 60
*Type: protected [http://www.php.net/manual/en/language.types.boolean.php boolean ] $closeCSV
===$resources===
.  An array indexed by form names of file pointers.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L68 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 68
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $resources
===$locations===
Array of file offesset for an id for a given form.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L126 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 126
*Type: protected $locations
===$lastread_locations===
Array of file last read offets for a given form.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L132 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 132
*Type: protected $lastread_locations
===$field_indices===
===$field_indices===
The column indices for the fields .  Arrays indexed by form names of pairs $field=>$index
The column indices for the fields .  Arrays indexed by form names of pairs $field=>$index
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L320 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 320
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L88 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 88
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $field_indices
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $field_indices


==Methods==
==Methods==
===__construct()===
Construct this module class
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L48 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 48
*Signature: public function __construct($name,$options)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $name <br/>The name of this storage mechanism
** [http://www.php.net/manual/en/language.types.array.php array ] $options
***Default Value: array()
===closeCSV()===
Tries to get the filepointer  for the CSV file
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L115 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 115
*Signature: protected function closeCSV($form)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $form
*Returns: [http://www.php.net/manual/en/language.types.resource.php resource ]
===ensureIndices()===
===ensureIndices()===
Ensures that the column indices for the fields are set.
Ensures that the column indices for the fields are set.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L328 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 328
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L170 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 170
*Signature: protected function ensureIndices($fp,$form)
*Signature: protected function ensureIndices($form,$header_line)
*Parameters:
*Parameters:
** [http://www.php.net/manual/en/language.types.resource.php resource ] $fp
** [http://www.php.net/manual/en/language.types.string.php string ] $form
** [http://www.php.net/manual/en/language.types.string.php string ] $form
**$header_line
*Returns: true<br/>on success
*Returns: true<br/>on success
===getCSV()===
===ensureLocations()===
Tries to get the filepointer  for the CSV file
Worker moethod to the offset in the CSV file for the specified form id and store it into the {$locations} cache. Reads through the file until the specified is found.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L75 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 75
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L96 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 96
*Signature: protected function getCSV($form)
*Signature: protected function ensureLocations($form)
*Parameters:
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $form
** [http://www.php.net/manual/en/language.types.string.php string ] $form
*Returns: [http://www.php.net/manual/en/language.types.resource.php resource ]
===getFormData()===
===getCSVData()===
Reads a line of data from ta CSV filestring an array of readable and enabled datavalues from the CSV indexed by the field names, 'id' and 'parent' @param resource $fp
Reads a line of data from ta CSV file pointer and returns it as an array of readable and enabled datavalues from the CSV indexed by the field names, 'id' and 'parent'
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L52 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 52
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L268 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 268
*Signature: protected function getFormData($form,$line)
*Signature: protected function getCSVData($fp,$form)
*Parameters:
*Parameters:
** [http://www.php.net/manual/en/language.types.resource.php resource ] $fp
** [http://www.php.net/manual/en/language.types.string.php string ] $form
** [http://www.php.net/manual/en/language.types.string.php string ] $form
**$line
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>array on success, false on failure
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>array on success, false on failure
===getFileLocation()===
===getLocationId()===
Get the offset in the CSV file for the specified form object
Get the id associated to the given location data object
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L143 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 143
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L131 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 131
*Signature: protected function getFileLocation($formName,$id)
*Signature: protected function getLocationId($form,$line,$count)
*Parameters:
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $formName @params string $id
**$id
*Returns: [http://www.php.net/manual/en/language.types.integer.php int ]<br/>on success, false on failure.
===getFileLocations()===
Worker moethod to  the offset in the CSV file for the specified form id and store it into the {$locations} cache. Reads through the file until the specified is found. @param resource $p
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L161 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 161
*Signature: protected function getFileLocations($fp,$form,$id)
*Parameters:
**$fp
** [http://www.php.net/manual/en/language.types.string.php string ] $form
** [http://www.php.net/manual/en/language.types.string.php string ] $form
** [http://www.php.net/manual/en/language.types.string.php string ] $id <br/>If false we get all of the file locations
** [http://www.php.net/manual/en/language.types.string.php string ] $line @param int count
*Returns: [http://www.php.net/manual/en/language.types.integer.php int ]<br/>on success, false on failure.
**$count
===getFormData()===
*Returns: string.<br/>'0' or null  on failure a string on success.
Gets the form data for a specified form as an array of readable and enabled datavalues from the CSV indexed by the field names, 'id' and 'parent'
===getSearchCategory()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L240 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 240
Get the search category
*Signature: protected function getFormData($form,$id)
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L40 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 40
*Signature: protected function getSearchCategory($form)
*Parameters:
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $form
** [http://www.php.net/manual/en/language.types.string.php string ] $form
** [http://www.php.net/manual/en/language.types.string.php string ] $id
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]<br/>or false on failure
==Inherited Methods==
===getFile()===
This public method is inherited from [[Class: I2CE_FormStorage_File_Base (Development)#getFile() | I2CE_FormStorage_File_Base->getFile()]]
 
===getFileData()===
This public method is inherited from [[Class: I2CE_FormStorage_File_Base (Development)#getFileData() | I2CE_FormStorage_File_Base->getFileData()]]
 
===getFileModTime()===
This public method is inherited from [[Class: I2CE_FormStorage_File_Base (Development)#getFileModTime() | I2CE_FormStorage_File_Base->getFileModTime()]]
 
===getRecords()===
===getRecords()===
Return an array of all the record ids for a given form.
This public method is inherited from [[Class: I2CE_FormStorage_File_Base (Development)#getRecords() | I2CE_FormStorage_File_Base->getRecords()]]
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L443 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 443
 
*Signature: public function getRecords($form)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $form
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
===isWritable()===
===isWritable()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L432 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 432
This public method is inherited from [[Class: I2CE_FormStorage_File_Base (Development)#isWritable() | I2CE_FormStorage_File_Base->isWritable()]]
*Signature: public function isWritable()
 
===listDisplayFields()===
===listDisplayFields()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L538 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 538
This public method is inherited from [[Class: I2CE_FormStorage_File_Base (Development)#listDisplayFields() | I2CE_FormStorage_File_Base->listDisplayFields()]]
*Signature: public function listDisplayFields($form,$fields,$parent,$where_data,$ordering,$limit,$mod_time)
 
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $form <br/>THe form name
** [http://www.php.net/manual/en/language.types.array.php array ] $fields <br/>of string. The fields we want returned Can include the special field 'last_modified' to get the last modification time for any of the fields of that form which is returned in the format  "Y-m-d H:i:s"
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $parent <br/>Defaults to false.    If it is scalar and non-boolean, it is consider to be the ID of the parent, and then we get all forms with parent the given id. If true, we return the parent as one of the fields.
***Default Value: false
** [http://www.php.net/manual/en/language.types.array.php array ] $where_data <br/>contains the  where clause information about this form or a nested
***Default Value: array()
** [http://www.php.net/manual/en/language.types.array.php array ] $ordering <br/>An array of fields to order by.  Defaults to the empty array.  Prepend a - to order by in descending order.
***Default Value: array()
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $limit <br/>Defaults to false.  It true, returns only one result.  If an integer it is the numeber of records to limit to. If it is as an array of two integers, it is the offset and then number of results to limit to.
***Default Value: false
** integer $mod_time <br/>Defaults to -1.  If non-negative, we only list the requested fields for an id if at least one of them has a modification time greater than or equal to $mod_time.  If the form storage has no way of tracking modifucation time, all entries are listed.
***Default Value: -1
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>an array with key id's and value and array of values.  the array of values has as keys the fields with their corresponding value.
===listFields()===
===listFields()===
@param array $fieldes of string. The fields we want returned.  Can include the special field 'last_modified' to get the last modification time for any of the fields of that form which is returned in the format  "Y-m-d H:i:s"
This public method is inherited from [[Class: I2CE_FormStorage_File_Base (Development)#listFields() | I2CE_FormStorage_File_Base->listFields()]]
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L501 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 501
 
*Signature: public function listFields($form,$fields,$parent,$where_data,$ordering,$limit,$mod_time)
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $form <br/>THe form name
**$fields
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $parent <br/>Defaults to false.    If it is scalar and non-boolean, it is consider to be the ID of the parent, and then we get all forms with parent the given id. If true, we return the parent as one of the fields.
***Default Value: false
** [http://www.php.net/manual/en/language.types.array.php array ] $where_data <br/>contains the  where clause information about this form or a nested
***Default Value: array()
** [http://www.php.net/manual/en/language.types.array.php array ] $ordering <br/>An array of fields to order by.  Defaults to the empty array.  Prepend a - to order by in descending order.
***Default Value: array()
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $limit <br/>Defaults to false.  It true, returns only one result.  If an integer it is the numeber of records to limit to. If it is as an array of two integers, it is the offset and then number of results to limit to.
***Default Value: false
** integer $mod_time <br/>Defaults to -1.  If non-negative, we only list the requested fields for an id if at least one of them has a modification time greater than or equal to $mod_time.  If the form storage has no way of tracking modifucation time, all entries are listed.
***Default Value: -1
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>an array with key id's and value and array of values.  the array of values has as keys the fields with their corresponding value.
===populate()===
===populate()===
Populate the member variables of the object from the database.
This public method is inherited from [[Class: I2CE_FormStorage_File_Base (Development)#populate() | I2CE_FormStorage_File_Base->populate()]]
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php#L456 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageCSV/lib/I2CE_FormStorage_CSV.php] on line 456
 
*Signature: public function populate($form)
===release()===
*Parameters:
This public method is inherited from [[Class: I2CE_FormStorage_File_Base (Development)#release() | I2CE_FormStorage_File_Base->release()]]
** [[Class: I2CE_Form (Development) | I2CE_Form]] $form
 
==Inherited Methods==
===_getFile()===
This protected method is inherited from [[Class: I2CE_FormStorage_File_Base (Development)#_getFile() | I2CE_FormStorage_File_Base->_getFile()]]
 
===getFileData_mdn()===
This protected method is inherited from [[Class: I2CE_FormStorage_File_Base (Development)#getFileData_mdn() | I2CE_FormStorage_File_Base->getFileData_mdn()]]
 
===getFileData_stream()===
This protected method is inherited from [[Class: I2CE_FormStorage_File_Base (Development)#getFileData_stream() | I2CE_FormStorage_File_Base->getFileData_stream()]]
 
===getFileURIType()===
This protected method is inherited from [[Class: I2CE_FormStorage_File_Base (Development)#getFileURIType() | I2CE_FormStorage_File_Base->getFileURIType()]]
 
===getLocation()===
This protected method is inherited from [[Class: I2CE_FormStorage_File_Base (Development)#getLocation() | I2CE_FormStorage_File_Base->getLocation()]]
 
===FF_IG_setSequence()===
===FF_IG_setSequence()===
This public method is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#FF_IG_setSequence() | I2CE_FormStorage_Mechanism->FF_IG_setSequence()]]
This public method is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#FF_IG_setSequence() | I2CE_FormStorage_Mechanism->FF_IG_setSequence()]]
Line 162: Line 103:
===FF_save()===
===FF_save()===
This public method is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#FF_save() | I2CE_FormStorage_Mechanism->FF_save()]]
This public method is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#FF_save() | I2CE_FormStorage_Mechanism->FF_save()]]
===__construct()===
This public method is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#__construct() | I2CE_FormStorage_Mechanism->__construct()]]
===changeID()===
This public method is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#changeID() | I2CE_FormStorage_Mechanism->changeID()]]


===delete()===
===delete()===
Line 171: Line 118:
===getIdsAsChild()===
===getIdsAsChild()===
This public method is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#getIdsAsChild() | I2CE_FormStorage_Mechanism->getIdsAsChild()]]
This public method is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#getIdsAsChild() | I2CE_FormStorage_Mechanism->getIdsAsChild()]]
===globalFieldUpdateByFunction()===
This public method is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#globalFieldUpdateByFunction() | I2CE_FormStorage_Mechanism->globalFieldUpdateByFunction()]]
===hasRecord()===
This public method is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#hasRecord() | I2CE_FormStorage_Mechanism->hasRecord()]]


===lookupDisplayField()===
===lookupDisplayField()===
Line 202: Line 155:
This public method is inherited from [[Class: I2CE_Fuzzy (Development)#_hasMethod() | I2CE_Fuzzy->_hasMethod()]]
This public method is inherited from [[Class: I2CE_Fuzzy (Development)#_hasMethod() | I2CE_Fuzzy->_hasMethod()]]
==Inherited Variables==
==Inherited Variables==
===$locations===
Theis protected variable is inherited from [[Class: I2CE_FormStorage_File_Base (Development)#$locations | I2CE_FormStorage_File_Base->$locations]]
===$mod_time===
Theis protected variable is inherited from [[Class: I2CE_FormStorage_File_Base (Development)#$mod_time | I2CE_FormStorage_File_Base->$mod_time]]
===$name===
===$name===
Theis protected variable is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#$name | I2CE_FormStorage_Mechanism->$name]]
Theis protected variable is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#$name | I2CE_FormStorage_Mechanism->$name]]

Latest revision as of 08:14, 6 May 2015


This article describes the class I2CE_FormStorage_CSV .

@filesource Class I2CE_FormStorage_CSV

Variables

$field_indices

The column indices for the fields . Arrays indexed by form names of pairs $field=>$index

Methods

ensureIndices()

Ensures that the column indices for the fields are set.

ensureLocations()

Worker moethod to the offset in the CSV file for the specified form id and store it into the {$locations} cache. Reads through the file until the specified is found.

getFormData()

Reads a line of data from ta CSV filestring an array of readable and enabled datavalues from the CSV indexed by the field names, 'id' and 'parent' @param resource $fp

getLocationId()

Get the id associated to the given location data object

getSearchCategory()

Get the search category

Inherited Methods

getFile()

This public method is inherited from I2CE_FormStorage_File_Base->getFile()

getFileData()

This public method is inherited from I2CE_FormStorage_File_Base->getFileData()

getFileModTime()

This public method is inherited from I2CE_FormStorage_File_Base->getFileModTime()

getRecords()

This public method is inherited from I2CE_FormStorage_File_Base->getRecords()

isWritable()

This public method is inherited from I2CE_FormStorage_File_Base->isWritable()

listDisplayFields()

This public method is inherited from I2CE_FormStorage_File_Base->listDisplayFields()

listFields()

This public method is inherited from I2CE_FormStorage_File_Base->listFields()

populate()

This public method is inherited from I2CE_FormStorage_File_Base->populate()

release()

This public method is inherited from I2CE_FormStorage_File_Base->release()

_getFile()

This protected method is inherited from I2CE_FormStorage_File_Base->_getFile()

getFileData_mdn()

This protected method is inherited from I2CE_FormStorage_File_Base->getFileData_mdn()

getFileData_stream()

This protected method is inherited from I2CE_FormStorage_File_Base->getFileData_stream()

getFileURIType()

This protected method is inherited from I2CE_FormStorage_File_Base->getFileURIType()

getLocation()

This protected method is inherited from I2CE_FormStorage_File_Base->getLocation()

FF_IG_setSequence()

This public method is inherited from I2CE_FormStorage_Mechanism->FF_IG_setSequence()

FF_populateHistory()

This public method is inherited from I2CE_FormStorage_Mechanism->FF_populateHistory()

FF_save()

This public method is inherited from I2CE_FormStorage_Mechanism->FF_save()

__construct()

This public method is inherited from I2CE_FormStorage_Mechanism->__construct()

changeID()

This public method is inherited from I2CE_FormStorage_Mechanism->changeID()

delete()

This public method is inherited from I2CE_FormStorage_Mechanism->delete()

getFormsById()

This public method is inherited from I2CE_FormStorage_Mechanism->getFormsById()

getIdsAsChild()

This public method is inherited from I2CE_FormStorage_Mechanism->getIdsAsChild()

globalFieldUpdateByFunction()

This public method is inherited from I2CE_FormStorage_Mechanism->globalFieldUpdateByFunction()

hasRecord()

This public method is inherited from I2CE_FormStorage_Mechanism->hasRecord()

lookupDisplayField()

This public method is inherited from I2CE_FormStorage_Mechanism->lookupDisplayField()

lookupField()

This public method is inherited from I2CE_FormStorage_Mechanism->lookupField()

populateHistory()

This public method is inherited from I2CE_FormStorage_Mechanism->populateHistory()

save()

This public method is inherited from I2CE_FormStorage_Mechanism->save()

search()

This public method is inherited from I2CE_FormStorage_Mechanism->search()

setStorageOptions()

This public method is inherited from I2CE_FormStorage_Mechanism->setStorageOptions()

compareFormsByFields()

This protected method is inherited from I2CE_FormStorage_Mechanism->compareFormsByFields()

getLimitedFields()

This protected method is inherited from I2CE_FormStorage_Mechanism->getLimitedFields()

getStorageOptions()

This protected method is inherited from I2CE_FormStorage_Mechanism->getStorageOptions()

_hasMethod()

This public method is inherited from I2CE_Fuzzy->_hasMethod()

Inherited Variables

$locations

Theis protected variable is inherited from I2CE_FormStorage_File_Base->$locations

$mod_time

Theis protected variable is inherited from I2CE_FormStorage_File_Base->$mod_time

$name

Theis protected variable is inherited from I2CE_FormStorage_Mechanism->$name

$global_options

Theis protected variable is inherited from I2CE_FormStorage_Mechanism->$global_options

$storage_options_cache

Theis protected variable is inherited from I2CE_FormStorage_Mechanism->$storage_options_cache

$ordering

Theis protected variable is inherited from I2CE_FormStorage_Mechanism->$ordering

Inherited Fuzzy Methods

userMessage()

This method is inherited from I2CE_Fuzzy->userMessage()