public function getResult()
    {
        $result = [];

        // Allowed fields.
        if ($this->verbose) {
            $result['allowedFields'] = $this->getAllowedFields();
        }

        // Attribution (cost) applied.
        if ($this->verbose) {
            // Attribution in this context is the revenue/cost for the third party.
            $result['attribution'] = $this->attribution;
        }

        // Authentication.
        if ($this->verbose) {
            $result['authenticated'] = $this->authenticated;
        }

        // Campaign.
        if ($this->campaign) {
            $result['campaign']         = [];
            $result['campaign']['id']   = $this->campaign->getId();
            $result['campaign']['name'] = $this->campaign->getName();
            if ($this->verbose) {
                $result['campaign']['description'] = $this->campaign->getDescription();
                $result['campaign']['category']    = $this->campaign->getCategory();
            }
        }

        if ($this->verbose) {
            // These are campaigns that the contact was added to during kickoff events.
            // It is not a given that all children will be here, only those that we know about during this request.
            // I am including this to aid in debugging of the new parallel functionality.
            $result['campaigns'] = $this->contactCampaigns;
        }

        // Contact.
        $result['contact'] = null;
        if ($this->contact) {
            // This is a simplified output of the "Contact"
            // It is a flat array, containing only the fields that we accepted and used to create the contact.
            // It does not include the same entity structure as you would find in the core API.
            $result['contact']       = [];
            $result['contact']['id'] = $this->contact->getId();
            if ($this->verbose) {
                $result['contact']['fields'] = $this->fieldsStored;
            }
        }

        // Errors.
        $result['errors'] = null;
        if ($this->errors) {
            $result['errors'] = $this->errors;
        }

        // Events (for real-time campaigns).
        if ($this->verbose) {
            $result['events'] = $this->events;
        }

        // Real-Time.
        if ($this->verbose) {
            $result['realTime'] = $this->realTime;
        }

        // Source.
        if ($this->contactSource) {
            $result['source']         = [];
            $result['source']['id']   = $this->contactSource->getId();
            $result['source']['name'] = $this->contactSource->getName();
            if ($this->verbose) {
                $result['source']['category']      = $this->contactSource->getCategory();
                $result['source']['description']   = $this->contactSource->getDescriptionPublic();
                $result['source']['documentation'] = $this->contactSource->getDocumentation();
            }
        }

        // Status.
        if ($this->verbose) {
            $result['status'] = $this->status;
        }

        // HTTP Status Code.
        $result['statusCode'] = $this->statusCode;

        // Success boolean.
        $result['success'] = $this->valid;

        // UTM Source.
        if ($this->verbose) {
            $result['utmSource'] = $this->utmSource;
        }

        return $result;
    }
public function getResult()
    {
        $result = [];

        // Allowed fields.
        if ($this->verbose) {
            $result['allowedFields'] = $this->getAllowedFields();
        }

        // Attribution (cost) applied.
        if ($this->verbose) {
            // Attribution in this context is the revenue/cost for the third party.
            $result['attribution'] = $this->attribution;
        }

        // Authentication.
        if ($this->verbose) {
            $result['authenticated'] = $this->authenticated;
        }

        // Campaign.
        if ($this->campaign) {
            $result['campaign']         = [];
            $result['campaign']['id']   = $this->campaign->getId();
            $result['campaign']['name'] = $this->campaign->getName();
            if ($this->verbose) {
                $result['campaign']['description'] = $this->campaign->getDescription();
                $result['campaign']['category']    = $this->campaign->getCategory();
            }
        }

        if ($this->verbose) {
            // These are campaigns that the contact was added to during kickoff events.
            // It is not a given that all children will be here, only those that we know about during this request.
            // I am including this to aid in debugging of the new parallel functionality.
            $result['campaigns'] = $this->contactCampaigns;
        }

        // Contact.
        $result['contact'] = null;
        if ($this->contact) {
            // This is a simplified output of the "Contact"
            // It is a flat array, containing only the fields that we accepted and used to create the contact.
            // It does not include the same entity structure as you would find in the core API.
            $result['contact']       = [];
            $result['contact']['id'] = $this->contact->getId();
            if ($this->verbose) {
                $result['contact']['fields'] = $this->fieldsStored;
            }
        }

        // Errors.
        $result['errors'] = null;
        if ($this->errors) {
            $result['errors'] = $this->errors;
        }

        // Events (for real-time campaigns).
        if ($this->verbose) {
            $result['events'] = $this->events;
        }

        // Real-Time.
        if ($this->verbose) {
            $result['realTime'] = $this->realTime;
        }

        // Source.
        if ($this->contactSource) {
            $result['source']         = [];
            $result['source']['id']   = $this->contactSource->getId();
            $result['source']['name'] = $this->contactSource->getName();
            if ($this->verbose) {
                $result['source']['category']      = $this->contactSource->getCategory();
                $result['source']['description']   = $this->contactSource->getDescriptionPublic();
                $result['source']['documentation'] = $this->contactSource->getDocumentation();
            }
        }

        // Status.
        if ($this->verbose) {
            $result['status'] = $this->status;
        }

        // HTTP Status Code.
        $result['statusCode'] = $this->statusCode;

        // Success boolean.
        $result['success'] = $this->valid;

        // UTM Source.
        if ($this->verbose) {
            $result['utmSource'] = $this->utmSource;
        }

        return $result;
    }
public function getResult ( ) { $ result = [ ] ; // Allowed fields. if ( $ this -> verbose ) { $ result [ 'allowedFields' ] = $ this -> getAllowedFields ( ) ; } // Attribution (cost) applied. if ( $ this -> verbose ) { // Attribution in this context is the revenue/cost for the third party. $ result [ 'attribution' ] = $ this -> attribution ; } // Authentication. if ( $ this -> verbose ) { $ result [ 'authenticated' ] = $ this -> authenticated ; } // Campaign. if ( $ this -> campaign ) { $ result [ 'campaign' ] = [ ] ; $ result [ 'campaign' ] [ 'id' ] = $ this -> campaign -> getId ( ) ; $ result [ 'campaign' ] [ 'name' ] = $ this -> campaign -> getName ( ) ; if ( $ this -> verbose ) { $ result [ 'campaign' ] [ 'description' ] = $ this -> campaign -> getDescription ( ) ; $ result [ 'campaign' ] [ 'category' ] = $ this -> campaign -> getCategory ( ) ; } } if ( $ this -> verbose ) { // These are campaigns that the contact was added to during kickoff events. // It is not a given that all children will be here, only those that we know about during this request. // I am including this to aid in debugging of the new parallel functionality. $ result [ 'campaigns' ] = $ this -> contactCampaigns ; } // Contact. $ result [ 'contact' ] = null ; if ( $ this -> contact ) { // This is a simplified output of the "Contact" // It is a flat array, containing only the fields that we accepted and used to create the contact. // It does not include the same entity structure as you would find in the core API. $ result [ 'contact' ] = [ ] ; $ result [ 'contact' ] [ 'id' ] = $ this -> contact -> getId ( ) ; if ( $ this -> verbose ) { $ result [ 'contact' ] [ 'fields' ] = $ this -> fieldsStored ; } } // Errors. $ result [ 'errors' ] = null ; if ( $ this -> errors ) { $ result [ 'errors' ] = $ this -> errors ; } // Events (for real-time campaigns). if ( $ this -> verbose ) { $ result [ 'events' ] = $ this -> events ; } // Real-Time. if ( $ this -> verbose ) { $ result [ 'realTime' ] = $ this -> realTime ; } // Source. if ( $ this -> contactSource ) { $ result [ 'source' ] = [ ] ; $ result [ 'source' ] [ 'id' ] = $ this -> contactSource -> getId ( ) ; $ result [ 'source' ] [ 'name' ] = $ this -> contactSource -> getName ( ) ; if ( $ this -> verbose ) { $ result [ 'source' ] [ 'category' ] = $ this -> contactSource -> getCategory ( ) ; $ result [ 'source' ] [ 'description' ] = $ this -> contactSource -> getDescriptionPublic ( ) ; $ result [ 'source' ] [ 'documentation' ] = $ this -> contactSource -> getDocumentation ( ) ; } } // Status. if ( $ this -> verbose ) { $ result [ 'status' ] = $ this -> status ; } // HTTP Status Code. $ result [ 'statusCode' ] = $ this -> statusCode ; // Success boolean. $ result [ 'success' ] = $ this -> valid ; // UTM Source. if ( $ this -> verbose ) { $ result [ 'utmSource' ] = $ this -> utmSource ; } return $ result ; }
Get the result array of the import process.

@return array
Get the result array of the import process .