protected function applySorting($sort)
    {
        if (is_array($sort)) {
            array_map([$this, 'applySorting'], $sort);
            return;
        }

        if (!strpos($sort, ':')) {
            $this->sort($sort, CanSort::ASC);
            return;
        }

        list($key, $direction) = explode(':', $sort, 2);

        $this->sort($key, $direction);

    }
protected function applySorting($sort)
    {
        if (is_array($sort)) {
            array_map([$this, 'applySorting'], $sort);
            return;
        }

        if (!strpos($sort, ':')) {
            $this->sort($sort, CanSort::ASC);
            return;
        }

        list($key, $direction) = explode(':', $sort, 2);

        $this->sort($key, $direction);

    }
protected function applySorting ( $ sort ) { if ( is_array ( $ sort ) ) { array_map ( [ $ this , 'applySorting' ] , $ sort ) ; return ; } if ( ! strpos ( $ sort , ':' ) ) { $ this -> sort ( $ sort , CanSort :: ASC ) ; return ; } list ( $ key , $ direction ) = explode ( ':' , $ sort , 2 ) ; $ this -> sort ( $ key , $ direction ) ; }
Add the input parameter to the sorting.

@param string|array $sort
Add the input parameter to the sorting .