本文整理匯總了PHP中AppBundle\Entity\User::getLastname方法的典型用法代碼示例。如果您正苦於以下問題:PHP User::getLastname方法的具體用法?PHP User::getLastname怎麽用?PHP User::getLastname使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類AppBundle\Entity\User
的用法示例。
在下文中一共展示了User::getLastname方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
public function __construct(User $user)
{
$this->id = $user->getId();
$this->firstname = $user->getFirstname();
$this->lastname = $user->getLastname();
$this->email = $user->getEmail();
$this->positionLong = $user->getPositionLong();
$this->positionLat = $user->getPositionLat();
$this->positionCity = $user->getPositionCity();
$this->positionDep = $user->getPositionDep();
$this->positionCountry = $user->getPositionCountry();
$this->photo = $user->getPhoto();
}
示例2: getLastname
/**
* {@inheritDoc}
*/
public function getLastname()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getLastname', []);
return parent::getLastname();
}
示例3: transform
/**
* Turn this item object into a generic array
*
* @return array
*/
public function transform(User $user)
{
return ['id' => (int) $user->getId(), 'username' => $user->getUsername(), 'email' => $user->getEmail(), 'lastLogin' => $user->getLastLogin(), 'enabled' => (bool) $user->isEnabled(), 'firstname' => $user->getFirstname(), 'lastname' => $user->getLastname(), 'fullname' => $user->getFullname(), 'displayname' => $user->getDisplayName()];
}