Beispiel #1
0
 public function setUp()
 {
     parent::setUp();
     $this->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_ALL ^ Doctrine::EXPORT_CONSTRAINTS);
     /*
      * Relationships
      */
     // Relate the conference (conference_id) with a generic number identifier (foreign_id) in the Number class.
     // Note carefully that this only works because this model is related to Number
     // The Number class has some "magic" that auto relates the class
     $this->hasOne('System as Destination', array('local' => 'foreign_id', 'foreign' => 'system_id', 'owningSide' => TRUE));
 }
Beispiel #2
0
 public function setUp()
 {
     parent::setUp();
     $this->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_NONE);
     $this->hasOne('FaxProfile as Destination', array('local' => 'foreign_id', 'foreign' => 'fxp_id', 'owningSide' => FALSE));
     foreach (get_declared_classes() as $class) {
         if (is_subclass_of($class, 'Number') or $class == 'Number') {
             $deviceTable = Doctrine::getTable($class);
             $deviceTable->bind(array('FaxProfile', array('local' => 'foreign_id', 'foreign' => 'fxp_id')), Doctrine_Relation::ONE);
         }
     }
     $this->actAs('TelephonyEnabled');
 }
Beispiel #3
0
 public function setUp()
 {
     parent::setUp();
     $this->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_ALL ^ Doctrine::EXPORT_CONSTRAINTS);
     $this->hasOne('AutoAttendant as Destination', array('local' => 'foreign_id', 'foreign' => 'auto_attendant_id'));
     foreach (get_declared_classes() as $class) {
         if (is_subclass_of($class, 'Number') or $class == 'Number') {
             $numberTable = Doctrine::getTable($class);
             $numberTable->bind(array('AutoAttendant', array('local' => 'foreign_id', 'foreign' => 'auto_attendant_id')), Doctrine_Relation::ONE);
         }
     }
     $this->actAs('TelephonyEnabled');
 }
Beispiel #4
0
 public function setUp()
 {
     parent::setUp();
     $this->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_NONE);
     /*
      * Relationships
      */
     // Relate the ring group (ringroup_id) with a generic number identifier (foreign_id) in the Number class.
     // Note carefully that this only works because this model is related to Number
     // The Number class has some "magic" that auto relates the class
     $this->hasOne('RingGroup as Destination', array('local' => 'foreign_id', 'foreign' => 'ring_group_id', 'owningSide' => FALSE));
     foreach (get_declared_classes() as $class) {
         if (is_subclass_of($class, 'Number') or $class == 'Number') {
             $numberTable = Doctrine::getTable($class);
             $numberTable->bind(array('RingGroup', array('local' => 'foreign_id', 'foreign' => 'ring_group_id')), Doctrine_Relation::ONE);
         }
     }
     $this->actAs('TelephonyEnabled');
 }
Beispiel #5
0
 public function setUp()
 {
     parent::setUp();
     $this->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_NONE);
     /*
      * Relationships
      */
     // Relate the conference (conference_id) with a generic number identifier (foreign_id) in the Number class.
     // Note carefully that this only works because this model is related to Number
     // The Number class has some "magic" that auto relates the class
     $this->hasOne('ExternalXfer as Destination', array('local' => 'foreign_id', 'foreign' => 'external_xfer_id'));
     // Add relation on the other side, too, including all extended models that may have already loaded
     foreach (get_declared_classes() as $class) {
         if (is_subclass_of($class, 'Number') or $class == 'Number') {
             $deviceTable = Doctrine::getTable($class);
             $deviceTable->bind(array('ExternalXfer', array('local' => 'foreign_id', 'foreign' => 'external_xfer_id')), Doctrine_Relation::ONE);
         }
     }
     $this->actAs('TelephonyEnabled');
 }