lib/DataSift/HistoricPreview.php
public function fromResponse(array $data)
    {
        $map = array(
            'id' => 'setId',
            'start' => 'setStart',
            'end' => 'setEnd',
            'hash' => 'setHash',
            'parameters' => 'setParameters',
            'created_at' => 'setCreatedAt',
            //only present in responses
            'progress' => 'setProgress',
            'status' => 'setStatus',
            'feeds' => 'setFeeds',
            'sample' => 'setSample',
            'data' => 'setData',
        );

        foreach ($map as $key => $setter) {
            if (isset($data[$key])) {
                $this->$setter($data[$key]);
            }
        }

        return $this;
    }
public function fromResponse(array $data)
    {
        $map = array(
            'id' => 'setId',
            'start' => 'setStart',
            'end' => 'setEnd',
            'hash' => 'setHash',
            'parameters' => 'setParameters',
            'created_at' => 'setCreatedAt',
            //only present in responses
            'progress' => 'setProgress',
            'status' => 'setStatus',
            'feeds' => 'setFeeds',
            'sample' => 'setSample',
            'data' => 'setData',
        );

        foreach ($map as $key => $setter) {
            if (isset($data[$key])) {
                $this->$setter($data[$key]);
            }
        }

        return $this;
    }
public function fromResponse ( array $ data ) { $ map = array ( 'id' => 'setId' , 'start' => 'setStart' , 'end' => 'setEnd' , 'hash' => 'setHash' , 'parameters' => 'setParameters' , 'created_at' => 'setCreatedAt' , //only present in responses 'progress' => 'setProgress' , 'status' => 'setStatus' , 'feeds' => 'setFeeds' , 'sample' => 'setSample' , 'data' => 'setData' , ) ; foreach ( $ map as $ key => $ setter ) { if ( isset ( $ data [ $ key ] ) ) { $ this -> $ setter ( $ data [ $ key ] ) ; } } return $ this ; }
Hydrates this preview from an array of API responses

@param array $data

@return DataSift_HistoricPreview
Hydrates this preview from an array of API responses