original_string: public function filter(\Closure $fn)
      {
          $data = array_filter($this->data, $fn);
          $records = $this->db->init($this->table, array(), $this->isNew);
          $records->data = $data;
          $records->isColl = true;
          $records->loaded = $this->loaded;
          return $records;
      }
code: public function filter(\Closure $fn)
      {
          $data = array_filter($this->data, $fn);
          $records = $this->db->init($this->table, array(), $this->isNew);
          $records->data = $data;
          $records->isColl = true;
          $records->loaded = $this->loaded;
          return $records;
      }
code_tokens: public function filter ( \ Closure $ fn ) { $ data = array_filter ( $ this -> data , $ fn ) ; $ records = $ this -> db -> init ( $ this -> table , array ( ) , $ this -> isNew ) ; $ records -> data = $ data ; $ records -> isColl = true ; $ records -> loaded = $ this -> loaded ; return $ records ; }
docstring: Filters elements of the collection using a callback function
  
  @param \Closure $fn
  @return $this
docstring_tokens: Filters elements of the collection using a callback function