PHP Interface Cartalyst\Sentinel\Users\UserRepositoryInterface

Datei anzeigen Open project: cartalyst/sentinel Interface Usage Examples

Public Methods

Method Description
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.

Method Details

create() public method

Creates a user.
public create ( array $credentials, Closure $callback = null ) : Cartalyst\Sentinel\Users\UserInterface
$credentials array
$callback Closure
return Cartalyst\Sentinel\Users\UserInterface

findByCredentials() public method

Finds a user by the given credentials.
public findByCredentials ( array $credentials ) : Cartalyst\Sentinel\Users\UserInterface
$credentials array
return Cartalyst\Sentinel\Users\UserInterface

findById() public method

Finds a user by the given primary key.
public findById ( integer $id ) : Cartalyst\Sentinel\Users\UserInterface
$id integer
return Cartalyst\Sentinel\Users\UserInterface

findByPersistenceCode() public method

Finds a user by the given persistence code.
public findByPersistenceCode ( string $code ) : Cartalyst\Sentinel\Users\UserInterface
$code string
return Cartalyst\Sentinel\Users\UserInterface

recordLogin() public method

Records a login for the given user.
public recordLogin ( Cartalyst\Sentinel\Users\UserInterface $user ) : Cartalyst\Sentinel\Users\UserInterface | boolean
$user Cartalyst\Sentinel\Users\UserInterface
return Cartalyst\Sentinel\Users\UserInterface | boolean

recordLogout() public method

Records a logout for the given user.
public recordLogout ( Cartalyst\Sentinel\Users\UserInterface $user ) : Cartalyst\Sentinel\Users\UserInterface | boolean
$user Cartalyst\Sentinel\Users\UserInterface
return Cartalyst\Sentinel\Users\UserInterface | boolean

update() public method

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
return Cartalyst\Sentinel\Users\UserInterface

validForCreation() public method

Validate if the given user is valid for creation.
public validForCreation ( array $credentials ) : boolean
$credentials array
return boolean

validForUpdate() public method

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
return boolean

validateCredentials() public method

Validate the password of the given user.
public validateCredentials ( Cartalyst\Sentinel\Users\UserInterface $user, array $credentials ) : boolean
$user Cartalyst\Sentinel\Users\UserInterface
$credentials array
return boolean