Class P4A_Data_Field

Description

Every DATA_SOURCE field is a DATA_FIELD.

It's used to emulate some database behaviours such as default values.
It can be considered the same as a database table's field.

Located in /p4a/objects/data_field.php (line 44)

P4A_Object
   |
   --P4A_Data_Field
Variable Summary
 string $alias_of
 boolean $is_read_only
 integer $length
 string $new_value
 string $schema
 string $sequence
 string $table
 string $type
 string $value
 string $_DSN
Method Summary
 string getAliasOf ()
 string getDefaultValue ()
 string getDSN ()
 integer getLength ()
 string getNewValue ()
 integer getNumOfDecimals ()
 string getSchema ()
 string getSQLNewValue ()
 string getSQLValue ()
 string getTable ()
 string getType ()
 string getUploadSubpath ()
 string getValue ()
 boolean isReadOnly ([boolean|P4A_Data_Field $read_only = null])
 P4A_Data_Field setAliasOf (string $column)
 P4A_Data_Field setDefaultValue ([string $value = null])
 P4A_Data_Field setDSN (string $DSN)
 void setLength (integer $length)
 P4A_Data_Field setNewValue (string $value)
 P4A_Data_Field setNumOfDecimals (integer $num_of_decimals)
 P4A_Data_Field setSchema (string $schema)
 P4A_Data_Field setSequence ([string $name = null])
 P4A_Data_Field setTable (string $table)
 P4A_Data_Field setType (string $type)
 P4A_Field setUploadSubpath ([string $subpath = null])
 P4A_Data_Field setValue (string $value)
Variables
string $alias_of = null (line 95)
  • access: protected
string $default_value = null (line 59)
  • access: protected
boolean $is_read_only = false (line 70)
  • access: protected
integer $length = null (line 100)
  • access: protected
string $new_value = null (line 54)
  • access: protected
integer $num_of_decimals = null (line 105)
  • access: protected
string $schema = null (line 85)
  • access: protected
string $sequence = null (line 75)
  • access: protected
string $table = null (line 90)
  • access: protected
string $type = 'text' (line 65)

The default value for the field in new rows.

  • access: protected
string $upload_subpath = null (line 111)

Path under P4A_UPLOADS_PATH where uploads will be stored

  • access: protected
string $value = null (line 49)
  • access: protected
string $_DSN = null (line 80)
  • access: protected

Inherited Variables

Inherited from P4A_Object

P4A_Object::$_helpers
P4A_Object::$_id
P4A_Object::$_map_actions
P4A_Object::$_name
P4A_Object::$_objects
P4A_Object::$_parent_id
Methods
getAliasOf (line 302)
  • access: public
string getAliasOf ()
getDefaultValue (line 244)
  • access: public
string getDefaultValue ()
getDSN (line 212)
  • access: public
string getDSN ()
getLength (line 319)
  • access: public
integer getLength ()
getNewValue (line 155)
  • access: public
string getNewValue ()
getNumOfDecimals (line 337)
  • access: public
integer getNumOfDecimals ()
getSchema (line 266)
  • access: public
string getSchema ()
getSchemaTableField (line 345)
  • access: public
string getSchemaTableField ()
getSQLNewValue (line 164)

Returns the value of the data field for safe SQL queries

  • access: public
string getSQLNewValue ()
getSQLValue (line 137)

Returns the value of the data field for safe SQL queries

  • access: public
string getSQLValue ()
getTable (line 284)
  • access: public
string getTable ()
getType (line 182)
  • access: public
string getType ()
getUploadSubpath (line 373)
  • access: public
string getUploadSubpath ()
getValue (line 128)
  • access: public
string getValue ()
isReadOnly (line 192)

Gets/sets read only state

  • access: public
boolean isReadOnly ([boolean|P4A_Data_Field $read_only = null])
setAliasOf (line 293)
  • access: public
P4A_Data_Field setAliasOf (string $column)
  • string $column
setDefaultValue (line 221)
  • access: public
P4A_Data_Field setDefaultValue ([string $value = null])
  • string $value
setDSN (line 203)
  • access: public
P4A_Data_Field setDSN (string $DSN)
  • string $DSN
setLength (line 310)
  • access: public
void setLength (integer $length)
  • integer $length
setNewValue (line 146)
  • access: public
P4A_Data_Field setNewValue (string $value)
  • string $value
setNumOfDecimals (line 328)
  • access: public
P4A_Data_Field setNumOfDecimals (integer $num_of_decimals)
  • integer $num_of_decimals
setSchema (line 257)
  • access: public
P4A_Data_Field setSchema (string $schema)
  • string $schema
setSequence (line 235)
  • access: public
P4A_Data_Field setSequence ([string $name = null])
  • string $name
setTable (line 275)
  • access: public
P4A_Data_Field setTable (string $table)
  • string $table
setType (line 173)
  • access: public
P4A_Data_Field setType (string $type)
  • string $type
setUploadSubpath (line 364)

Sets the subpath of P4A_UPLOADS_PATH where the upload will happen

  • access: public
P4A_Field setUploadSubpath ([string $subpath = null])
  • string $subpath: The subdir (can be "test", "test/", "test/test", "test/test/test/")
setValue (line 118)

Sets value and new_value

  • access: public
P4A_Data_Field setValue (string $value)
  • string $value

Inherited Methods

Inherited From P4A_Object

 P4A_Object::__construct()
 P4A_Object::actionHandler()
 P4A_Object::build()
 P4A_Object::destroy()
 P4A_Object::dropImplement()
 P4A_Object::dropMethod()
 P4A_Object::errorHandler()
 P4A_Object::getId()
 P4A_Object::getName()
 P4A_Object::getObjectType()
 P4A_Object::getParentID()
 P4A_Object::implement()
 P4A_Object::intercept()
 P4A_Object::isActionTriggered()
 P4A_Object::setName()
 P4A_Object::setParentID()
 P4A_Object::void()
 P4A_Object::_loadHelper()
 P4A_Object::__call()

Documentation generated on Tue, 02 Sep 2008 10:03:59 +0200 by phpDocumentor 1.4.2