當前位置: 首頁>>代碼示例>>PHP>>正文


PHP User::getFullName方法代碼示例

本文整理匯總了PHP中AppBundle\Entity\User::getFullName方法的典型用法代碼示例。如果您正苦於以下問題:PHP User::getFullName方法的具體用法?PHP User::getFullName怎麽用?PHP User::getFullName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在AppBundle\Entity\User的用法示例。


在下文中一共展示了User::getFullName方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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: testEmptyUser

 /**
  * Test an empty User entity
  */
 public function testEmptyUser()
 {
     $user = new User();
     $this->assertEquals('New User', $user->__toString());
     $this->assertNull($user->getId());
     $this->assertNull($user->getFullName());
     $this->assertNull($user->getFacebookAccessToken());
     $this->assertNull($user->getFacebookId());
     $this->assertEquals(0, $user->getItems()->count());
 }
開發者ID:stfalcon-studio,項目名稱:lost-and-found,代碼行數:13,代碼來源:UserTest.php

示例3: checkAccess

 public function checkAccess(CrudEvent $event)
 {
     if (!$this->user instanceof User) {
         return;
     }
     $data = $event->getData();
     if ($data instanceof FormInterface) {
         $data = $data->getData();
     }
     if ($data instanceof User) {
         if ($data !== $this->user) {
             throw new AccessDeniedException($this->user->getFullName() . ' is not allowed to update ' . $data->getFullName());
         }
     } elseif (method_exists($data, 'getUser') && $this->user !== $data->getUser()) {
         throw new AccessDeniedException($this->user->getFullName() . ' is not allowed to update ' . $data->getFullName() . '\'s data');
     } elseif (method_exists($data, 'getAuthor') && $this->user !== $data->getAuthor()) {
         throw new AccessDeniedException($this->user->getFullName() . ' is not allowed to update ' . $data->getFullName() . '\'s data');
     }
 }
開發者ID:BeerCoders,項目名稱:portfolio-api,代碼行數:19,代碼來源:CrudSubscriber.php

示例4: getFullName

 /**
  * {@inheritDoc}
  */
 public function getFullName()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getFullName', array());
     return parent::getFullName();
 }
開發者ID:redssie,項目名稱:EP_Trgovina,代碼行數:8,代碼來源:__CG__AppBundleEntityUser.php


注:本文中的AppBundle\Entity\User::getFullName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。