public function addMediaResponse($item)
    {
        if (!($item instanceof MediaResponse)) {
            if (is_array($item)) {
                try {
                    $item = new MediaResponse($item);
                } catch (\Exception $e) {
                    trigger_error('Could not auto-instantiate MediaResponse. ' . $e->getMessage(), E_USER_WARNING);
                }
            } elseif (!is_numeric($item)) {
                trigger_error('Array parameter item is not of expected type "MediaResponse"!', E_USER_WARNING);
            }
        }
        $this->results[] = $item;

        return $this;
    }
public function addMediaResponse($item)
    {
        if (!($item instanceof MediaResponse)) {
            if (is_array($item)) {
                try {
                    $item = new MediaResponse($item);
                } catch (\Exception $e) {
                    trigger_error('Could not auto-instantiate MediaResponse. ' . $e->getMessage(), E_USER_WARNING);
                }
            } elseif (!is_numeric($item)) {
                trigger_error('Array parameter item is not of expected type "MediaResponse"!', E_USER_WARNING);
            }
        }
        $this->results[] = $item;

        return $this;
    }
public function addMediaResponse ( $ item ) { if ( ! ( $ item instanceof MediaResponse ) ) { if ( is_array ( $ item ) ) { try { $ item = new MediaResponse ( $ item ) ; } catch ( \ Exception $ e ) { trigger_error ( 'Could not auto-instantiate MediaResponse. ' . $ e -> getMessage ( ) , E_USER_WARNING ) ; } } elseif ( ! is_numeric ( $ item ) ) { trigger_error ( 'Array parameter item is not of expected type "MediaResponse"!' , E_USER_WARNING ) ; } } $ this -> results [ ] = $ item ; return $ this ; }
Adds an object of "MediaResponse" of the SearchResult.

@param MediaResponse|array $item

@return SearchResult
Adds an object of MediaResponse of the SearchResult .