コード例 #1
0
 /**
  * Use the config.checkfront_map on the model instance to map from data object
  * to an array.
  *
  * @param string $forAction
  * @param bool $skipNulls - don't put null values from this dataobject in output array.
  * @return null|array - might be empty.
  * @throws CheckfrontException
  */
 public function toCheckfront($forAction, $skipNulls = true)
 {
     if (!($map = $this->checkfront_map($forAction))) {
         throw new CheckfrontException("No map for action '{$forAction}'", CheckfrontException::TypeError);
     }
     return CheckfrontModule::model_to_map($this->toMap(), $map, $skipNulls);
 }