예제 #1
0
 /**
  * @covers ::isEmptyProperty
  */
 public function testIsEmptyProperty()
 {
     $models = new Models([new Model(['id' => 10, 'name' => null]), new Model(['id' => 20, 'name' => null]), new Model(['id' => null, 'name' => null])]);
     $this->assertFalse($models->isEmptyProperty('id'));
     $this->assertTrue($models->isEmptyProperty('name'));
 }
예제 #2
0
파일: One.php 프로젝트: harp-orm/core
 public function hasForeign(Models $models)
 {
     return !$models->isEmptyProperty($this->key);
 }
예제 #3
0
파일: Many.php 프로젝트: harp-orm/core
 public function hasForeign(Models $models)
 {
     return !$models->isEmptyProperty($this->getRepo()->getPrimaryKey());
 }