DataSift_Historic::getHash PHP Method

getHash() public method

Returns the playback ID for this historic. If the historic has not yet been prepared that will be done automagically to obtain the ID.
public getHash ( ) : string
return string The playback ID.
    public function getHash()
    {
        if ($this->_playback_id === false) {
            $this->prepare();
        }
        return $this->_playback_id;
    }

Usage Example

Esempio n. 1
0
 /**
  * Displays details of a Historics query.
  *
  * @param DataSift_Historic $hist A DataSift Historics object
  */
 public function displayHistoricDetails($hist)
 {
     echo 'Playback ID: ' . $hist->getHash() . PHP_EOL;
     echo 'Stream hash: ' . $hist->getStreamHash() . PHP_EOL;
     echo 'Name:        ' . $hist->getName() . PHP_EOL;
     echo 'Start time:  ' . date('r', $hist->getStartDate()) . PHP_EOL;
     echo 'End time:    ' . date('r', $hist->getEndDate()) . PHP_EOL;
     $sources = $hist->getSources();
     echo 'Source' . (count($sources) == 1 ? ': ' : 's:') . '     ' . implode(', ', $sources) . PHP_EOL;
     echo 'Sample:      ' . $hist->getSample() . PHP_EOL;
     echo 'Created at:  ' . (is_null($hist->getCreatedAt()) ? 'null' : date('r', $hist->getCreatedAt())) . PHP_EOL;
     echo 'Status:      ' . $hist->getStatus() . PHP_EOL;
 }
All Usage Examples Of DataSift_Historic::getHash