Model/Search.php
public function addSearchSort($item)
    {
        if (!($item instanceof SearchSort)) {
            if (is_array($item)) {
                try {
                    $item = new SearchSort($item);
                } catch (\Exception $e) {
                    trigger_error('Could not auto-instantiate SearchSort. ' . $e->getMessage(), E_USER_WARNING);
                }
            } else {
                trigger_error('Array parameter item is not of expected type "SearchSort"!', E_USER_WARNING);
            }
        }
        $this->sortFields[] = $item;

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

        return $this;
    }
public function addSearchSort ( $ item ) { if ( ! ( $ item instanceof SearchSort ) ) { if ( is_array ( $ item ) ) { try { $ item = new SearchSort ( $ item ) ; } catch ( \ Exception $ e ) { trigger_error ( 'Could not auto-instantiate SearchSort. ' . $ e -> getMessage ( ) , E_USER_WARNING ) ; } } else { trigger_error ( 'Array parameter item is not of expected type "SearchSort"!' , E_USER_WARNING ) ; } } $ this -> sortFields [ ] = $ item ; return $ this ; }
Adds an object of "SortFields" of the Search.

@param SearchSort|array $item

@return Search
Adds an object of SortFields of the Search .