Skip to content
docsv0.1.0

GoogleUserInfo

Immutable DTO with user info returned by Google OAuth.

GoogleUserInfo::__construct()

public function __construct(string $id, string $email, string $name, ?string $picture = null):

Parameters

Parameters of __construct()
NameTypeDescription
$idstring
$emailstring
$namestring
$picture?string

GoogleUserInfo::toArray()

public function toArray(): array

Convert to a plain array using Google's userinfo endpoint field names.