public function __construct($class) { $this->reflectionModel = new ReflectionModel($class); $this->name = $this->table = $this->reflectionModel->getShortName(); $this->fields = $this->reflectionModel->getPublicPropertyNames(); $this->rootConfig = $this; $this->reflectionModel->initialize($this); }
/** * @covers ::initialize */ public function testInitialize() { Container::clear(); $reflection = new ReflectionModel('Harp\\Harp\\Test\\TestModel\\City'); $reflection->initialize(City::getRepo()->getConfig()); }