public function getData($callback = null) { if (is_callable($callback)) { return array_map($callback, $this->data); } return $this->data; }