original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Filters the data array using a model filter
  
  @param \Traversable $data
  @param array $filters
  @return \Traversable
docstring_tokens: Filters the data array using a model filter