當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。