Class: I2CE FormField BINARY FILE (Development): Difference between revisions

From IHRIS Wiki
No edit summary
No edit summary
 
Line 15: Line 15:
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L33 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 33
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L33 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 33
*Type: protected $mime_type
*Type: protected $mime_type
===$null_term===
The number of null \0 at the end of the string (it seems MDB2 does truncates \0 when getting results)
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L40 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 40
*Type: protected [http://www.php.net/manual/en/language.types.integer.php int ] $null_term


===$file_name===
===$file_name===
The file name as it was uploaded (may not be set) .  Either false or string
The file name as it was uploaded (may not be set) .  Either false or string
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L40 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 40
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L46 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 46
*Type: protected [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $file_name
*Type: protected [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $file_name


===$fmod_time===
===$fmod_time===
The time the file  was uploaded (may not be set) .  Either false or integer(unix time stamp)
The time the file  was uploaded (may not be set) .  Either false or integer(unix time stamp)
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L46 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 46
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L52 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 52
*Type: protected [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $fmod_time
*Type: protected [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $fmod_time


===$keys===
===$keys===
An array whose keys are the keys to the metadata for the file and values are the variables they should be stored in .  All keys need to be a string of length 9 @protected static array of string $keys
An array whose keys are the keys to the metadata for the file and values are the variables they should be stored in .  All keys need to be a string of length 9 @protected static array of string $keys
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L63 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 63
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L77 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 77
*Type: static protected $keys
*Type: static protected $keys


Line 34: Line 39:
===__construct()===
===__construct()===
Create a new instance of a I2CE_FormField
Create a new instance of a I2CE_FormField
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L54 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 54
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L68 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 68
*Signature: public function __construct($name,$options)
*Signature: public function __construct($name,$options)
*Parameters:
*Parameters:
Line 42: Line 47:
===defaultExtension()===
===defaultExtension()===
get the default extension for this
get the default extension for this
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L323 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 323
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L363 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 363
*Signature: abstract protected function defaultExtension()
*Signature: abstract protected function defaultExtension()
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===defaultMimeType()===
===defaultMimeType()===
get the default extension for this
get the default extension for this
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L330 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 330
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L370 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 370
*Signature: abstract protected function defaultMimeType()
*Signature: abstract protected function defaultMimeType()
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===getBinaryData()===
Gets the binary data for the form field
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L59 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 59
*Signature: public function getBinaryData()
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===getContentLength()===
===getContentLength()===
Gets the length of the conten
Gets the length of the conten
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L119 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 119
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L143 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 143
*Signature: public function getContentLength()
*Signature: public function getContentLength()
*Returns: [http://www.php.net/manual/en/language.types.integer.php int ]
*Returns: [http://www.php.net/manual/en/language.types.integer.php int ]
===getDBValue()===
===getDBValue()===
Returns the value of this field ready to be stored in the database.
Returns the value of this field ready to be stored in the database.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L90 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 90
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L114 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 114
*Signature: public function getDBValue()
*Signature: public function getDBValue()
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]
===getDisplayNode()===
===getDisplayNode()===
Return the display value of this form field as a DOM Node.
Return the display value of this form field as a DOM Node.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L234 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 234
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L263 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 263
*Signature: public function getDisplayNode($node,$template)
*Signature: public function getDisplayNode($node,$template)
*Parameters:
*Parameters:
Line 70: Line 80:
===getDisplayValue()===
===getDisplayValue()===
Returns the value of this field as a human readable format.
Returns the value of this field as a human readable format.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L107 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 107
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L131 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 131
*Signature: public function getDisplayValue($entry)
*Signature: public function getDisplayValue($entry)
*Parameters:
*Parameters:
Line 78: Line 88:
===getExtension()===
===getExtension()===
Get the extension associated with this binary file
Get the extension associated with this binary file
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L356 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 356
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L396 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 396
*Signature: protected function getExtension()
*Signature: public function getExtension()
===getFieldLink()===
===getFieldLink()===
Generate the link to the given binary field in the given form id
Generate the link to the given binary field in the given form id
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L137 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 137
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L161 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 161
*Signature: static public function getFieldLink($formid,$field)
*Signature: static public function getFieldLink($formid,$field)
*Parameters:
*Parameters:
Line 90: Line 100:
===getFileName()===
===getFileName()===
Get the file name associated to this binary field.  if none, it will generate one based on the form and field
Get the file name associated to this binary field.  if none, it will generate one based on the form and field
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L292 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 292
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L332 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 332
*Signature: public function getFileName()
*Signature: public function getFileName()
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===getHeaders()===
===getHeaders()===
Any headers that need to be sent when this field is dumped
Any headers that need to be sent when this field is dumped
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L311 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 311
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L351 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 351
*Signature: public function getHeaders()
*Signature: public function getHeaders()
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]<br/>of string
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]<br/>of string
===getLink()===
===getLink()===
Gets the link to this binary field.  It will fail if there is field is not attached to any form
Gets the link to this binary field.  It will fail if there is field is not attached to any form
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L145 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 145
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L169 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 169
*Signature: protected function getLink()
*Signature: protected function getLink()
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>string on success or null on failure.
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>string on success or null on failure.
===getMimeType()===
===getMimeType()===
Get the magically determined mime type
Get the magically determined mime type
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L340 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 340
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L380 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 380
*Signature: public function getMimeType()
*Signature: public function getMimeType()
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===getModTime()===
===getModTime()===
Returns the last modification time of this field, or false if unknown @param mixed.
Returns the last modification time of this field, or false if unknown @param mixed.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L127 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 127
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L151 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 151
*Signature: public function getModTime()
*Signature: public function getModTime()
===getValue()===
Returns the value of this field.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L104 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 104
*Signature: public function getValue()
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]
===isTooBig()===
Check if the set value is too big
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L288 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 288
*Signature: public function isTooBig()
===isValid()===
===isValid()===
Checks to see if the current value for this is set and valid.
Checks to see if the current value for this is set and valid.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L260 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 260
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L300 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 300
*Signature: public function isValid()
*Signature: public function isValid()
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
===isValidMimeType()===
===isValidMimeType()===
Checks to see if a mime type is a valid  mime type for this binary file
Checks to see if a mime type is a valid  mime type for this binary file
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L253 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 253
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L283 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 283
*Signature: abstract public function isValidMimeType($mime_type)
*Signature: abstract public function isValidMimeType($mime_type)
*Parameters:
*Parameters:
Line 125: Line 144:
*Returns: true<br/>if valid.  false otherwise
*Returns: true<br/>if valid.  false otherwise
===processDOMEditable()===
===processDOMEditable()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L269 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 269
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L309 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 309
*Signature: public function processDOMEditable($node,$template,$form_node)
*Signature: public function processDOMEditable($node,$template,$form_node)
*Parameters:
*Parameters:
Line 132: Line 151:
**$form_node  
**$form_node  
===processDOMNotEditable()===
===processDOMNotEditable()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L282 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 282
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L322 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 322
*Signature: public function processDOMNotEditable($node,$template,$form_node)
*Signature: public function processDOMNotEditable($node,$template,$form_node)
*Parameters:
*Parameters:
Line 141: Line 160:
===setFromDB()===
===setFromDB()===
Sets the value of this field from the database format.
Sets the value of this field from the database format.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L69 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 69
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L83 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 83
*Signature: public function setFromDB($value)
*Signature: public function setFromDB($value)
*Parameters:
*Parameters:
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $value
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $value
===setFromData()===
===setFromData()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L153 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 153
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L177 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 177
*Signature: public function setFromData($data,$file_name,$mime_type,$fmod_time)
*Signature: public function setFromData($data,$file_name,$mime_type,$fmod_time)
*Parameters:
*Parameters:
Line 157: Line 176:
===setFromPost()===
===setFromPost()===
Sets the value of this field from the posted form.
Sets the value of this field from the posted form.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L195 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 195
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php#L224 i2ce/modules/Forms/modules/Binary_Files/lib/I2CE_FormField_BINARY_FILE.php] on line 224
*Signature: public function setFromPost($post)
*Signature: public function setFromPost($post)
*Parameters:
*Parameters:
Line 176: Line 195:
===getAttribute()===
===getAttribute()===
This public method is inherited from [[Class: I2CE_FormField (Development)#getAttribute() | I2CE_FormField->getAttribute()]]
This public method is inherited from [[Class: I2CE_FormField (Development)#getAttribute() | I2CE_FormField->getAttribute()]]
===getContainer()===
This public method is inherited from [[Class: I2CE_FormField (Development)#getContainer() | I2CE_FormField->getContainer()]]


===getDBType()===
===getDBType()===
Line 182: Line 204:
===getDisplays()===
===getDisplays()===
This public method is inherited from [[Class: I2CE_FormField (Development)#getDisplays() | I2CE_FormField->getDisplays()]]
This public method is inherited from [[Class: I2CE_FormField (Development)#getDisplays() | I2CE_FormField->getDisplays()]]
===getForm()===
This public method is inherited from [[Class: I2CE_FormField (Development)#getForm() | I2CE_FormField->getForm()]]


===getFromDB()===
===getFromDB()===
Line 215: Line 234:
===getTypeString()===
===getTypeString()===
This public method is inherited from [[Class: I2CE_FormField (Development)#getTypeString() | I2CE_FormField->getTypeString()]]
This public method is inherited from [[Class: I2CE_FormField (Development)#getTypeString() | I2CE_FormField->getTypeString()]]
===getValue()===
This public method is inherited from [[Class: I2CE_FormField (Development)#getValue() | I2CE_FormField->getValue()]]


===hasAttribute()===
===hasAttribute()===
Line 254: Line 270:
===setAttribute()===
===setAttribute()===
This public method is inherited from [[Class: I2CE_FormField (Development)#setAttribute() | I2CE_FormField->setAttribute()]]
This public method is inherited from [[Class: I2CE_FormField (Development)#setAttribute() | I2CE_FormField->setAttribute()]]
===setContainer()===
This public method is inherited from [[Class: I2CE_FormField (Development)#setContainer() | I2CE_FormField->setContainer()]]


===setDefaultOptions()===
===setDefaultOptions()===
This public method is inherited from [[Class: I2CE_FormField (Development)#setDefaultOptions() | I2CE_FormField->setDefaultOptions()]]
This public method is inherited from [[Class: I2CE_FormField (Development)#setDefaultOptions() | I2CE_FormField->setDefaultOptions()]]
===setForm()===
This public method is inherited from [[Class: I2CE_FormField (Development)#setForm() | I2CE_FormField->setForm()]]


===setHeaders()===
===setHeaders()===
Line 312: Line 328:
Theis protected variable is inherited from [[Class: I2CE_FormField (Development)#$href | I2CE_FormField->$href]]
Theis protected variable is inherited from [[Class: I2CE_FormField (Development)#$href | I2CE_FormField->$href]]


===$form===
===$container===
Theis protected variable is inherited from [[Class: I2CE_FormField (Development)#$form | I2CE_FormField->$form]]
Theis protected variable is inherited from [[Class: I2CE_FormField (Development)#$container | I2CE_FormField->$container]]


===$history===
===$history===

Latest revision as of 08:55, 3 August 2010


This article describes the abstract class I2CE_FormField_BINARY_FILE .

Class for defining all the database fields used by a object.

Variables

$mime_type

The magically determined mime type @var protected mixed $file_name. Either false or a string

$null_term

The number of null \0 at the end of the string (it seems MDB2 does truncates \0 when getting results)

$file_name

The file name as it was uploaded (may not be set) . Either false or string

$fmod_time

The time the file was uploaded (may not be set) . Either false or integer(unix time stamp)

$keys

An array whose keys are the keys to the metadata for the file and values are the variables they should be stored in . All keys need to be a string of length 9 @protected static array of string $keys

Methods

__construct()

Create a new instance of a I2CE_FormField

defaultExtension()

get the default extension for this

defaultMimeType()

get the default extension for this

getBinaryData()

Gets the binary data for the form field

getContentLength()

Gets the length of the conten

getDBValue()

Returns the value of this field ready to be stored in the database.

getDisplayNode()

Return the display value of this form field as a DOM Node.

getDisplayValue()

Returns the value of this field as a human readable format.

getExtension()

Get the extension associated with this binary file

getFieldLink()

Generate the link to the given binary field in the given form id

getFileName()

Get the file name associated to this binary field. if none, it will generate one based on the form and field

getHeaders()

Any headers that need to be sent when this field is dumped

getLink()

Gets the link to this binary field. It will fail if there is field is not attached to any form

getMimeType()

Get the magically determined mime type

getModTime()

Returns the last modification time of this field, or false if unknown @param mixed.

getValue()

Returns the value of this field.

isTooBig()

Check if the set value is too big

isValid()

Checks to see if the current value for this is set and valid.

isValidMimeType()

Checks to see if a mime type is a valid mime type for this binary file

processDOMEditable()

processDOMNotEditable()

setFromDB()

Sets the value of this field from the database format.

setFromData()

setFromPost()

Sets the value of this field from the posted form.

Inherited Methods

addHistory()

This public method is inherited from I2CE_FormField->addHistory()

compare()

This public method is inherited from I2CE_FormField->compare()

createField()

This public method is inherited from I2CE_FormField->createField()

firstHistory()

This public method is inherited from I2CE_FormField->firstHistory()

getAttribute()

This public method is inherited from I2CE_FormField->getAttribute()

getContainer()

This public method is inherited from I2CE_FormField->getContainer()

getDBType()

This public method is inherited from I2CE_FormField->getDBType()

getDisplays()

This public method is inherited from I2CE_FormField->getDisplays()

getFromDB()

This public method is inherited from I2CE_FormField->getFromDB()

getHTMLName()

This public method is inherited from I2CE_FormField->getHTMLName()

getHeader()

This public method is inherited from I2CE_FormField->getHeader()

getHref()

This public method is inherited from I2CE_FormField->getHref()

getInvalid()

This public method is inherited from I2CE_FormField->getInvalid()

getMDB2Type()

This public method is inherited from I2CE_FormField->getMDB2Type()

getName()

This public method is inherited from I2CE_FormField->getName()

getOption()

This public method is inherited from I2CE_FormField->getOption()

getString()

This public method is inherited from I2CE_FormField->getString()

getTypeString()

This public method is inherited from I2CE_FormField->getTypeString()

hasAttribute()

This public method is inherited from I2CE_FormField->hasAttribute()

hasDisplay()

This public method is inherited from I2CE_FormField->hasDisplay()

hasHeader()

This public method is inherited from I2CE_FormField->hasHeader()

hasInvalid()

This public method is inherited from I2CE_FormField->hasInvalid()

hasNextHistory()

This public method is inherited from I2CE_FormField->hasNextHistory()

hasOption()

This public method is inherited from I2CE_FormField->hasOption()

isInDB()

This public method is inherited from I2CE_FormField->isInDB()

isSameValue()

This public method is inherited from I2CE_FormField->isSameValue()

issetValue()

This public method is inherited from I2CE_FormField->issetValue()

nextHistory()

This public method is inherited from I2CE_FormField->nextHistory()

processDOM()

This public method is inherited from I2CE_FormField->processDOM()

setAttribute()

This public method is inherited from I2CE_FormField->setAttribute()

setContainer()

This public method is inherited from I2CE_FormField->setContainer()

setDefaultOptions()

This public method is inherited from I2CE_FormField->setDefaultOptions()

setHeaders()

This public method is inherited from I2CE_FormField->setHeaders()

setHref()

This public method is inherited from I2CE_FormField->setHref()

setInvalid()

This public method is inherited from I2CE_FormField->setInvalid()

setValue()

This public method is inherited from I2CE_FormField->setValue()

unsetValue()

This public method is inherited from I2CE_FormField->unsetValue()

displayInvalid()

This protected method is inherited from I2CE_FormField->displayInvalid()

getDefaultValue()

This protected method is inherited from I2CE_FormField->getDefaultValue()

getElement()

This protected method is inherited from I2CE_FormField->getElement()

getOptionsByPath()

This protected method is inherited from I2CE_FormField->getOptionsByPath()

optionsHasPath()

This protected method is inherited from I2CE_FormField->optionsHasPath()

setElement()

This protected method is inherited from I2CE_FormField->setElement()

_hasMethod()

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

Inherited Variables

$name

Theis protected variable is inherited from I2CE_FormField->$name

$options

Theis protected variable is inherited from I2CE_FormField->$options

$value

Theis protected variable is inherited from I2CE_FormField->$value

$headers

Theis protected variable is inherited from I2CE_FormField->$headers

$href

Theis protected variable is inherited from I2CE_FormField->$href

$container

Theis protected variable is inherited from I2CE_FormField->$container

$history

Theis protected variable is inherited from I2CE_FormField->$history

$history_idx

Theis protected variable is inherited from I2CE_FormField->$history_idx

$attributes

Theis protected variable is inherited from I2CE_FormField->$attributes

$invalid

Theis protected variable is inherited from I2CE_FormField->$invalid

Inherited Fuzzy Methods

cachedTableReference()

This method is inherited from I2CE_FormField->cachedTableReference()

isNumeric()

This method is inherited from I2CE_FormField->isNumeric()

getLimitStyles()

This method is inherited from I2CE_FormField->getLimitStyles()

generateLimit()

This method is inherited from I2CE_FormField->generateLimit()

generateLimit_null()

This method is inherited from I2CE_FormField->generateLimit_null()

generateLimit_not_null()

This method is inherited from I2CE_FormField->generateLimit_not_null()

generateLimit_null_not_null()

This method is inherited from I2CE_FormField->generateLimit_null_not_null()

checkLimit_null()

This method is inherited from I2CE_FormField->checkLimit_null()

checkLimit_not_null()

This method is inherited from I2CE_FormField->checkLimit_not_null()

checkLimit_null_not_null()

This method is inherited from I2CE_FormField->checkLimit_null_not_null()

checkLimitString_null()

This method is inherited from I2CE_FormField->checkLimitString_null()

checkLimitString_not_null()

This method is inherited from I2CE_FormField->checkLimitString_not_null()

checkLimitString_null_not_null()

This method is inherited from I2CE_FormField->checkLimitString_null_not_null()

getLimitMenu_null()

This method is inherited from I2CE_FormField->getLimitMenu_null()

getLimitMenu_not_null()

This method is inherited from I2CE_FormField->getLimitMenu_not_null()

getLimitMenu_null_not_null()

This method is inherited from I2CE_FormField->getLimitMenu_null_not_null()

processLimitMenu_null()

This method is inherited from I2CE_FormField->processLimitMenu_null()

processLimitMenu_not_null()

This method is inherited from I2CE_FormField->processLimitMenu_not_null()

processLimitMenu_null_not_null()

This method is inherited from I2CE_FormField->processLimitMenu_null_not_null()

generateLimit_max_parent()

This method is inherited from I2CE_FormField->generateLimit_max_parent()

generateLimit_min_parent()

This method is inherited from I2CE_FormField->generateLimit_min_parent()

generateLimit_max_parent_form()

This method is inherited from I2CE_FormField->generateLimit_max_parent_form()

generateLimit_min_parent_form()

This method is inherited from I2CE_FormField->generateLimit_min_parent_form()

getLimitMenu_max_parent()

This method is inherited from I2CE_FormField->getLimitMenu_max_parent()

getLimitMenu_min_parent()

This method is inherited from I2CE_FormField->getLimitMenu_min_parent()

getLimitMenu_max_parent_form()

This method is inherited from I2CE_FormField->getLimitMenu_max_parent_form()

getLimitMenu_min_parent_form()

This method is inherited from I2CE_FormField->getLimitMenu_min_parent_form()

processLimitMenu_max_parent()

This method is inherited from I2CE_FormField->processLimitMenu_max_parent()

processLimitMenu_min_parent()

This method is inherited from I2CE_FormField->processLimitMenu_min_parent()

processLimitMenu_max_parent_form()

This method is inherited from I2CE_FormField->processLimitMenu_max_parent_form()

processLimitMenu_min_parent_form()

This method is inherited from I2CE_FormField->processLimitMenu_min_parent_form()

save()

This method is inherited from I2CE_FormField->save()

populateHistory()

This method is inherited from I2CE_FormField->populateHistory()

userMessage()

This method is inherited from I2CE_Fuzzy->userMessage()

Inherited Fuzzy CLI Methods

cachedTableReference()

This method is inherited from I2CE_FormField->cachedTableReference()