本文整理汇总了PHP中Phone::setPhone方法的典型用法代码示例。如果您正苦于以下问题:PHP Phone::setPhone方法的具体用法?PHP Phone::setPhone怎么用?PHP Phone::setPhone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phone
的用法示例。
在下文中一共展示了Phone::setPhone方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testSettersAndGettersMethods
public function testSettersAndGettersMethods()
{
$this->assertEquals('390123456789', $this->object->getPhoneNumber());
$this->object->setPhoneNumber('333');
$this->assertEquals('333', $this->object->getPhoneNumber());
$this->object->setPhone('phone');
$this->assertEquals('phone', $this->object->getPhone());
$this->object->setCc('other');
$this->assertEquals('other', $this->object->getCc());
$this->object->setCountry('other');
$this->assertEquals('other', $this->object->getCountry());
$this->object->setIso3166('other');
$this->assertEquals('other', $this->object->getIso3166());
$this->object->setIso639('other');
$this->assertEquals('other', $this->object->getIso639());
$this->object->setMcc('other');
$this->assertEquals('other', $this->object->getMcc());
}
示例2: addPhone
private function addPhone($personId, $number)
{
$phone = new Phone();
$phone->setUserId($personId);
$phone->setPhone($number);
$phone->commit();
}