PHP Класс Kohana_Auth, php-framework-benchmarks

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

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

Свойство Тип Описание
$_config
$_instance Auth instances
$_session

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

Метод Описание
__construct ( $config = [] ) : void Loads Session and configuration options.
check_password ( $password )
factory ( $config = [] ) : Auth Create an instance of Auth.
find_salt ( $password ) : string Finds the salt from a password, based on the configured salt pattern.
get_user ( ) : mixed Gets the currently logged in user from the session.
hash ( $str ) : string Perform a hash, using the configured method.
hash_password ( $password, $salt = FALSE ) : string Creates a hashed password from a plaintext password, inserting salt based on the configured salt pattern.
instance ( ) : Auth Singleton pattern
logged_in ( $role = NULL ) : mixed Check if there is an active session. Optionally allows checking for a specific role.
login ( $username, $password, $remember = FALSE ) : boolean Attempt to log in a user by using an ORM object and plain-text password.
logout ( $destroy = FALSE, $logout_all = FALSE ) : boolean Log out a user by removing the related session variables.
password ( $username )

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

Метод Описание
_login ( $username, $password, $remember )
complete_login ( $user )

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

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

Loads Session and configuration options.
public __construct ( $config = [] ) : void
Результат void

_login() абстрактный защищенный Метод

abstract protected _login ( $username, $password, $remember )

check_password() абстрактный публичный Метод

abstract public check_password ( $password )

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

protected complete_login ( $user )

factory() публичный статический Метод

Create an instance of Auth.
public static factory ( $config = [] ) : Auth
Результат Auth

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

Finds the salt from a password, based on the configured salt pattern.
public find_salt ( $password ) : string
Результат string

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

Returns FALSE if no user is currently logged in.
public get_user ( ) : mixed
Результат mixed

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

Perform a hash, using the configured method.
public hash ( $str ) : string
Результат string

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

Creates a hashed password from a plaintext password, inserting salt based on the configured salt pattern.
public hash_password ( $password, $salt = FALSE ) : string
Результат string hashed password string

instance() публичный статический Метод

Singleton pattern
public static instance ( ) : Auth
Результат Auth

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

Check if there is an active session. Optionally allows checking for a specific role.
public logged_in ( $role = NULL ) : mixed
Результат mixed

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

Attempt to log in a user by using an ORM object and plain-text password.
public login ( $username, $password, $remember = FALSE ) : boolean
Результат boolean

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

Log out a user by removing the related session variables.
public logout ( $destroy = FALSE, $logout_all = FALSE ) : boolean
Результат boolean

password() абстрактный публичный Метод

abstract public password ( $username )

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

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

protected $_config

$_instance защищенное статическое свойство

Auth instances
protected static $_instance

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

protected $_session