private function parseSource()
    {
        if (null == $this->contactSource) {
            // Check Source existence and published status.
            $this->contactSource = $this->contactSourceModel->getEntity($this->sourceId);
            if (!$this->contactSource) {
                throw new ContactSourceException(
                    'The sourceId specified does not exist.',
                    Codes::HTTP_NOT_FOUND,
                    null,
                    Stat::TYPE_INVALID,
                    'sourceId'
                );
            } elseif (false === $this->contactSource->getIsPublished()) {
                throw new ContactSourceException(
                    'The sourceId specified has been unpublished (deactivated).',
                    Codes::HTTP_GONE,
                    null,
                    Stat::TYPE_INVALID,
                    'sourceId'
                );
            }
            $this->addTrace('contactSourceId', (int) $this->sourceId);
        }

        return $this;
    }
private function parseSource()
    {
        if (null == $this->contactSource) {
            // Check Source existence and published status.
            $this->contactSource = $this->contactSourceModel->getEntity($this->sourceId);
            if (!$this->contactSource) {
                throw new ContactSourceException(
                    'The sourceId specified does not exist.',
                    Codes::HTTP_NOT_FOUND,
                    null,
                    Stat::TYPE_INVALID,
                    'sourceId'
                );
            } elseif (false === $this->contactSource->getIsPublished()) {
                throw new ContactSourceException(
                    'The sourceId specified has been unpublished (deactivated).',
                    Codes::HTTP_GONE,
                    null,
                    Stat::TYPE_INVALID,
                    'sourceId'
                );
            }
            $this->addTrace('contactSourceId', (int) $this->sourceId);
        }

        return $this;
    }
private function parseSource ( ) { if ( null == $ this -> contactSource ) { // Check Source existence and published status. $ this -> contactSource = $ this -> contactSourceModel -> getEntity ( $ this -> sourceId ) ; if ( ! $ this -> contactSource ) { throw new ContactSourceException ( 'The sourceId specified does not exist.' , Codes :: HTTP_NOT_FOUND , null , Stat :: TYPE_INVALID , 'sourceId' ) ; } elseif ( false === $ this -> contactSource -> getIsPublished ( ) ) { throw new ContactSourceException ( 'The sourceId specified has been unpublished (deactivated).' , Codes :: HTTP_GONE , null , Stat :: TYPE_INVALID , 'sourceId' ) ; } $ this -> addTrace ( 'contactSourceId' , ( int ) $ this -> sourceId ) ; } return $ this ; }
Find and validate the source matching our parameters.

@return $this

@throws ContactSourceException
@throws \Exception
Find and validate the source matching our parameters .