private function parseCampaign()
    {
        if (null == $this->campaign) {
            // Check Campaign existence and published status.
            $this->campaign = $this->campaignModel->getEntity($this->campaignId);
            if (!$this->campaign) {
                throw new ContactSourceException(
                    'The campaignId specified does not exist.',
                    Codes::HTTP_GONE,
                    null,
                    Stat::TYPE_INVALID,
                    'campaignId'
                );
            } elseif (
                false === $this->campaign->getIsPublished()
                && !$this->contactSource->getInternal()
            ) {
                throw new ContactSourceException(
                    'The campaignId specified has been unpublished (deactivated).',
                    Codes::HTTP_GONE,
                    null,
                    Stat::TYPE_INVALID,
                    'campaignId'
                );
            }
            $this->addTrace('contactSourceCampaignId', (int) $this->campaignId);
        }

        return $this;
    }
private function parseCampaign()
    {
        if (null == $this->campaign) {
            // Check Campaign existence and published status.
            $this->campaign = $this->campaignModel->getEntity($this->campaignId);
            if (!$this->campaign) {
                throw new ContactSourceException(
                    'The campaignId specified does not exist.',
                    Codes::HTTP_GONE,
                    null,
                    Stat::TYPE_INVALID,
                    'campaignId'
                );
            } elseif (
                false === $this->campaign->getIsPublished()
                && !$this->contactSource->getInternal()
            ) {
                throw new ContactSourceException(
                    'The campaignId specified has been unpublished (deactivated).',
                    Codes::HTTP_GONE,
                    null,
                    Stat::TYPE_INVALID,
                    'campaignId'
                );
            }
            $this->addTrace('contactSourceCampaignId', (int) $this->campaignId);
        }

        return $this;
    }
private function parseCampaign ( ) { if ( null == $ this -> campaign ) { // Check Campaign existence and published status. $ this -> campaign = $ this -> campaignModel -> getEntity ( $ this -> campaignId ) ; if ( ! $ this -> campaign ) { throw new ContactSourceException ( 'The campaignId specified does not exist.' , Codes :: HTTP_GONE , null , Stat :: TYPE_INVALID , 'campaignId' ) ; } elseif ( false === $ this -> campaign -> getIsPublished ( ) && ! $ this -> contactSource -> getInternal ( ) ) { throw new ContactSourceException ( 'The campaignId specified has been unpublished (deactivated).' , Codes :: HTTP_GONE , null , Stat :: TYPE_INVALID , 'campaignId' ) ; } $ this -> addTrace ( 'contactSourceCampaignId' , ( int ) $ this -> campaignId ) ; } return $ this ; }
Load and validate the campaign based on our parameters.

@return $this

@throws ContactSourceException
@throws \Exception
Load and validate the campaign based on our parameters .