public function getSubscription($name = null, $beginDateTime = null, $endDateTime = null, $fileName = null, $bookmark = null)
    {
        // Format date times
        if (null !== $beginDateTime) {
            $beginDateTime = $this->formatDateTime($beginDateTime);
        }

        if (null !== $endDateTime) {
            $endDateTime = $this->formatDateTime($endDateTime);
        }

        // If user provided a begin date time but no end date time, we assume the end date time is now
        if (null !== $beginDateTime && null === $endDateTime) {
            $endDateTime = $this->formatDateTime(time());
        }

        $this->name = $name;
        $this->beginDateTime = $beginDateTime;
        $this->endDateTime = $endDateTime;
        $this->fileName = $fileName;
        $this->bookmark = $bookmark;

        // Create request
        $access = $this->createAccess();
        $request = $this->createRequest();

        $this->response = $this->getRequest()->request($access, $request, $this->compileEndpointUrl(self::ENDPOINT));
        $response = $this->response->getResponse();

        if (null === $response) {
            throw new Exception('Failure (0): Unknown error', 0);
        }

        if ($response->Response->ResponseStatusCode == 0) {
            throw new Exception(
                "Failure ({$response->Response->Error->ErrorSeverity}): {$response->Response->Error->ErrorDescription}",
                (int)$response->Response->Error->ErrorCode
            );
        } else {
            if (isset($response->Bookmark)) {
                $this->setBookmark((string)$response->Bookmark);
            } else {
                $this->setBookmark(null);
            }

            return $this->formatResponse($response);
        }
    }
public function getSubscription($name = null, $beginDateTime = null, $endDateTime = null, $fileName = null, $bookmark = null)
    {
        
        if (null !== $beginDateTime) {
            $beginDateTime = $this->formatDateTime($beginDateTime);
        }

        if (null !== $endDateTime) {
            $endDateTime = $this->formatDateTime($endDateTime);
        }

        
        if (null !== $beginDateTime && null === $endDateTime) {
            $endDateTime = $this->formatDateTime(time());
        }

        $this->name = $name;
        $this->beginDateTime = $beginDateTime;
        $this->endDateTime = $endDateTime;
        $this->fileName = $fileName;
        $this->bookmark = $bookmark;

        
        $access = $this->createAccess();
        $request = $this->createRequest();

        $this->response = $this->getRequest()->request($access, $request, $this->compileEndpointUrl(self::ENDPOINT));
        $response = $this->response->getResponse();

        if (null === $response) {
            throw new Exception('Failure (0): Unknown error', 0);
        }

        if ($response->Response->ResponseStatusCode == 0) {
            throw new Exception(
                "Failure ({$response->Response->Error->ErrorSeverity}): {$response->Response->Error->ErrorDescription}",
                (int)$response->Response->Error->ErrorCode
            );
        } else {
            if (isset($response->Bookmark)) {
                $this->setBookmark((string)$response->Bookmark);
            } else {
                $this->setBookmark(null);
            }

            return $this->formatResponse($response);
        }
    }
public function getSubscription ( $ name = null , $ beginDateTime = null , $ endDateTime = null , $ fileName = null , $ bookmark = null ) { // Format date times if ( null !== $ beginDateTime ) { $ beginDateTime = $ this -> formatDateTime ( $ beginDateTime ) ; } if ( null !== $ endDateTime ) { $ endDateTime = $ this -> formatDateTime ( $ endDateTime ) ; } // If user provided a begin date time but no end date time, we assume the end date time is now if ( null !== $ beginDateTime && null === $ endDateTime ) { $ endDateTime = $ this -> formatDateTime ( time ( ) ) ; } $ this -> name = $ name ; $ this -> beginDateTime = $ beginDateTime ; $ this -> endDateTime = $ endDateTime ; $ this -> fileName = $ fileName ; $ this -> bookmark = $ bookmark ; // Create request $ access = $ this -> createAccess ( ) ; $ request = $ this -> createRequest ( ) ; $ this -> response = $ this -> getRequest ( ) -> request ( $ access , $ request , $ this -> compileEndpointUrl ( self :: ENDPOINT ) ) ; $ response = $ this -> response -> getResponse ( ) ; if ( null === $ response ) { throw new Exception ( 'Failure (0): Unknown error' , 0 ) ; } if ( $ response -> Response -> ResponseStatusCode == 0 ) { throw new Exception ( "Failure ({$response->Response->Error->ErrorSeverity}): {$response->Response->Error->ErrorDescription}" , ( int ) $ response -> Response -> Error -> ErrorCode ) ; } else { if ( isset ( $ response -> Bookmark ) ) { $ this -> setBookmark ( ( string ) $ response -> Bookmark ) ; } else { $ this -> setBookmark ( null ) ; } return $ this -> formatResponse ( $ response ) ; } }
Get a QuantumView subscription.

@param string $name Name of subscription requested by user.
@param string $beginDateTime Beginning date time for the retrieval criteria of the subscriptions. Format: Y-m-d H:i:s or Unix timestamp.
@param string $endDateTime Ending date time for the retrieval criteria of the subscriptions. Format: Y-m-d H:i:s or Unix timestamp.
@param string $fileName File name of specific subscription requested by user.
@param string $bookmark Bookmarks the file for next retrieval.

@throws Exception

@return ArrayObject
Get a QuantumView subscription .