phpDocumentor CYap
[ Back ] [ class tree: CYap ] [ index: CYap ] [ all elements ]

Class: CYap_Control

Source Location: /CYap_Control.php

Class CYap_Control

Direct descendents
Child Class Description
CYap_TextBox Generic text box class
CYap_SelectBox
CYap_Preset Preset input object. This object obtains its value

[ Top ]
Property Summary
string   $CallBackCheck   Callback function to call to validate the inoput
string   $DbField   Name of the database field binded to this control
array   $DbFieldInfo   Information about the field binded to this control. Associative array.
mixed   $FieldValue   Cutrent value
boolean   $IHaveValue   If true $FieldValue contains the current field's value
bool   $IsValidInput   The current value is valid?
string   $Name   Control Name
array   $ValidIndex   Expected key in $DbFieldInfo

[ Top ]
Method Summary
void   BindField()   Store the information about the field binded to this control
void   CYap_control()   Class constructor
string   Draw()   Draw the control
string   GetInfo()   return the value of the index $InfoName of $this->DbFieldInfo
void   GetJsCode()   Return the Js code reuired by the control
void   GetJsSubmitFunction()   Return the JS code required to write the function to check the form before submit it
string   GetSqlData()   Retrieve the value in the format suitable to build an update SQL query
string   GetSqlFieldName()   Retrieve the value in the format suitable to build an update SQL query
void   GetValue()  
boolean   HasValue()   Has been set the control's value?
boolean   IsHidden()   The hidden fields are fields expected not to be requested (never show) in modify form.
bool   IsValid()   The current value is valid?
void   ParseResponse()   Load the input value from form answer
void   SetCalBackFunc()   Set tha callback function to check the input value
void   SetControlName()   set the name for the control
void   SetValue()   Set the current value for the field
void   _InternalCheck()   Internal function to check the input value. Each control may develop som intrisic cchecks

[ Top ]
Properties
string   $CallBackCheck [line 88]

Callback function to call to validate the inoput


[ Top ]
string   $DbField [line 51]

Name of the database field binded to this control


[ Top ]
array   $DbFieldInfo [line 65]

Information about the field binded to this control. Associative array.

Key: 'autoincrement' -> Autoincrement flag 'values' -> 'table' -> table where the field is 'type' -> field type (database format) 'apice' -> should I use the single quote to enclose the field value 'size' -> field's max length 'decimal' -> No. decimal digits 'name' -> field's name


[ Top ]
mixed   $FieldValue [line 76]

Cutrent value

API Tags:
See:  CYap_Control::SetValue()


[ Top ]
boolean   $IHaveValue [line 83]

If true $FieldValue contains the current field's value

API Tags:
See:  CYap_Control::SetValue()
See:  CYap_Control::$FieldValue


[ Top ]
bool   $IsValidInput [line 93]

The current value is valid?


[ Top ]
string   $Name [line 46]

Control Name


[ Top ]
array   $ValidIndex = array('autoincrement','values','table','type','apice','size','decimal','name') [line 70]

Expected key in $DbFieldInfo


[ Top ]
Methods
BindField  [line 114]

  void BindField( mixed $FieldDef  )

Store the information about the field binded to this control


API Tags:
Access:  public


[ Top ]
CYap_control  [line 101]

  void CYap_control( [array $TableFieldDef = array()]  )

Class constructor

Parameters:
array   $TableFieldDef:  this table contains the definition for the field binded to this control


[ Top ]
Draw  [line 260]

  string Draw( [bool $Show = true]  )

Draw the control

Parameters:
bool   $Show:  Should the function echo the code, or return it as string

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
GetInfo  [line 214]

  string GetInfo( string $InfoName  )

return the value of the index $InfoName of $this->DbFieldInfo

Parameters:
string   $InfoName: 

API Tags:
Access:  public


[ Top ]
GetJsCode  [line 240]

  void GetJsCode( )

Return the Js code reuired by the control


API Tags:
Access:  public


[ Top ]
GetJsSubmitFunction  [line 249]

  void GetJsSubmitFunction( )

Return the JS code required to write the function to check the form before submit it


API Tags:
Access:  public


[ Top ]
GetSqlData  [line 191]

  string GetSqlData( )

Retrieve the value in the format suitable to build an update SQL query


API Tags:
Access:  public


[ Top ]
GetSqlFieldName  [line 203]

  string GetSqlFieldName( )

Retrieve the value in the format suitable to build an update SQL query


API Tags:
Access:  public


[ Top ]
GetValue  [line 232]

  void GetValue( )



[ Top ]
HasValue  [line 227]

  boolean HasValue( )

Has been set the control's value?



[ Top ]
IsHidden  [line 271]

  boolean IsHidden( )

The hidden fields are fields expected not to be requested (never show) in modify form.

The default are false, (show the field)


API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
IsValid  [line 182]

  bool IsValid( )

The current value is valid?


API Tags:
Access:  public


[ Top ]
ParseResponse  [line 156]

  void ParseResponse( )

Load the input value from form answer


API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
SetCalBackFunc  [line 146]

  void SetCalBackFunc( string $name  )

Set tha callback function to check the input value

Parameters:
string   $name: 

API Tags:
Access:  public


[ Top ]
SetControlName  [line 137]

  void SetControlName( string $name  )

set the name for the control

Parameters:
string   $name: 

API Tags:
Access:  public


[ Top ]
SetValue  [line 126]

  void SetValue( mixed $value  )

Set the current value for the field

Parameters:
mixed   $value: 

API Tags:
Access:  public


[ Top ]
_InternalCheck  [line 171]

  void _InternalCheck( )

Internal function to check the input value. Each control may develop som intrisic cchecks

i.e an integer inpu accepts only integer value In the base class this function is empty


API Tags:
Access:  private


[ Top ]

Documentation generated on Sat, 26 Feb 2005 14:09:58 +0100 by phpDocumentor 1.3.0RC3