当前位置: 首页>>代码示例>>PHP>>正文


PHP User::getPhone方法代码示例

本文整理汇总了PHP中AppBundle\Entity\User::getPhone方法的典型用法代码示例。如果您正苦于以下问题:PHP User::getPhone方法的具体用法?PHP User::getPhone怎么用?PHP User::getPhone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AppBundle\Entity\User的用法示例。


在下文中一共展示了User::getPhone方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testCreateNewEntity

 /**
  * Test creation of new entity
  */
 public function testCreateNewEntity()
 {
     $user = new User();
     $this->assertNull($user->getId());
     $this->assertFalse($user->isEnabled());
     $this->assertNull($user->getCreatedAt());
     $this->assertNull($user->getUpdatedAt());
     $this->assertNull($user->getFullName());
     $this->assertNull($user->getPhone());
 }
开发者ID:stfalcon-studio,项目名称:rock-events,代码行数:13,代码来源:UserTest.php

示例2: getPhone

 /**
  * {@inheritDoc}
  */
 public function getPhone()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPhone', array());
     return parent::getPhone();
 }
开发者ID:3lolo,项目名称:lr_app,代码行数:8,代码来源:__CG__AppBundleEntityUser.php

示例3: testSetPhone

 public function testSetPhone()
 {
     // new entity
     $user = new User();
     // Use the setPhone method
     $user->setPhone("12312312");
     // Assert the result
     $this->assertEquals("12312312", $user->getPhone());
 }
开发者ID:vegardbb,项目名称:webpage,代码行数:9,代码来源:UserEntityUnitTest.php

示例4: appendUserContacts

 /**
  * Function: appendUserContacts
  *
  * @param \AppBundle\Entity\User $user
  * @param array                  $contactsPhonesArray
  *
  * @return array
  *
  * @author Stefanos Bozionelos
  */
 function appendUserContacts(User $user, array $contactsPhonesArray)
 {
     if (!isset($user) || empty($user->getContactsphones())) {
         return $contactsPhonesArray;
     }
     $userContactsPhonesArray = array_values(json_decode($user->getContactsPhones(), true));
     $updatedUserContactsPhones = array_diff(array_unique(array_merge($userContactsPhonesArray, $contactsPhonesArray)), array($user->getPhone()));
     return $updatedUserContactsPhones;
 }
开发者ID:jparaskakis,项目名称:thesis_back,代码行数:19,代码来源:DefaultController.php

示例5: fromUser

 public function fromUser(User $user)
 {
     $userContract = new self();
     //Force fetch
     $user->getMyContacts()->toArray();
     $user->getConversations()->toArray();
     $user->getContactsWithMe()->toArray();
     $userContract->id = $user->getId();
     $userContract->tkey = $user->getTkey();
     $userContract->avatar = $user->getAvatar();
     $userContract->birthday = $user->getBirthday();
     $userContract->cdate = $user->getCdate();
     $userContract->conversations = $user->getConversations();
     $userContract->connections = $user->getConnections();
     $userContract->contactsphones = $user->getContactsphones();
     $userContract->email = $user->getEmail();
     $userContract->fname = $user->getFname();
     $userContract->lastUpdate = $user->getLastUpdate();
     $userContract->lname = $user->getLname();
     $userContract->contactsWithMe = $user->getContactsWithMe();
     $user->getMyContacts()->toArray();
     $userContract->myContacts = $user->getMyContacts();
     $userContract->password = $user->getPassword();
     $userContract->phone = $user->getPhone();
     $userContract->username = $user->getUsername();
     return $userContract;
 }
开发者ID:jparaskakis,项目名称:thesis_back,代码行数:27,代码来源:UserContract.php


注:本文中的AppBundle\Entity\User::getPhone方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。