lib/DataSift/Historic.php
public function stop()
    {
        if ($this->_deleted) {
            throw new DataSift_Exception_InvalidData('Cannot stop a deleted Historic.');
        }

        if ($this->_playback_id === false || strlen($this->_playback_id) == 0) {
            throw new DataSift_Exception_InvalidData('Cannot stop a historic query that hasn\'t been prepared.');
        }

        try {
            $res = $this->_user->post(
                'historics/stop',
                array(
                    'id' => $this->_playback_id,
                )
            );
        } catch (DataSift_Exception_APIError $e) {
            switch ($e->getCode()) {
                case 400:
                    // Missing or invalid parameters
                    throw new DataSift_Exception_InvalidData($e->getMessage());

                case 404:
                    // Historic query not found
                    throw new DataSift_Exception_InvalidData($e->getMessage());

                default:
                    throw new DataSift_Exception_APIError(
                        'Unexpected APIError code: ' . $e->getCode() . ' [' . $e->getMessage() . ']'
                    );
            }
        }
    }
public function stop()
    {
        if ($this->_deleted) {
            throw new DataSift_Exception_InvalidData('Cannot stop a deleted Historic.');
        }

        if ($this->_playback_id === false || strlen($this->_playback_id) == 0) {
            throw new DataSift_Exception_InvalidData('Cannot stop a historic query that hasn\'t been prepared.');
        }

        try {
            $res = $this->_user->post(
                'historics/stop',
                array(
                    'id' => $this->_playback_id,
                )
            );
        } catch (DataSift_Exception_APIError $e) {
            switch ($e->getCode()) {
                case 400:
                    // Missing or invalid parameters
                    throw new DataSift_Exception_InvalidData($e->getMessage());

                case 404:
                    // Historic query not found
                    throw new DataSift_Exception_InvalidData($e->getMessage());

                default:
                    throw new DataSift_Exception_APIError(
                        'Unexpected APIError code: ' . $e->getCode() . ' [' . $e->getMessage() . ']'
                    );
            }
        }
    }
public function stop ( ) { if ( $ this -> _deleted ) { throw new DataSift_Exception_InvalidData ( 'Cannot stop a deleted Historic.' ) ; } if ( $ this -> _playback_id === false || strlen ( $ this -> _playback_id ) == 0 ) { throw new DataSift_Exception_InvalidData ( 'Cannot stop a historic query that hasn\'t been prepared.' ) ; } try { $ res = $ this -> _user -> post ( 'historics/stop' , array ( 'id' => $ this -> _playback_id , ) ) ; } catch ( DataSift_Exception_APIError $ e ) { switch ( $ e -> getCode ( ) ) { case 400 : // Missing or invalid parameters throw new DataSift_Exception_InvalidData ( $ e -> getMessage ( ) ) ; case 404 : // Historic query not found throw new DataSift_Exception_InvalidData ( $ e -> getMessage ( ) ) ; default : throw new DataSift_Exception_APIError ( 'Unexpected APIError code: ' . $ e -> getCode ( ) . ' [' . $ e -> getMessage ( ) . ']' ) ; } } }
Stop this historic query.

@return void
@throws DataSift_Exception_APIError
@throws DataSift_Exception_InvalidData
Stop this historic query .