public function collect(Collector $collector) { foreach ($this as $key => $value) { $collector->add($key, $value); } return $collector->get(); }