示例#1
0
 public static function buildFromJSON($vo_json)
 {
     $o_moto = new MOTO();
     if (array_key_exists("moto_processing_methods", $vo_json)) {
         $o_processing_methods = $vo_json["moto_processing_methods"];
         for ($n_index = 0, $n_size = count($o_processing_methods); $n_index < $n_size; $n_index++) {
             $o_moto->addProcessingMethod($o_processing_methods[$n_index]);
         }
     }
     if (array_key_exists("moto_order_forms", $vo_json)) {
         $o_moto->setOrderForms($vo_json["moto_order_forms"]);
     }
     if (array_key_exists("moto_software_retain", $vo_json)) {
         $o_moto->setSoftwareRetain($vo_json["moto_software_retain"]);
     }
     if (array_key_exists("moto_outbound_marketing", $vo_json)) {
         $o_outbound_marketing = $vo_json["moto_outbound_marketing"];
         for ($n_index = 0, $n_size = count($o_outbound_marketing); $n_index < $n_size; $n_index++) {
             $o_moto->addOutboundMarketing($o_outbound_marketing[$n_index]);
         }
     }
     if (array_key_exists("moto_outbound_telemarketing_is_conducted", $vo_json)) {
         $o_moto->setOutboundTelemarketingIsConducted($vo_json["moto_outbound_telemarketing_is_conducted"]);
     }
     return $o_moto;
 }