public function setResults(array $results)
    {
        $this->results = [];

        foreach ($results as $item) {
            /** $item ObjectResponse */
            switch ($item['discriminatorId']) {
                case ObjectResponse::DISCRIMINATOR_FOLDER:
                    $this->addFolderResponse($item);

                    break;

                case ObjectResponse::DISCRIMINATOR_MEDIA:
                default:
                    $this->addMediaResponse($item);

                    break;
            }
        }

        return $this;
    }
public function setResults(array $results)
    {
        $this->results = [];

        foreach ($results as $item) {
            /** $item ObjectResponse */
            switch ($item['discriminatorId']) {
                case ObjectResponse::DISCRIMINATOR_FOLDER:
                    $this->addFolderResponse($item);

                    break;

                case ObjectResponse::DISCRIMINATOR_MEDIA:
                default:
                    $this->addMediaResponse($item);

                    break;
            }
        }

        return $this;
    }
public function setResults ( array $ results ) { $ this -> results = [ ] ; foreach ( $ results as $ item ) { /** $item ObjectResponse */ switch ( $ item [ 'discriminatorId' ] ) { case ObjectResponse :: DISCRIMINATOR_FOLDER : $ this -> addFolderResponse ( $ item ) ; break ; case ObjectResponse :: DISCRIMINATOR_MEDIA : default : $ this -> addMediaResponse ( $ item ) ; break ; } } return $ this ; }
Sets the "results" of the SearchResult.

@param \QBNK\QBank\Api\Model\ObjectResponse[] $results

@return SearchResult
Sets the results of the SearchResult .