PHP Класс SimpleSAML_Metadata_MetaDataStorageHandlerPdo, simplesamlphp

This class has been based off a previous version written by [email protected] and patched to work with the latest version of SimpleSAMLphp
Автор: Tyler Antonio, University of Alberta ([email protected])
Наследование: extends SimpleSAML_Metadata_MetaDataStorageSource
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$supportedSets All the metadata sets supported by this MetaDataStorageHandler

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

Метод Описание
__construct ( array $config ) This constructor initializes the PDO metadata storage handler with the specified configuration. The configuration is an associative array with the following possible elements (set in config.php): - 'usePersistentConnection': TRUE/FALSE if database connection should be persistent.
addEntry ( string $index, string $set, array $entityData ) : boolean Add metadata to the configured database
getMetadataSet ( string $set ) : array Retrieve a list of all available metadata for a given set.
initDatabase ( ) : integer | false Initialize the configured database

Приватные методы

Метод Описание
generateDynamicHostedEntityID ( $set )
getTableName ( string $table ) : string Replace the -'s to an _ in table names for Metadata sets since SQL does not allow a - in a table name.
load ( string $set ) : array This function loads the given set of metadata from a file to a configured database.

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

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

- 'dsn': The database connection string. - 'username': Database user name - 'password': Password for the database user.
public __construct ( array $config )
$config array An associative array with the configuration for this handler.

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

Add metadata to the configured database
public addEntry ( string $index, string $set, array $entityData ) : boolean
$index string Entity ID
$set string The set to add the metadata to
$entityData array Metadata
Результат boolean True/False if entry was successfully added

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

Retrieve a list of all available metadata for a given set.
public getMetadataSet ( string $set ) : array
$set string The set we are looking for metadata in.
Результат array $metadata An associative array with all the metadata for the given set.

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

Initialize the configured database
public initDatabase ( ) : integer | false
Результат integer | false The number of SQL statements successfully executed, false if some error occurred.

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

$supportedSets публичное свойство

All the metadata sets supported by this MetaDataStorageHandler
public $supportedSets