PHP Class Cartalyst\Sentinel\Users\IlluminateUserRepository

Inheritance: implements Cartalyst\Sentinel\Users\UserRepositoryInterface, use trait Cartalyst\Support\Traits\EventTrait, use trait Cartalyst\Support\Traits\RepositoryTrait
Show file Open project: cartalyst/sentinel Class Usage Examples

Protected Properties

Property Type Description
$hasher Cartalyst\Sentinel\Hashing\HasherInterface The hasher instance.
$model string The Eloquent user model name.

Public Methods

Method Description
__construct ( Cartalyst\Sentinel\Hashing\HasherInterface $hasher, Illuminate\Events\Dispatcher $dispatcher = null, string $model = null ) : void Create a new Illuminate user repository.
create ( array $credentials, Closure $callback = null ) {@inheritDoc}
fill ( Cartalyst\Sentinel\Users\UserInterface $user, array $credentials ) : void Fills a user with the given credentials, intelligently.
findByCredentials ( array $credentials ) {@inheritDoc}
findById ( $id ) {@inheritDoc}
findByPersistenceCode ( $code ) {@inheritDoc}
getHasher ( ) : Cartalyst\Sentinel\Hashing\HasherInterface Returns the hasher instance.
recordLogin ( Cartalyst\Sentinel\Users\UserInterface $user ) {@inheritDoc}
recordLogout ( Cartalyst\Sentinel\Users\UserInterface $user ) {@inheritDoc}
setHasher ( Cartalyst\Sentinel\Hashing\HasherInterface $hasher ) : void Sets the hasher instance.
update ( $user, array $credentials ) {@inheritDoc}
validForCreation ( array $credentials ) {@inheritDoc}
validForUpdate ( $user, array $credentials ) {@inheritDoc}
validateCredentials ( Cartalyst\Sentinel\Users\UserInterface $user, array $credentials ) {@inheritDoc}

Protected Methods

Method Description
parseCredentials ( array $credentials, array $loginNames ) : array Parses the given credentials to return logins, password and others.
validateUser ( array $credentials, integer $id = null ) : boolean Validates the user.

Method Details

__construct() public method

Create a new Illuminate user repository.
public __construct ( Cartalyst\Sentinel\Hashing\HasherInterface $hasher, Illuminate\Events\Dispatcher $dispatcher = null, string $model = null ) : void
$hasher Cartalyst\Sentinel\Hashing\HasherInterface
$dispatcher Illuminate\Events\Dispatcher
$model string
return void

create() public method

{@inheritDoc}
public create ( array $credentials, Closure $callback = null )
$credentials array
$callback Closure

fill() public method

Fills a user with the given credentials, intelligently.
public fill ( Cartalyst\Sentinel\Users\UserInterface $user, array $credentials ) : void
$user Cartalyst\Sentinel\Users\UserInterface
$credentials array
return void

findByCredentials() public method

{@inheritDoc}
public findByCredentials ( array $credentials )
$credentials array

findById() public method

{@inheritDoc}
public findById ( $id )

findByPersistenceCode() public method

{@inheritDoc}
public findByPersistenceCode ( $code )

getHasher() public method

Returns the hasher instance.
public getHasher ( ) : Cartalyst\Sentinel\Hashing\HasherInterface
return Cartalyst\Sentinel\Hashing\HasherInterface

parseCredentials() protected method

Parses the given credentials to return logins, password and others.
protected parseCredentials ( array $credentials, array $loginNames ) : array
$credentials array
$loginNames array
return array

recordLogin() public method

{@inheritDoc}
public recordLogin ( Cartalyst\Sentinel\Users\UserInterface $user )
$user Cartalyst\Sentinel\Users\UserInterface

recordLogout() public method

{@inheritDoc}
public recordLogout ( Cartalyst\Sentinel\Users\UserInterface $user )
$user Cartalyst\Sentinel\Users\UserInterface

setHasher() public method

Sets the hasher instance.
public setHasher ( Cartalyst\Sentinel\Hashing\HasherInterface $hasher ) : void
$hasher Cartalyst\Sentinel\Hashing\HasherInterface
return void

update() public method

{@inheritDoc}
public update ( $user, array $credentials )
$credentials array

validForCreation() public method

{@inheritDoc}
public validForCreation ( array $credentials )
$credentials array

validForUpdate() public method

{@inheritDoc}
public validForUpdate ( $user, array $credentials )
$credentials array

validateCredentials() public method

{@inheritDoc}
public validateCredentials ( Cartalyst\Sentinel\Users\UserInterface $user, array $credentials )
$user Cartalyst\Sentinel\Users\UserInterface
$credentials array

validateUser() protected method

Validates the user.
protected validateUser ( array $credentials, integer $id = null ) : boolean
$credentials array
$id integer
return boolean

Property Details

$hasher protected property

The hasher instance.
protected HasherInterface,Cartalyst\Sentinel\Hashing $hasher
return Cartalyst\Sentinel\Hashing\HasherInterface

$model protected property

The Eloquent user model name.
protected string $model
return string