phpDocumentor Developer
[ class tree: Developer ] [ index: Developer ] [ all elements ]

Class: IdP

Source Location: /core/IdP.php

Class IdP

Class Overview

This class represents an Identity Provider (IdP).

IdPs have properties of their own, and may have one or more Profiles. The profiles can override the institution-wide properties.

Located in /core/IdP.php [line 41]



		
				Author(s):
		
		
		
Information Tags:
License:  see

Properties

Methods

[ Top ]
Property Summary
string   $federation   The shortname of this IdP's federation
int   $identifier   The row index of this IdP in the database
string   $name   The name of this IdP in current locale.

[ Top ]
Method Summary
IdP   __construct()   Constructs an IdP object based on its details in the database.
void   addAttribute()   Adds an attribute for the IdP instance into the database. Multiple instances of the same attribute are supported.
array   beginFlushAttributes()   deletes all attributes in this profile except the _file ones, these are reported as array
void   commitFlushAttributes()   after a beginFlushAttributes, deletes all attributes which are in the tobedeleted array
void   destroy()   deletes the IdP and all its profiles
void   flushAttributes()   deletes all attributes of this IdP from the database
array   getAttributes()   This function retrieves the IdP-wide attributes. If called with the optional parameter, only attribute values for the attribute name in $option_name are retrieved; otherwise, all attributes are retrieved.
array   getExternalDBEntityDetails()   Fetches information from the external database about this IdP
int   getExternalDBId()   Retrieves the external DB identifier of this institution. Returns FALSE if no ID is known.
array   getExternalDBSyncCandidates()   Performs a lookup in an external database to determine matching entities to this IdP. The business logic of this function is roaming consortium specific; if no match algorithm is known for the consortium, FALSE is returned.
void   getExternalDBSyncState()  
int   isAttributeAvailable()   This function returns the count of specific attributes in an IdP This function will not retreive the values attributes (particularly important for large blobs), it is mainly intended as a test for an attribute existance.
void   isOneProfileConfigured()  
void   isOneProfileShowtime()  
array   listProfiles()   This function retrieves all registered profiles for this IdP from the database
object new   newProfile()   Adds a new profile to this IdP.
array   owner()   This function retrieves an array of authorised users which can manipulate this institution.
int   profileCount()   This function gets the profile count for a given IdP The count could be retreived from the listProfiles method but this is less expensive.
void   setExternalDBId()  
void   updateFreshness()   This function sets the timestamp of last modification of the child profiles to the current timestamp. This is needed for installer caching: all installers which are on disk must be re-created if an attribute changes. This timestamp here is used to determine if the installer on disk is still new enough.

[ Top ]
Properties
string   $federation [line 445]

The shortname of this IdP's federation

API Tags:
Access:  public


[ Top ]
int   $identifier [line 451]

The row index of this IdP in the database

API Tags:
Access:  public


[ Top ]
string   $name [line 457]

The name of this IdP in current locale.

API Tags:
Access:  public


[ Top ]
Methods
Constructor __construct  [line 71]

  IdP __construct( integer $i_id  )

Constructs an IdP object based on its details in the database.

Cannot be used to define a new IdP in the database! This happens via Federation::newIdP()

Parameters:
integer   $i_id:  the database row identifier

API Tags:
Access:  public


[ Top ]
addAttribute  [line 287]

  void addAttribute( string $attr_name, mixed $attr_value  )

Adds an attribute for the IdP instance into the database. Multiple instances of the same attribute are supported.

Parameters:
string   $attr_name:  Name of the attribute. This must be a well-known value from the profile_option_dict table in the DB.
mixed   $attr_value:  Value of the attribute. Can be anything; will be stored in the DB as-is.

API Tags:
Access:  public


[ Top ]
beginFlushAttributes  [line 252]

  array beginFlushAttributes( )

deletes all attributes in this profile except the _file ones, these are reported as array


API Tags:
Return:  list of row id's of file-based attributes which weren't deleted
Access:  public


[ Top ]
commitFlushAttributes  [line 267]

  void commitFlushAttributes( array $tobedeleted  )

after a beginFlushAttributes, deletes all attributes which are in the tobedeleted array

Parameters:
array   $tobedeleted:  array of database rows which are to be deleted

API Tags:
Access:  public


[ Top ]
destroy  [line 317]

  void destroy( )

deletes the IdP and all its profiles


API Tags:
Access:  public


[ Top ]
flushAttributes  [line 277]

  void flushAttributes( )

deletes all attributes of this IdP from the database


API Tags:
Access:  public


[ Top ]
getAttributes  [line 234]

  array getAttributes( [string $option_name = 0]  )

This function retrieves the IdP-wide attributes. If called with the optional parameter, only attribute values for the attribute name in $option_name are retrieved; otherwise, all attributes are retrieved.

Parameters:
string   $option_name:  optionally, the name of the attribute that is to be retrieved

API Tags:
Return:  of arrays of attributes which were set for this IdP
Access:  public


[ Top ]
getExternalDBEntityDetails  [line 423]

  array getExternalDBEntityDetails( )

Fetches information from the external database about this IdP


API Tags:
Return:  details about that institution. Array may be empty if entity is not synced
Access:  public


[ Top ]
getExternalDBId  [line 405]

  int getExternalDBId( )

Retrieves the external DB identifier of this institution. Returns FALSE if no ID is known.


API Tags:
Return:  the external identifier; or FALSE if no external ID is known
Access:  public


[ Top ]
getExternalDBSyncCandidates  [line 356]

  array getExternalDBSyncCandidates( )

Performs a lookup in an external database to determine matching entities to this IdP. The business logic of this function is roaming consortium specific; if no match algorithm is known for the consortium, FALSE is returned.


API Tags:
Return:  list of entities in external database that correspond to this IdP or FALSE if no consortium-specific matching function is defined
Access:  public


[ Top ]
getExternalDBSyncState  [line 393]

  void getExternalDBSyncState( )


API Tags:
Access:  public


[ Top ]
isAttributeAvailable  [line 209]

  int isAttributeAvailable( string $option_name  )

This function returns the count of specific attributes in an IdP This function will not retreive the values attributes (particularly important for large blobs), it is mainly intended as a test for an attribute existance.

Parameters:
string   $option_name:  name of the attribute whose existence in the IdP is to be checked

API Tags:
Return:  attribute count
Access:  public


[ Top ]
isOneProfileConfigured  [line 150]

  void isOneProfileConfigured( )


API Tags:
Access:  public


[ Top ]
isOneProfileShowtime  [line 166]

  void isOneProfileShowtime( )


API Tags:
Access:  public


[ Top ]
listProfiles  [line 136]

  array listProfiles( [int $active_only = 0]  )

This function retrieves all registered profiles for this IdP from the database

Parameters:
int   $active_only:  if and set to non-zero will cause listing of only those institutions which have some valid profiles defined.

API Tags:
Return:  List of Profiles of this IdP
Access:  public


[ Top ]
newProfile  [line 304]

  object new newProfile( )

Adds a new profile to this IdP.

Only creates the DB entry for the Profile. If you want to add attributes later, see Profile::addAttribute().


API Tags:
Return:  Profile object if successful, or FALSE if an error occured
Access:  public


[ Top ]
owner  [line 180]

  array owner( )

This function retrieves an array of authorised users which can manipulate this institution.


API Tags:
Return:  owners of the institution; numbered array with members ID, MAIL and LEVEL
Access:  public


[ Top ]
profileCount  [line 195]

  int profileCount( )

This function gets the profile count for a given IdP The count could be retreived from the listProfiles method but this is less expensive.


API Tags:
Return:  profile count
Access:  public


[ Top ]
setExternalDBId  [line 431]

  void setExternalDBId( $identifier  )

Parameters:
   $identifier: 

API Tags:
Access:  public


[ Top ]
updateFreshness  [line 221]

  void updateFreshness( )

This function sets the timestamp of last modification of the child profiles to the current timestamp. This is needed for installer caching: all installers which are on disk must be re-created if an attribute changes. This timestamp here is used to determine if the installer on disk is still new enough.


API Tags:
Access:  public


[ Top ]

Documentation generated on Tue, 06 Oct 2015 06:11:17 +0000 by phpDocumentor 1.4.4