Esempio n. 1
0
 /** Shortcut to add a relationship, passing in the "one" side **/
 public function newRelOne($relationship, TLO $relation, PDO $db = NULL)
 {
     if (is_null($db)) {
         $db = $this->_db;
     }
     return TLORelationship::newObject($db, $relationshipv, $relation, $this);
 }
Esempio n. 2
0
 public function testCreate()
 {
     $t1 = TLO::getObject($this->db, 'Test1', array($this->guid1));
     $t3 = TLO::getObject($this->db, 'Test3', array($this->guid2));
     $this->assertIsA($connected_to = TLORelationship::newObject($this->db, 'ConnectedTo', $t3, $t1), 'ConnectedTo');
     $this->assertEqual($connected_to->somevar, '');
 }