<?php
 namespace App\ReportsData\EntityFields; class Station extends \App\ReportsData\EntityFields\GeneralAbstract { protected $pkColumnName = 'code'; protected function getDbTableName() { global $DBTRd_stations; return $DBTRd_stations; } protected function getCustomValues($fieldName) { switch ($fieldName) { case 'country': return new Country($this->values['countryCode']); case 'city': return new City($this->values['cityId']); default: return parent::getCustomValues($fieldName); } } } 