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 27]



		
				Author(s):
		
		
		
Information Tags:
License:  http://ticker.eduroam.lu/cat/LICENSE

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

[ 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   flushAttributes()   deletes all attributes of this IdP from the database
array   getAttributes()   retrieves the IdP-wide attributes
array   listProfiles()   This function retrieves all registered profiles for this IdP from the database
object new   newProfile()   Adds a new profile to this IdP.

[ Top ]
Properties
string   $federation [line 180]

The shortname of this IdP's federation

API Tags:
Access:  public


[ Top ]
int   $identifier [line 185]

The row index of this IdP in the database

API Tags:
Access:  public


[ Top ]
string   $name [line 190]

The name of this IdP

API Tags:
Access:  public


[ Top ]
Methods
Constructor __construct  [line 36]

  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::createIdP(), which doesn't exist yet :-)

Parameters:
integer   $i_id:  the database row identifier

API Tags:
Access:  public


[ Top ]
addAttribute  [line 141]

  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 111]

  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 127]

  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 ]
flushAttributes  [line 102]

  void flushAttributes( )

deletes all attributes of this IdP from the database


API Tags:
Access:  public


[ Top ]
getAttributes  [line 76]

  array getAttributes( [ $option_name = 0]  )

retrieves the IdP-wide attributes

Parameters:
   $option_name: 

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


[ Top ]
listProfiles  [line 55]

  array listProfiles( )

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


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


[ Top ]
newProfile  [line 159]

  object new newProfile( string $name  )

Adds a new profile to this IdP.

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

Parameters:
string   $name:  Display Name of the profile

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


[ Top ]

Documentation generated on Fri, 05 Aug 2011 15:56:30 +0200 by phpDocumentor 1.4.3