示例#1
0
文件: Config.php 项目: harp-orm/harp
 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);
 }
示例#2
0
 /**
  * @covers ::initialize
  */
 public function testInitialize()
 {
     Container::clear();
     $reflection = new ReflectionModel('Harp\\Harp\\Test\\TestModel\\City');
     $reflection->initialize(City::getRepo()->getConfig());
 }