class UserRepository implements UserRepositoryInterface

User repository.

Properties

protected string $model Model name.
protected string $identifier User identifier.

Methods

__construct(string $model)

Constructor.

ORM
getModel()

Returns a model instance.

createUser(array $properties = [])

No description

setIdentifier(string $identifier)

Sets the user identifier.

User|bool
getByIdentifier($identifier)

No description

User|bool
getByActionToken(string $token)

Fetches a user by its action token.

User|bool
getByAccessToken(string $token)

Fetches a user by its access token.

User|bool
getByEmail(string $email)

Fetches a user by its email address.

User|bool
getByUsername(string $username)

Fetches a user by its username.

User|bool
getById(int $id)

Fetches a user by its id.

Details

at line 44
__construct(string $model)

Constructor.

Parameters

string $model Model name

at line 54
protected ORM getModel()

Returns a model instance.

Return Value

ORM

at line 23
User createUser(array $properties = [])

Parameters

array $properties

Return Value

User

at line 87
setIdentifier(string $identifier)

Sets the user identifier.

Parameters

string $identifier User identifier

at line 23
User|bool getByIdentifier($identifier)

Parameters

$identifier

Return Value

User|bool

at line 119
User|bool getByActionToken(string $token)

Fetches a user by its action token.

Parameters

string $token Action token

Return Value

User|bool

at line 130
User|bool getByAccessToken(string $token)

Fetches a user by its access token.

Parameters

string $token Access token

Return Value

User|bool

at line 141
User|bool getByEmail(string $email)

Fetches a user by its email address.

Parameters

string $email Email address

Return Value

User|bool

at line 152
User|bool getByUsername(string $username)

Fetches a user by its username.

Parameters

string $username Username

Return Value

User|bool

at line 163
User|bool getById(int $id)

Fetches a user by its id.

Parameters

int $id User id

Return Value

User|bool