PHP Класс Krucas\LaravelUserEmailVerification\DatabaseTokenRepository

Наследование: implements Krucas\LaravelUserEmailVerification\Contracts\TokenRepositoryInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$connection Illuminate\Database\ConnectionInterface The database connection instance.
$expires integer The number of seconds a token should last.
$hashKey string The hashing key.
$table string The token database table.

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

Метод Описание
__construct ( Illuminate\Database\ConnectionInterface $connection, string $table, string $hashKey, integer $expires ) Create a new token repository instance.
create ( Krucas\LaravelUserEmailVerification\Contracts\RequiresEmailVerification $user ) : string Create a new token.
createNewToken ( ) : string Create a new token for the user.
delete ( string $token ) : void Delete token record.
deleteExpired ( ) : void Delete expired tokens.
exists ( Krucas\LaravelUserEmailVerification\Contracts\RequiresEmailVerification $user, string $token ) : boolean Determine if a token record exists and is valid.
getConnection ( ) : Illuminate\Database\ConnectionInterface Get the database connection instance.

Защищенные методы

Метод Описание
deleteExisting ( Krucas\LaravelUserEmailVerification\Contracts\RequiresEmailVerification $user ) : integer Delete all existing reset tokens from the database.
getCurrentTime ( ) : integer Get the current UNIX timestamp.
getPayload ( string $email, string $token ) : array Build the record payload for the table.
getTable ( ) : Builder Begin a new database query against the table.
isExpirationEnabled ( ) : boolean Determine if token expiration is enabled or disabled.
tokenExpired ( array $token ) : boolean Determine if the token has expired.

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

__construct() публичный Метод

Create a new token repository instance.
public __construct ( Illuminate\Database\ConnectionInterface $connection, string $table, string $hashKey, integer $expires )
$connection Illuminate\Database\ConnectionInterface
$table string
$hashKey string
$expires integer

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

Create a new token.
public create ( Krucas\LaravelUserEmailVerification\Contracts\RequiresEmailVerification $user ) : string
$user Krucas\LaravelUserEmailVerification\Contracts\RequiresEmailVerification
Результат string

createNewToken() публичный Метод

Create a new token for the user.
public createNewToken ( ) : string
Результат string

delete() публичный Метод

Delete token record.
public delete ( string $token ) : void
$token string
Результат void

deleteExisting() защищенный Метод

Delete all existing reset tokens from the database.
protected deleteExisting ( Krucas\LaravelUserEmailVerification\Contracts\RequiresEmailVerification $user ) : integer
$user Krucas\LaravelUserEmailVerification\Contracts\RequiresEmailVerification
Результат integer

deleteExpired() публичный Метод

Delete expired tokens.
public deleteExpired ( ) : void
Результат void

exists() публичный Метод

Determine if a token record exists and is valid.
public exists ( Krucas\LaravelUserEmailVerification\Contracts\RequiresEmailVerification $user, string $token ) : boolean
$user Krucas\LaravelUserEmailVerification\Contracts\RequiresEmailVerification
$token string
Результат boolean

getConnection() публичный Метод

Get the database connection instance.
public getConnection ( ) : Illuminate\Database\ConnectionInterface
Результат Illuminate\Database\ConnectionInterface

getCurrentTime() защищенный Метод

Get the current UNIX timestamp.
protected getCurrentTime ( ) : integer
Результат integer

getPayload() защищенный Метод

Build the record payload for the table.
protected getPayload ( string $email, string $token ) : array
$email string
$token string
Результат array

getTable() защищенный Метод

Begin a new database query against the table.
protected getTable ( ) : Builder
Результат Illuminate\Database\Query\Builder

isExpirationEnabled() защищенный Метод

Determine if token expiration is enabled or disabled.
protected isExpirationEnabled ( ) : boolean
Результат boolean

tokenExpired() защищенный Метод

Determine if the token has expired.
protected tokenExpired ( array $token ) : boolean
$token array
Результат boolean

Описание свойств

$connection защищенное свойство

The database connection instance.
protected ConnectionInterface,Illuminate\Database $connection
Результат Illuminate\Database\ConnectionInterface

$expires защищенное свойство

The number of seconds a token should last.
protected int $expires
Результат integer

$hashKey защищенное свойство

The hashing key.
protected string $hashKey
Результат string

$table защищенное свойство

The token database table.
protected string $table
Результат string