public static function batchDryRun($json)
    {
        $fields = Deserialize::_fromJson($json);

        $result = new Api\MtBatchDryRunResult();
        $result->setNumberOfRecipients($fields->number_of_recipients);
        $result->setNumberOfMessages($fields->number_of_messages);

        if (isset($fields->per_recipient)) {
            $result->setPerRecipient(
                array_map(
                    function ($s) {
                        $pr = new Api\DryRunPerRecipient();
                        $pr->setRecipient($s->recipient);
                        $pr->setNumberOfParts($s->number_of_parts);
                        $pr->setBody($s->body);
                        $pr->setEncoding($s->encoding);
                        return $pr;
                    },
                    $fields->per_recipient
                )
            );
        }

        return $result;
    }
public static function batchDryRun($json)
    {
        $fields = Deserialize::_fromJson($json);

        $result = new Api\MtBatchDryRunResult();
        $result->setNumberOfRecipients($fields->number_of_recipients);
        $result->setNumberOfMessages($fields->number_of_messages);

        if (isset($fields->per_recipient)) {
            $result->setPerRecipient(
                array_map(
                    function ($s) {
                        $pr = new Api\DryRunPerRecipient();
                        $pr->setRecipient($s->recipient);
                        $pr->setNumberOfParts($s->number_of_parts);
                        $pr->setBody($s->body);
                        $pr->setEncoding($s->encoding);
                        return $pr;
                    },
                    $fields->per_recipient
                )
            );
        }

        return $result;
    }
public static function batchDryRun ( $ json ) { $ fields = Deserialize :: _fromJson ( $ json ) ; $ result = new Api \ MtBatchDryRunResult ( ) ; $ result -> setNumberOfRecipients ( $ fields -> number_of_recipients ) ; $ result -> setNumberOfMessages ( $ fields -> number_of_messages ) ; if ( isset ( $ fields -> per_recipient ) ) { $ result -> setPerRecipient ( array_map ( function ( $ s ) { $ pr = new Api \ DryRunPerRecipient ( ) ; $ pr -> setRecipient ( $ s -> recipient ) ; $ pr -> setNumberOfParts ( $ s -> number_of_parts ) ; $ pr -> setBody ( $ s -> body ) ; $ pr -> setEncoding ( $ s -> encoding ) ; return $ pr ; } , $ fields -> per_recipient ) ) ; } return $ result ; }
Reads a JSON formatted string describing a dry-run result.

@param string $json the JSON text

@return Api\MtBatchDryRunResult the parsed result
Reads a JSON formatted string describing a dry - run result .