/**
  * Method to create a new condition type.
  *
  * @access  public
  * @author  Jonathan Abrahams
  * @param   string Reference name for the condition
  * @version V0.1
  * @see     condition::test()
  * @see     condition::evaluate()
  */
 function create($name, $className, $moduleName)
 {
     // Disable insert / Retrieve
     $tmp = $this->enableAutoInsertRetrieveId;
     $this->enableAutoInsertRetrieveId = FALSE;
     parent::create($name);
     $this->enableAutoInsertRetrieveId = $tmp;
     // Store Condition Type.
     $this->_conditionTypeClassName = $className;
     $this->_conditionTypeModuleName = $moduleName;
     // Db fields and values to store
     $this->_dbData['classname'] = $className;
     $this->_dbData['modulename'] = $moduleName;
     // Ok ready to do insert or retrive.
     if ($this->enableAutoInsertRetrieveId) {
         $this->autoInsertRetrieveId();
     }
     return $this;
 }
 /**
  * Method to create a new object.
  *
  * @access public
  * @param  string Reference name for the object
  * @return action Returns this object.
  */
 public function create($name)
 {
     $this->_arrChildren = array();
     return parent::create($name);
 }
예제 #3
0
 /**
  * Method to create a new instance.
  *
  * @access  public   
  * @author  Jonathan Abrahams
  * @param   string    Reference name for the condition
  * @return  condition Returns this condition object.
  * @version V0.1
  */
 function create($name, $params = 'isAdmin')
 {
     // Disable insert / Retrieve
     $tmp = $this->enableAutoInsertRetrieveId;
     $this->enableAutoInsertRetrieveId = FALSE;
     parent::create($name);
     $this->enableAutoInsertRetrieveId = $tmp;
     // Set dbData and unPack params
     $this->setProperties($params);
     // Ok ready to do insert or retrive.
     if ($this->enableAutoInsertRetrieveId) {
         $this->autoInsertRetrieveId();
     }
     return $this;
 }