Esempio n. 1
0
 /**
  * @param Users_UserStruct $input
  *
  * @return Users_UserStruct
  * @throws Exception
  */
 public function sanitize($input)
 {
     $con = Database::obtain();
     parent::_sanitizeInput($input, self::STRUCT_TYPE);
     $input->uid = $input->uid !== null ? (int) $input->uid : null;
     $input->email = $input->email !== null ? $con->escape($input->email) : null;
     $input->create_date = $input->create_date !== null ? $con->escape($input->create_date) : null;
     $input->first_name = $input->first_name !== null ? $con->escape($input->first_name) : null;
     $input->last_name = $input->last_name !== null ? $con->escape($input->last_name) : null;
     return $input;
 }
Esempio n. 2
0
 public function sanitize($input)
 {
     $cloned = clone $input;
     parent::_sanitizeInput($input, self::STRUCT_TYPE);
     $cloned->id_job = self::intWithNull($input->id_job);
     $cloned->id_segment = self::intWithNull($input->id_segment);
     $cloned->uid = self::intWithNull($input->uid);
     $cloned->source_page = self::intWithNull($input->source_page);
     $cloned->message_type = self::intWithNull($input->message_type);
     $cloned->first_segment = self::intWithNull($input->first_segment);
     $cloned->last_segment = self::intWithNull($input->last_segment);
     $cloned->message = self::escapeWithNull(trim($input->message));
     $cloned->email = self::escapeWithNull($input->email);
     $cloned->full_name = self::escapeWithNull($input->full_name);
     $cloned->create_date = self::escapeWithNull($input->create_date);
     $cloned->resolve_date = self::escapeWithNull($input->resolve_date);
     return $cloned;
 }
Esempio n. 3
0
 /**
  * @param Revise_ReviseStruct $input
  *
  * @return Revise_ReviseStruct
  * @throws Exception
  */
 public function sanitize(Revise_ReviseStruct $input)
 {
     return parent::_sanitizeInput($input, self::STRUCT_TYPE);
 }
Esempio n. 4
0
 /**
  * @param ErrorCount_Struct $input
  *
  * @return ErrorCount_Struct
  * @throws Exception
  */
 public function sanitize($input)
 {
     return parent::_sanitizeInput($input, self::STRUCT_TYPE);
 }
Esempio n. 5
0
 /**
  * @param TranslationsSplit_SplitStruct $input
  *
  * @return TranslationsSplit_SplitStruct
  * @throws Exception
  */
 public function sanitize($input)
 {
     $con = Database::obtain();
     parent::_sanitizeInput($input, self::STRUCT_TYPE);
     $input->id_segment = $input->id_segment !== null ? $input->id_segment : null;
     $input->id_job = $input->id_job !== null ? $input->id_job : null;
     $input->source_chunk_lengths = $input->source_chunk_lengths !== null ? $con->escape(json_encode($input->source_chunk_lengths)) : null;
     $input->target_chunk_lengths = $input->target_chunk_lengths !== null ? $con->escape(json_encode($input->target_chunk_lengths)) : null;
     return $input;
 }
Esempio n. 6
0
 /**
  * @param EnginesModel_EngineStruct $input
  *
  * @return EnginesModel_EngineStruct
  * @throws Exception
  */
 public function sanitize($input)
 {
     $con = Database::obtain();
     parent::_sanitizeInput($input, self::STRUCT_TYPE);
     $input->name = $input->name !== null ? $con->escape($input->name) : null;
     $input->description = $input->description !== null ? $con->escape($input->description) : null;
     $input->base_url = $input->base_url !== null ? $con->escape($input->base_url) : null;
     $input->translate_relative_url = $input->translate_relative_url !== null ? $con->escape($input->translate_relative_url) : null;
     $input->contribute_relative_url = $input->contribute_relative_url !== null ? $con->escape($input->contribute_relative_url) : null;
     $input->delete_relative_url = $input->delete_relative_url !== null ? $con->escape($input->delete_relative_url) : null;
     $input->others = $input->others !== null ? $con->escape(json_encode($input->others)) : "{}";
     $input->class_load = $input->class_load !== null ? $con->escape($input->class_load) : null;
     $input->extra_parameters = $input->extra_parameters !== null ? $con->escape(json_encode($input->extra_parameters)) : '{}';
     $input->penalty = $input->penalty !== null ? $input->penalty : null;
     $input->active = $input->active !== null ? $input->active : null;
     $input->uid = $input->uid !== null ? $input->uid : null;
     return $input;
 }
Esempio n. 7
0
 /**
  * See parent definition.
  * @see DataAccess_AbstractDao::sanitizeArray
  *
  * @param array $input
  *
  * @return array
  */
 public static function sanitizeArray(array $input)
 {
     return parent::_sanitizeInputArray($input, self::STRUCT_TYPE);
 }