PHP Интерфейс Cartalyst\Sentinel\Users\UserRepositoryInterface

Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
create ( array $credentials, Closure $callback = null ) : Cartalyst\Sentinel\Users\UserInterface Creates a user.
findByCredentials ( array $credentials ) : Cartalyst\Sentinel\Users\UserInterface Finds a user by the given credentials.
findById ( integer $id ) : Cartalyst\Sentinel\Users\UserInterface Finds a user by the given primary key.
findByPersistenceCode ( string $code ) : Cartalyst\Sentinel\Users\UserInterface Finds a user by the given persistence code.
recordLogin ( Cartalyst\Sentinel\Users\UserInterface $user ) : Cartalyst\Sentinel\Users\UserInterface | boolean Records a login for the given user.
recordLogout ( Cartalyst\Sentinel\Users\UserInterface $user ) : Cartalyst\Sentinel\Users\UserInterface | boolean Records a logout for the given user.
update ( Cartalyst\Sentinel\Users\UserInterface | integer $user, array $credentials ) : Cartalyst\Sentinel\Users\UserInterface Updates a user.
validForCreation ( array $credentials ) : boolean Validate if the given user is valid for creation.
validForUpdate ( Cartalyst\Sentinel\Users\UserInterface | integer $user, array $credentials ) : boolean Validate if the given user is valid for updating.
validateCredentials ( Cartalyst\Sentinel\Users\UserInterface $user, array $credentials ) : boolean Validate the password of the given user.

Описание методов

create() публичный метод

Creates a user.
public create ( array $credentials, Closure $callback = null ) : Cartalyst\Sentinel\Users\UserInterface
$credentials array
$callback Closure
Результат Cartalyst\Sentinel\Users\UserInterface

findByCredentials() публичный метод

Finds a user by the given credentials.
public findByCredentials ( array $credentials ) : Cartalyst\Sentinel\Users\UserInterface
$credentials array
Результат Cartalyst\Sentinel\Users\UserInterface

findById() публичный метод

Finds a user by the given primary key.
public findById ( integer $id ) : Cartalyst\Sentinel\Users\UserInterface
$id integer
Результат Cartalyst\Sentinel\Users\UserInterface

findByPersistenceCode() публичный метод

Finds a user by the given persistence code.
public findByPersistenceCode ( string $code ) : Cartalyst\Sentinel\Users\UserInterface
$code string
Результат Cartalyst\Sentinel\Users\UserInterface

recordLogin() публичный метод

Records a login for the given user.
public recordLogin ( Cartalyst\Sentinel\Users\UserInterface $user ) : Cartalyst\Sentinel\Users\UserInterface | boolean
$user Cartalyst\Sentinel\Users\UserInterface
Результат Cartalyst\Sentinel\Users\UserInterface | boolean

recordLogout() публичный метод

Records a logout for the given user.
public recordLogout ( Cartalyst\Sentinel\Users\UserInterface $user ) : Cartalyst\Sentinel\Users\UserInterface | boolean
$user Cartalyst\Sentinel\Users\UserInterface
Результат Cartalyst\Sentinel\Users\UserInterface | boolean

update() публичный метод

Updates a user.
public update ( Cartalyst\Sentinel\Users\UserInterface | integer $user, array $credentials ) : Cartalyst\Sentinel\Users\UserInterface
$user Cartalyst\Sentinel\Users\UserInterface | integer
$credentials array
Результат Cartalyst\Sentinel\Users\UserInterface

validForCreation() публичный метод

Validate if the given user is valid for creation.
public validForCreation ( array $credentials ) : boolean
$credentials array
Результат boolean

validForUpdate() публичный метод

Validate if the given user is valid for updating.
public validForUpdate ( Cartalyst\Sentinel\Users\UserInterface | integer $user, array $credentials ) : boolean
$user Cartalyst\Sentinel\Users\UserInterface | integer
$credentials array
Результат boolean

validateCredentials() публичный метод

Validate the password of the given user.
public validateCredentials ( Cartalyst\Sentinel\Users\UserInterface $user, array $credentials ) : boolean
$user Cartalyst\Sentinel\Users\UserInterface
$credentials array
Результат boolean