protected function _map(SearchResource $s, Column $col) { if ($s->NAME === $col) { return 'name'; } if ($s->PATH === $col) { return 'path'; } throw new \Exception("Unknown column provided."); }