示例#1
0
 /** Shortcut to get "many" side relationships associated with this object **/
 public function getRelsMany($relationship, PDO $db = NULL)
 {
     if (is_null($db)) {
         $db = $this->_db;
     }
     return TLORelationship::getMany($db, $relationship, $this);
 }
示例#2
0
 public function testRelationshipResultIteration()
 {
     $t = TLO::getObject($this->db, 'Test3', array($this->guid2));
     foreach (TLORelationship::getMany($this->db, 'ConnectedTo', $t) as $i => $o) {
         $this->assertNoPattern('/[^0-9]/', $i);
         $this->assertIsA($o, 'ConnectedTo');
         $this->assertIsA($o->getRelation(), 'Test1');
     }
     $this->assertEqual($i, 2);
 }