getMetaData() public method

This function looks up the metadata for the given entity id in the given set. It will throw an exception if it is unable to locate the metadata.
public getMetaData ( string $index, string $set ) : array
$index string The entity id we are looking up. This parameter may be NULL, in which case we look up the current entity id based on the current hostname/path.
$set string The set of metadata we are looking up the entity id in.
return array The metadata array describing the specified entity.
Esempio n. 1
0
 /**
  * Validates the given IdP entity id.
  *
  * Takes a string with the IdP entity id, and returns the entity id if it is valid, or
  * null if not.
  *
  * @param string|null $idp The entity id we want to validate. This can be null, in which case we will return null.
  *
  * @return string|null The entity id if it is valid, null if not.
  */
 protected function validateIdP($idp)
 {
     if ($idp === null) {
         return null;
     }
     if (!$this->config->getBoolean('idpdisco.validate', true)) {
         return $idp;
     }
     foreach ($this->metadataSets as $metadataSet) {
         try {
             $this->metadata->getMetaData($idp, $metadataSet);
             return $idp;
         } catch (Exception $e) {
             // continue
         }
     }
     $this->log('Unable to validate IdP entity id [' . $idp . '].');
     // the entity id wasn't valid
     return null;
 }