PHP 클래스 SimpleSAML_Store_SQL, simplesamlphp

상속: extends SimpleSAML_Store
파일 보기 프로젝트 열기: simplesamlphp/simplesamlphp 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$driver string Our database driver.
$pdo PDO The PDO object for our database.
$prefix string The prefix we should use for our tables.

공개 메소드들

메소드 설명
delete ( string $type, string $key ) Delete an entry from the data store.
get ( string $type, string $key ) : mixed | null Retrieve a value from the data store.
getTableVersion ( string $name ) : integer Get table version.
insertOrUpdate ( string $table, array $keys, array $data ) Insert or update a key-value in the store.
set ( string $type, string $key, mixed $value, integer | null $expire = null ) Save a value in the data store.
setTableVersion ( string $name, integer $version ) Set table version.

보호된 메소드들

메소드 설명
__construct ( ) Initialize the SQL data store.

비공개 메소드들

메소드 설명
cleanKVStore ( ) Clean the key-value table of expired entries.
initKVTable ( ) Initialize key-value table.
initTableVersionTable ( ) Initialize the table-version table.

메소드 상세

__construct() 보호된 메소드

Initialize the SQL data store.
protected __construct ( )

delete() 공개 메소드

Delete an entry from the data store.
public delete ( string $type, string $key )
$type string The type of the data
$key string The key to delete.

get() 공개 메소드

Retrieve a value from the data store.
public get ( string $type, string $key ) : mixed | null
$type string The type of the data.
$key string The key to retrieve.
리턴 mixed | null The value associated with that key, or null if there's no such key.

getTableVersion() 공개 메소드

Get table version.
public getTableVersion ( string $name ) : integer
$name string Table name.
리턴 integer The table version, or 0 if the table doesn't exist.

insertOrUpdate() 공개 메소드

Since various databases implement different methods for doing this, we abstract it away here.
public insertOrUpdate ( string $table, array $keys, array $data )
$table string The table we should update.
$keys array The key columns.
$data array Associative array with columns.

set() 공개 메소드

Save a value in the data store.
public set ( string $type, string $key, mixed $value, integer | null $expire = null )
$type string The type of the data.
$key string The key to insert.
$value mixed The value itself.
$expire integer | null The expiration time (unix timestamp), or null if it never expires.

setTableVersion() 공개 메소드

Set table version.
public setTableVersion ( string $name, integer $version )
$name string Table name.
$version integer Table version.

프로퍼티 상세

$driver 공개적으로 프로퍼티

Our database driver.
public string $driver
리턴 string

$pdo 공개적으로 프로퍼티

The PDO object for our database.
public PDO $pdo
리턴 PDO

$prefix 공개적으로 프로퍼티

The prefix we should use for our tables.
public string $prefix
리턴 string