本文整理汇总了PHP中Number::setUp方法的典型用法代码示例。如果您正苦于以下问题:PHP Number::setUp方法的具体用法?PHP Number::setUp怎么用?PHP Number::setUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Number
的用法示例。
在下文中一共展示了Number::setUp方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
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));
}
示例2: setUp
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');
}
示例3: setUp
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');
}
示例4: setUp
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');
}
示例5: setUp
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');
}