Example #1
0
 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);
 }
Example #2
0
 /**
  * @covers ::initialize
  */
 public function testInitialize()
 {
     Container::clear();
     $reflection = new ReflectionModel('Harp\\Harp\\Test\\TestModel\\City');
     $reflection->initialize(City::getRepo()->getConfig());
 }