Source for file INFA_DBMS_FIELD.phpclass

Documentation is available at INFA_DBMS_FIELD.phpclass

  1. <?php
  2. /**
  3.   * interface file INFA_DBMS_FIELD.phpclass
  4.   *
  5.   * @project    Open CSP-Management
  6.   * @package    dbms_field
  7.   * @category   field
  8.   *
  9.   * @author     Peter Krebs <pitlinz@sourceforge.net>
  10.   * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  11.   *
  12.   ***/
  13.  
  14.  
  15. /**
  16.   * interface to handle a form field
  17.   *
  18.   * @project    Open CSP-Management
  19.   * @package    dbms_field
  20.   * @category   field
  21.   *
  22.   * @author     Peter Krebs <pitlinz@sourceforge.net>
  23.   * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  24.   * 
  25.   * @since pk-08-01-30
  26.   * @version $Id: INFA_DBMS_FIELD.phpclass,v 1.3 2008/05/20 00:29:05 pitlinz Exp $
  27.   */
  28. interface INFA_DBMS_FIELD
  29. {
  30.  
  31.     // --------------------------------------------------------
  32.     // getter / setter
  33.     // --------------------------------------------------------
  34.  
  35.     /**
  36.       * returns the input name
  37.       *
  38.       * @return string 
  39.       *
  40.       */
  41.     public function getInputName();    
  42.         
  43.     /**
  44.       * returns a unique DOM id for the field
  45.       * 
  46.       * @return string 
  47.       * 
  48.       */
  49.     public function getDOMId();     
  50.     
  51.     
  52.     // --------------------------------------------------------
  53.     // field configuration
  54.     // --------------------------------------------------------
  55.       
  56.     /**
  57.       * returns the field definition form
  58.       *
  59.       * @param array $fldEditArr 
  60.       * @param boolen $debug 
  61.       *
  62.       * @return string (html)
  63.       * 
  64.       */
  65.     public function editTbl_getForm($fldEditArr=NULL,$debug=False);
  66.     
  67.     /**
  68.       * save the filed definition form
  69.       *
  70.       * @param boolean $debug 
  71.       * 
  72.       * @global array $_POST 
  73.       * 
  74.       * @returns boolean
  75.       *
  76.       */
  77.     public function editTabl_save($debug=False);
  78.     
  79.     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  80.     // view & control
  81.     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  82.  
  83.     /**
  84.      * sets the view object
  85.      * 
  86.      * @param OCSP_FRMVIEW $aView 
  87.      * @access public
  88.      */
  89.     public function setView(&$aView);
  90.  
  91.     /**
  92.      * returns the view object
  93.      * 
  94.      * @return OCSP_FRMVIEW 
  95.      * @access public
  96.      */
  97.     public function &getView();
  98.  
  99.     /** 
  100.      * sets the controll object
  101.      * 
  102.      * @param OCSP_FRMCONTR $aControll 
  103.      * @access public
  104.      */
  105.     public function setControll(&$aControll);
  106.  
  107.     /**
  108.      * returns the controll object
  109.      * 
  110.      * @return OCSP_FRMCONTR 
  111.      * @access public
  112.      */
  113.     public function &getControll();
  114.    
  115.     /**
  116.      * sets $this->myControll form $this->myForm if not pcf_is_instance_of $str_className
  117.      * 
  118.      * @param string $str_className 
  119.      * @param boolean $debug 
  120.      * 
  121.      * @return boolean 
  122.      */
  123.     public function checkControll($str_className='OCSP_FRMCONTR',$debug=False);
  124.     
  125.     // --------------------------------------------------------
  126.     // jOCSP
  127.     // --------------------------------------------------------
  128.     
  129.     /**
  130.      * returns an array of jOCSP/jQuery Modules which are required
  131.      * 
  132.      * $arr_ret[]="script url";
  133.      *
  134.      * @param boolean $debug 
  135.      * 
  136.      * @return string 
  137.      */
  138.     public function jOCSP_getRequiredModules($debug=False);
  139.     
  140.     /**
  141.      * returns the javascript code to register the field to an form
  142.      *
  143.      * @param boolean $debug 
  144.      * 
  145.      * @return string (json)
  146.      */
  147.     public function jOCSP_getFieldObj($debug=False);
  148.         
  149.     // --------------------------------------------------------
  150.     // html form output
  151.     // --------------------------------------------------------
  152.         
  153.     /**
  154.      * return the html tag for the label
  155.      * 
  156.      * @param int $mode 
  157.      * @param boolean $debug 
  158.      * 
  159.      * @return string 
  160.      *
  161.      */
  162.     public function getFormLabelTag($mode,$debug=False);  
  163.     
  164.     /**
  165.       * returns the html code for the field value input / show
  166.       *
  167.       * @param int $mode 
  168.       * @param mixed $aValue 
  169.       * @param boolean $debug 
  170.       *
  171.       * @return string 
  172.       *
  173.       */
  174.     public function getFormFieldTag($mode,$aValue=NULL,$debug=False);
  175.  
  176.     
  177.     // --------------------------------------------------------
  178.     // data validation
  179.     // --------------------------------------------------------
  180.     
  181.     /**
  182.       * returns the field value
  183.       *
  184.       * @param  string  $aValue     the value
  185.       * @param  array   $err        error array
  186.       * @param  string  $arrName    global data array name used for global ${$arrName}
  187.       * @param  bool    $debug 
  188.       *
  189.       * @return string 
  190.       *
  191.       */
  192.     function getValue($aValue,&$err,$arrName="DBVAL",$debug=False);    
  193. }
  194. ?>

Documentation generated on Thu, 08 Jan 2009 17:44:26 +0100 by phpDocumentor 1.4.0a2