PHP Class 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
Author: Tyler Antonio, University of Alberta ([email protected])
Inheritance: extends SimpleSAML_Metadata_MetaDataStorageSource
Datei anzeigen Open project: simplesamlphp/simplesamlphp Class Usage Examples

Public Properties

Property Type Description
$supportedSets All the metadata sets supported by this MetaDataStorageHandler

Public Methods

Method Description
__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

Private Methods

Method Description
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.

Method Details

__construct() public method

- '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() public method

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
return boolean True/False if entry was successfully added

getMetadataSet() public method

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.
return array $metadata An associative array with all the metadata for the given set.

initDatabase() public method

Initialize the configured database
public initDatabase ( ) : integer | false
return integer | false The number of SQL statements successfully executed, false if some error occurred.

Property Details

$supportedSets public_oe property

All the metadata sets supported by this MetaDataStorageHandler
public $supportedSets