protected function _filterData($data, array $filters)
    {
        $limit = false;
        if (isset($filters['limit'])) {
            $limit = $filters['limit'];
            unset($filters['limit']);
        }

        $filteredData = parent::_filterData($data, $filters);

        if ($limit) {
            if (is_array($limit)) {
                $filteredData = array_slice($filteredData, $limit[1], $limit[0]);
            } elseif (is_numeric($limit)) {
                $filteredData = array_slice($filteredData, 0, $limit);
            }
        }

        return $filteredData;
    }
protected function _filterData($data, array $filters)
    {
        $limit = false;
        if (isset($filters['limit'])) {
            $limit = $filters['limit'];
            unset($filters['limit']);
        }

        $filteredData = parent::_filterData($data, $filters);

        if ($limit) {
            if (is_array($limit)) {
                $filteredData = array_slice($filteredData, $limit[1], $limit[0]);
            } elseif (is_numeric($limit)) {
                $filteredData = array_slice($filteredData, 0, $limit);
            }
        }

        return $filteredData;
    }
protected function _filterData ( $ data , array $ filters ) { $ limit = false ; if ( isset ( $ filters [ 'limit' ] ) ) { $ limit = $ filters [ 'limit' ] ; unset ( $ filters [ 'limit' ] ) ; } $ filteredData = parent :: _filterData ( $ data , $ filters ) ; if ( $ limit ) { if ( is_array ( $ limit ) ) { $ filteredData = array_slice ( $ filteredData , $ limit [ 1 ] , $ limit [ 0 ] ) ; } elseif ( is_numeric ( $ limit ) ) { $ filteredData = array_slice ( $ filteredData , 0 , $ limit ) ; } } return $ filteredData ; }
Filters the data array using a model filter

@param \Traversable $data
@param array $filters
@return \Traversable
Filters the data array using a model filter