Example #1
0
 /**
  * This methods sets additional parameters for this operation
  * Note: For update operations, nothing by default
  *
  * @param $param 	Array with additional parameters
  */
 public function setParams($params)
 {
     parent::setParams($params);
     if (empty($params['mode'])) {
         $this->mode = 0;
     } else {
         $this->mode = $params['mode'];
     }
     if (empty($params['metastamp'])) {
         $this->metastamp = false;
     } else {
         $this->metastamp = (int) $params['metastamp'];
     }
     if (!empty($params['attribute_dt']) && is_array($params['attribute_dt'])) {
         $this->attribute_datetime = $params['attribute_dt'];
     }
 }
 /**
  * Checks, if all necesarry parameters for this operation are provided
  *
  * @param unknown $params
  */
 public function checkParams($params)
 {
     if (parent::checkParams($params)) {
         $name_with_idx = $this->getNameWithIdx();
         if (empty($params['dataset'][$name_with_idx . '_tz'])) {
             return false;
         }
         return true;
     } else {
         return false;
     }
 }
 /**
  * This methods sets additional parameters for this operation
  * Note: For update operations, nothing by default
  *
  * @param $param 	Array with additional parameters
  */
 public function setParams($params)
 {
     parent::setParams($params);
     if (empty($params['allow_add'])) {
         $this->allow_add = false;
     } else {
         $this->allow_add = $params['allow_add'];
     }
     if (empty($params['metastamp'])) {
         $this->metastamp = false;
     } else {
         $this->metastamp = (int) $params['metastamp'];
     }
     if (empty($params['model'])) {
         $this->model = new \Dsc\Mongo\Collections\Categories();
     } else {
         $this->model = $params['model'];
     }
     if (!empty($params['attribute_dt']) && is_array($params['attribute_dt'])) {
         $this->attribute_datetime = $params['attribute_dt'];
     }
 }