Documentation

User extends Entity
in package

User Entity

Table of Contents

Properties

$address  : string|null
$birth_date  : Date|null
$city  : string|null
$comments  : array<string|int, Comment>
$created  : DateTime|null
$email  : string
$favorite_places  : array<string|int, FavoritePlace>
$favorites  : array<string|int, Favorite>
$first_name  : string|null
$friends  : array<string|int, Friend>
$google_id  : string|null
$histories  : array<string|int, History>
$id  : int
$last_name  : string
$notification_preference  : NotificationPreference
$password  : string|null
$phone  : string|null
$points_of_interests  : array<string|int, PointsOfInterest>
$profile_picture  : string|null
$public_key  : string|null
$reset_expires_at  : DateTime|null
$reset_token_hash  : string|null
$roadtrips  : array<string|int, Roadtrip>
$session_id  : string|null
$user_tokens  : array<string|int, UserToken>
$username  : string|null
$zipcode  : int|null
$_accessible  : array<string, bool>
Fields that can be mass assigned using newEntity() or patchEntity().
$_hidden  : array<string|int, string>
Fields that are excluded from JSON versions of the entity.
$_virtual  : array<string|int, mixed>

Methods

_getAvatarUrl()  : string
Return the url of the user's profile picture
_getFullName()  : string
Return the full name of the user
_setPassword()  : mixed

Properties

$address

public string|null $address

$birth_date

public Date|null $birth_date

$city

public string|null $city

$created

public DateTime|null $created

$email

public string $email

$first_name

public string|null $first_name

$google_id

public string|null $google_id

$last_name

public string $last_name

$password

public string|null $password

$phone

public string|null $phone

$profile_picture

public string|null $profile_picture

$public_key

public string|null $public_key

$reset_expires_at

public DateTime|null $reset_expires_at

$reset_token_hash

public string|null $reset_token_hash

$session_id

public string|null $session_id

$user_tokens

public array<string|int, UserToken> $user_tokens

$username

public string|null $username

$zipcode

public int|null $zipcode

$_accessible

Fields that can be mass assigned using newEntity() or patchEntity().

protected array<string, bool> $_accessible = ['last_name' => true, 'first_name' => true, 'email' => true, 'password' => true, 'address' => true, 'zipcode' => true, 'city' => true, 'phone' => true, 'birth_date' => true, 'profile_picture' => true, 'public_key' => true, 'session_id' => true, 'username' => true, 'reset_token_hash' => true, 'reset_expires_at' => true, 'google_id' => true, 'created' => true, 'notification_preference' => true, 'comments' => true, 'favorite_places' => true, 'favorites' => true, 'friends' => true, 'histories' => true, 'points_of_interests' => true, 'roadtrips' => true, 'user_tokens' => true, 'profile_picture_file' => true]

Note that when '' is set to true, this allows all unspecified fields to be mass assigned. For security purposes, it is advised to set '' to false (or remove it), and explicitly make individual fields accessible as needed.

$_hidden

Fields that are excluded from JSON versions of the entity.

protected array<string|int, string> $_hidden = ['password']

$_virtual

protected array<string|int, mixed> $_virtual = ['full_name', 'avatar_url']

Methods

_getAvatarUrl()

Return the url of the user's profile picture

protected _getAvatarUrl() : string
Return values
string

_getFullName()

Return the full name of the user

protected _getFullName() : string
Return values
string

_setPassword()

protected _setPassword(string $password) : mixed
Parameters
$password : string

        
On this page

Search results