original_string: protected function _input($data, $filter = true)
      {
          // validates input
          if (is_array($filter)) {
              $data = array_intersect_key($data, array_flip($filter));
          }
  
          unset($data['id']);
          unset($data['_id']);
          unset($data['user_id']);
          unset($data['user']);
  
          return $data;
      }
code: protected function _input($data, $filter = true)
      {
          // validates input
          if (is_array($filter)) {
              $data = array_intersect_key($data, array_flip($filter));
          }
  
          unset($data['id']);
          unset($data['_id']);
          unset($data['user_id']);
          unset($data['user']);
  
          return $data;
      }
code_tokens: protected function _input ( $ data , $ filter = true ) { // validates input if ( is_array ( $ filter ) ) { $ data = array_intersect_key ( $ data , array_flip ( $ filter ) ) ; } unset ( $ data [ 'id' ] ) ; unset ( $ data [ '_id' ] ) ; unset ( $ data [ 'user_id' ] ) ; unset ( $ data [ 'user' ] ) ; return $ data ; }
docstring: Filtering input data.
  
  @param array $data
  @param bool $filter
  
  @return array
docstring_tokens: Filtering input data .