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

Class: Profile

Source Location: /core/Profile.php

Class Profile

Class Overview

This class represents an EAP Profile.

Profiles can inherit attributes from their IdP, if the IdP has some. Otherwise, one can set attribute in the Profile directly. If there is a conflict between IdP-wide and Profile-wide attributes, the more specific ones (i.e. Profile) win.

Located in /core/Profile.php [line 33]



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

Properties

Methods

[ Top ]
Property Summary
mixed   $identifier  
mixed   $institution  
mixed   $name  
mixed   $realm  
mixed   $use_anon_outer  

[ Top ]
Method Summary
Profile   __construct()  
void   addAttribute()   adds an attribute to this profile
void   addSupportedEapMethod()   register new supported EAP method for this profile
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 profile from database and uninstantiates itself
void   flushAttributes()  
void   flushSupportedEapMethods()   removes all supported EAP methods
void   getAnonymousIDSupport()   returns FALSE if anonymous outer ID support if disabled, or the realm if it is enabled
array   getAttributes()   getAttibutes() returnes an array of attributes, including options (as an array) if no argument is given, only the profile-wide options are returned
void   getCAs()  
void   getCollapsedAttributes()  
array   getEapMethodsinOrderOfPreference()   produces an array of EAP methods supported by this profile, ordered by reference
void   getRealm()  
mixed   isBlacklisted()   Checks whether a combination of EAP type and device should be served, or rather redirected
void   isEapTypeDefinitionComplete()  
array   listDevices()   list all devices marking their availabiblity
bool   registerBlacklist()   registers that a combination of device type and EAP method in this profile should NOT be served by CAT A redirect URL needs to be given to send the user to
void   setAnonymousIDSupport()   toggle anonID support
void   setName()  
void   setRealm()  
void   unregisterBlacklist()   Deletes a previously set blacklist rule for EAP types and/or devices in this profile, including all more specific rules

[ Top ]
Properties
mixed   $identifier [line 531]
API Tags:
Access:  public


[ Top ]
mixed   $institution [line 533]
API Tags:
Access:  public


[ Top ]
mixed   $name [line 532]
API Tags:
Access:  public


[ Top ]
mixed   $realm [line 534]
API Tags:
Access:  public


[ Top ]
mixed   $use_anon_outer [line 535]
API Tags:
Access:  public


[ Top ]
Methods
Constructor __construct  [line 35]

  Profile __construct( $p_id  )

Parameters:
   $p_id: 

API Tags:
Access:  public


[ Top ]
addAttribute  [line 193]

  void addAttribute( string $attr_name, string $attr_value, int $eap_type  )

adds an attribute to this profile

Parameters:
string   $attr_name: 
string   $attr_value: 
int   $eap_type: 

API Tags:
Access:  public


[ Top ]
addSupportedEapMethod  [line 215]

  void addSupportedEapMethod( array $type, int $preference  )

register new supported EAP method for this profile

Parameters:
array   $type:  The EAP Type, as defined in class EAP
int   $preference:  preference of this EAP Type. If a preference value is re-used, the order of EAP types of the same preference level is undefined.

API Tags:
Access:  public


[ Top ]
beginFlushAttributes  [line 61]

  array beginFlushAttributes( $eap_type  )

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

Parameters:
   $eap_type: 

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


[ Top ]
commitFlushAttributes  [line 78]

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

  void destroy( )

deletes the profile from database and uninstantiates itself


API Tags:
Access:  public


[ Top ]
flushAttributes  [line 52]

  void flushAttributes( $eap_type  )

Parameters:
   $eap_type: 

API Tags:
Access:  public


[ Top ]
flushSupportedEapMethods  [line 255]

  void flushSupportedEapMethods( )

removes all supported EAP methods


API Tags:
Access:  public


[ Top ]
getAnonymousIDSupport  [line 300]

  void getAnonymousIDSupport( )

returns FALSE if anonymous outer ID support if disabled, or the realm if it is enabled


API Tags:
Access:  public


[ Top ]
getAttributes  [line 341]

  array getAttributes( [ $eapmethod = 0]  )

getAttibutes() returnes an array of attributes, including options (as an array) if no argument is given, only the profile-wide options are returned

Parameters:
   $eapmethod: 

API Tags:
Access:  public


[ Top ]
getCAs  [line 524]

  void getCAs( $certs  )

Parameters:
   $certs: 

API Tags:
Access:  public


[ Top ]
getCollapsedAttributes  [line 469]

  void getCollapsedAttributes( )


API Tags:
Access:  public


[ Top ]
getEapMethodsinOrderOfPreference  [line 318]

  array getEapMethodsinOrderOfPreference( [ $complete_only = 0], int $complete_only,  )

produces an array of EAP methods supported by this profile, ordered by reference

Parameters:
int   $complete_only,:  if set and nonzeto limits the output to completeed methods
   $complete_only: 

API Tags:
Return:  list of EAP methods
Access:  public


[ Top ]
getRealm  [line 288]

  void getRealm( )


API Tags:
Access:  public


[ Top ]
isBlacklisted  [line 169]

  mixed isBlacklisted( array $eaptype, string $device  )

Checks whether a combination of EAP type and device should be served, or rather redirected

Parameters:
array   $eaptype:  the EAP type
string   $device:  the *module name* of the device that is blacklisted

API Tags:
Return:  FALSE if the combination is not blacklisted, a string with the redirection URL if so
Access:  public


[ Top ]
isEapTypeDefinitionComplete  [line 423]

  void isEapTypeDefinitionComplete( $eaptype  )

Parameters:
   $eaptype: 

API Tags:
Access:  public


[ Top ]
listDevices  [line 456]

  array listDevices( )

list all devices marking their availabiblity


API Tags:
Return:  of device ids display names and their status
Access:  public


[ Top ]
registerBlacklist  [line 96]

  bool registerBlacklist( string $targetURL, [EAP $eaptype = 0], [string $device = 0]  )

registers that a combination of device type and EAP method in this profile should NOT be served by CAT A redirect URL needs to be given to send the user to

Parameters:
EAP   $eaptype:  if omitted, will blacklist ALL EAP types for this device
string   $device:  if omitted, will blacklist the EAP type for all devices
string   $targetURL: 

API Tags:
Return:  whether or not the operation succeeded. The only reason for failure is if a superset rule exists already.
Access:  public


[ Top ]
setAnonymousIDSupport  [line 269]

  void setAnonymousIDSupport( boolean $shallwe, [string $realm = 0]  )

toggle anonID support

Parameters:
boolean   $shallwe: 
string   $realm: 

API Tags:
Access:  public


[ Top ]
setName  [line 202]

  void setName( $name  )

Parameters:
   $name: 

API Tags:
Access:  public


[ Top ]
setRealm  [line 282]

  void setRealm( $realm  )

Parameters:
   $realm: 

API Tags:
Access:  public


[ Top ]
unregisterBlacklist  [line 135]

  void unregisterBlacklist( [EAP $eaptype = 0], [string $device = 0]  )

Deletes a previously set blacklist rule for EAP types and/or devices in this profile, including all more specific rules

Parameters:
EAP   $eaptype:  if omitted, will lift blacklist for ALL EAP types for this device
string   $device:  if omitted, will lift blacklist of the EAP type for all devices

API Tags:
Access:  public


[ Top ]

Documentation generated on Thu, 13 Oct 2011 08:42:11 +0200 by phpDocumentor 1.4.3