XBS_MODGEN
[ class tree: XBS_MODGEN ] [ index: XBS_MODGEN ] [ all elements ]

Class: ModgenObject

Source Location: /class/class.xbs_modgen.base.inc

Class Overview

CDMBaseObject
   |
   --ModgenObject

Module generator Object


Author(s):

  • Ashley Kitson http://akitson.bbcb.co.uk

Version:

  • 1

Copyright:

  • 2006 Ashley Kitson, UK

Methods


Child classes:

xbs_modgen_Module
Data container class for a Modgen Module
xbs_modgen_Config
Data container class for a Modgen Configuration Record
xbs_modgen_Object
Data container class for a Modgen Object

Class Details

[line 40]
Module generator Object

Object for a module to be generated by ModGen




Tags:

version:  1
copyright:  2006 Ashley Kitson, UK
author:  Ashley Kitson http://akitson.bbcb.co.uk


[ Top ]


Class Methods


constructor ModgenObject [line 49]

ModgenObject ModgenObject( )

Constructor

Overide CDMBaseObject constructor because of new initvar




[ Top ]

method initVar [line 86]

void initVar( string $key, int $data_type, [mixed $value = null], [bool $required = false], [int $maxlength = null], [mixed $options = ''], string $frmName, string $frmType, string $frmParams, [string $frmValPattern = null], string $option)

initialize variables for the object

Extend Ancestor to add data for form edit display




Tags:

access:  public


Parameters:

string   $key  
int   $data_type   set to one of XOBJ_DTYPE_XXX constants (set to XOBJ_DTYPE_OTHER if no data type ckecking nor text sanitizing is required)
bool   $required   require html form input?
int   $maxlength   for XOBJ_DTYPE_TXTBOX type only
string   $option   does this data have any select options? Must be set if $frmType = XBS_FRM_CHECKBOX, XBS_FRM_SELECT
string   $frmName   Name of field on a form
string   $frmType   Type of field on form, one of XBS_FRM_.. constants
string   $frmParams   Additional parameters for form type. frmType = XBS_FRM_DATETIME then = fld size frmType = XBS_FRM_PASSWORD then = fld size frmType = XBS_FRM_SELECT then = list size,multiple select eg 1,false frmType = XBS_FRM_TEXTBOX then = fld size frmType = XBS_FRM_TEXTAREA then = numRows,numCols e.g. 5,50 frmType = XBS_FRM_CDMSELECT then = SetName,NumRows,LangCode,DispField e.g. MYCODES,1,EN,cd_value frmType = XBS_FRM_CDMCOUNTRY then = numRows,LangCode e.g. 1,EN frmType = XBS_FRM_CDMCURRENCY then = numRows,LangCode e.g. 1,EN frmType = XBS_FRM_CDMLANGUAGE then = numRows,LangCode e.g. 1,EN
string   $frmValPattern   regular expression to validate variable value against e.g. '/\bam[0-9]+/'
mixed   $value  

[ Top ]

method validateData [line 101]

boolean validateData( )

Check variables against patterns to make sure it is valid input Creates error messages that are retrieved by getErrors() or getHtmlErrors()



Tags:

return:  True if all OK else false


[ Top ]


Documentation generated on Sun, 16 Jul 2006 11:02:44 +0100 by phpDocumentor 1.3.0RC3