PHP Interface Cartalyst\Sentinel\Persistences\PersistenceRepositoryInterface

显示文件 Open project: cartalyst/sentinel Interface Usage Examples

Public Methods

Method Description
check ( ) : string Checks for a persistence code in the current session.
findByPersistenceCode ( string $code ) : Cartalyst\Sentinel\Persistences\PersistenceInterface | false Finds a persistence by persistence code.
findUserByPersistenceCode ( string $code ) : Cartalyst\Sentinel\Users\UserInterface | false Finds a user by persistence code.
flush ( Cartalyst\Sentinel\Persistences\PersistableInterface $persistable, boolean $forget = true ) : void Flushes persistences for the given user.
forget ( ) : boolean | null Removes the persistence bound to the current session.
persist ( Cartalyst\Sentinel\Persistences\PersistableInterface $persistable, boolean $remember = false ) : boolean Adds a new user persistence to the current session and attaches the user.
persistAndRemember ( Cartalyst\Sentinel\Persistences\PersistableInterface $persistable ) : boolean Adds a new user persistence, to remember.
remove ( string $code ) : boolean | null Removes the given persistence code.

Method Details

check() public method

Checks for a persistence code in the current session.
public check ( ) : string
return string

findByPersistenceCode() public method

Finds a persistence by persistence code.
public findByPersistenceCode ( string $code ) : Cartalyst\Sentinel\Persistences\PersistenceInterface | false
$code string
return Cartalyst\Sentinel\Persistences\PersistenceInterface | false

findUserByPersistenceCode() public method

Finds a user by persistence code.
public findUserByPersistenceCode ( string $code ) : Cartalyst\Sentinel\Users\UserInterface | false
$code string
return Cartalyst\Sentinel\Users\UserInterface | false

flush() public method

Flushes persistences for the given user.
public flush ( Cartalyst\Sentinel\Persistences\PersistableInterface $persistable, boolean $forget = true ) : void
$persistable Cartalyst\Sentinel\Persistences\PersistableInterface
$forget boolean
return void

forget() public method

Removes the persistence bound to the current session.
public forget ( ) : boolean | null
return boolean | null

persist() public method

Adds a new user persistence to the current session and attaches the user.
public persist ( Cartalyst\Sentinel\Persistences\PersistableInterface $persistable, boolean $remember = false ) : boolean
$persistable Cartalyst\Sentinel\Persistences\PersistableInterface
$remember boolean
return boolean

persistAndRemember() public method

Adds a new user persistence, to remember.
public persistAndRemember ( Cartalyst\Sentinel\Persistences\PersistableInterface $persistable ) : boolean
$persistable Cartalyst\Sentinel\Persistences\PersistableInterface
return boolean

remove() public method

Removes the given persistence code.
public remove ( string $code ) : boolean | null
$code string
return boolean | null