Source for file INFA_OCSP_FORM.phpclass

Documentation is available at INFA_OCSP_FORM.phpclass

  1. <?php
  2. /**
  3.   * interface file INFA_OCSP_FORM.phpclass
  4.   *
  5.   * @project    Open CSP-Management
  6.   * @package    dbms
  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.   * @version $Id: INFA_OCSP_FORM.phpclass,v 1.3 2008/07/03 17:40:01 pitlinz Exp $
  13.   */
  14.  
  15. /**#@+
  16.  * form mode constants
  17.  */
  18.     if (!defined('FRM_MODE_READONLY')) define('FRM_MODE_READONLY',0);
  19.     if (!defined('FRM_MODE_NEW')) define('FRM_MODE_NEW',1);
  20.     if (!defined('FRM_MODE_EDIT')) define('FRM_MODE_EDIT',2);
  21.     if (!defined('FRM_MODE_HIDDEN')) define('FRM_MODE_HIDDEN',3);
  22.     if (!defined('FRM_MODE_LIST')) define('FRM_MODE_LIST',4);
  23.     if (!defined('FRM_MODE_SEARCH')) define('FRM_MODE_SEARCH',5);
  24.     if (!defined('FRM_MODE_DELETE')) define('FRM_MODE_DELETE',6);
  25.     if (!defined('FRM_MODE_COPY')) define('FRM_MODE_COPY',7);
  26. /**#@-*/  
  27.  
  28. /**
  29.   * interface to handle a (database) form object
  30.   *
  31.   * @project    Open CSP-Management
  32.   * @package    dbms
  33.   *
  34.   * @author     Peter Krebs <pitlinz@sourceforge.net>
  35.   * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  36.   * 
  37.   * @since pk-08-01-31
  38.   * @version $Id: INFA_OCSP_FORM.phpclass,v 1.3 2008/07/03 17:40:01 pitlinz Exp $
  39.   */
  40. interface INFA_OCSP_FORM
  41. {
  42.  
  43.     // ------------------------------------------------------
  44.     // form global commands / actions
  45.     // ------------------------------------------------------
  46.     
  47.     /**
  48.       * @param string $method (POST|GET)
  49.       * @param string $contrClass (sub)class Name of OCSP_FRMCONTR
  50.       * @param boolean $debug 
  51.       *
  52.       * @return boolean (True if no error found)
  53.       */
  54.     public function checkSubmitData($method="",$debug=False);    
  55.     
  56.     /**
  57.      * get main commands for the form
  58.      * 
  59.      * used keywords:
  60.      * - js: execute a java script
  61.      * - default: open url
  62.      * 
  63.      * @param int $mode 
  64.      * @param string $type ([ACTION|NEXT|RELOAD])
  65.      *
  66.      * @return string 
  67.      */
  68.     public function getSubmitAction($mode,$type='ACTION');
  69.  
  70.    /**
  71.      * sets a main cmmonad of the form
  72.      * 
  73.      * used keywords:
  74.      * - js: execute a java script
  75.      * - default: open url
  76.      *  
  77.      * @param int $mode 
  78.      * @param string $uri 
  79.      * @param string $type ([ACTION|NEXT|RELOAD])
  80.      *
  81.      * @return string 
  82.      * 
  83.      */
  84.     public function setSubmitAction($mode,$uri,$type='ACTION')
  85.  
  86.     /**
  87.      * add some values to the forms (hidden) command fields
  88.      * 
  89.      * @param boolean $debug 
  90.      * 
  91.      * @return array 
  92.      * 
  93.      * @since pk-07-12-17
  94.      * 
  95.      */    
  96.     function getFormCmdFields($debug=False);
  97.  
  98.     // ------------------------------------------------------
  99.     // controll methods
  100.     // ------------------------------------------------------
  101.     
  102.     /**
  103.       * @return OCSP_FRMCONTR 
  104.       */
  105.     function &getControll();
  106.  
  107.     /**
  108.       * instantiates a new class if $this->myControll not type of $contrClass
  109.       *
  110.       * NOTE the class must exists or have it's code in __FILE__
  111.       *
  112.       * @param string $contrClass 
  113.       * @param boolean $debug 
  114.       *
  115.       * @returns OCSP_FRMCONTR
  116.       */
  117.     function &getControllObj($contrClass="OCSP_FRMCONTR",$debug=False);    
  118.     
  119.     /**
  120.       * if $contrClass is not set to "NO" a controll object will be created
  121.       * if none exists ($this->myControll) is empty
  122.       *
  123.       * if $contrClass is set to "NO" $this->myControll is returned as is
  124.       * without checking that we
  125.       *
  126.       * @param string $contrClass 
  127.       * @param boolean $debug 
  128.       * @return OCSP_FRMCONTR_LIST 
  129.       */
  130.     function &getListControll($contrClass="OCSP_FRMCONTR_LIST",$debug=False);    
  131.     
  132.     /**
  133.      *  sets a controll
  134.      * 
  135.      * NOTE also changes the controll in $this->myView
  136.      *      and sets the view in $aControll if $sync is True
  137.      *
  138.      * @param OCSP_FRMCONTR $aControll 
  139.      * @param boolean $sync 
  140.      * @param boolean $debug 
  141.      *
  142.      * @access public
  143.      */
  144.     function setControll(&$aControll,$sync=True$debug=False);    
  145.     
  146.     // ------------------------------------------------------
  147.     // view methods
  148.     // ------------------------------------------------------
  149.      
  150.     /**
  151.       * @return OCSP_FRMVIEW 
  152.       */
  153.     function getView();
  154.  
  155.     /**
  156.       * instantiates a new class if $this->myControll not type of $contrClass
  157.       *
  158.       * NOTE the class must exists or have it's code in __FILE__
  159.       *
  160.       * @param string $viewClass 
  161.       * @param boolean $debug 
  162.       * @return OCSP_FRMVIEW 
  163.       *
  164.       */
  165.     function &getViewObj($viewClass="OCSP_FRMVIEW",$debug=False);
  166.  
  167.     /**
  168.       * @param string $viewClass 
  169.       * @param boolean $debug 
  170.       * @return OCSP_FRMVIEW_LIST 
  171.       */
  172.     function &getListView($viewClass="OCSP_FRMVIEW_LIST",$debug=False);    
  173.     
  174.     // ------------------------------------------------------
  175.     // jOCSP
  176.     // ------------------------------------------------------
  177.     
  178.     
  179. }
  180. ?>

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