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



		
				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()  
void   getEapMethodsinOrderOfPreference()  
void   getRealm()  
mixed   isBlacklisted()   Checks whether a combination of EAP type and device should be served, or rather redirected
void   isEapTypeDefinitionComplete()  
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 481]
API Tags:
Access:  public


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


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


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


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


[ Top ]
Methods
Constructor __construct  [line 29]

  Profile __construct( $p_id  )

Parameters:
   $p_id: 

API Tags:
Access:  public


[ Top ]
addAttribute  [line 176]

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

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

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

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

  void destroy( )

deletes the profile from database and uninstantiates itself


API Tags:
Access:  public


[ Top ]
flushAttributes  [line 46]

  void flushAttributes( $eap_type  )

Parameters:
   $eap_type: 

API Tags:
Access:  public


[ Top ]
flushSupportedEapMethods  [line 235]

  void flushSupportedEapMethods( )

removes all supported EAP methods


API Tags:
Access:  public


[ Top ]
getAnonymousIDSupport  [line 280]

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

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

  void getCAs( $certs  )

Parameters:
   $certs: 

API Tags:
Access:  public


[ Top ]
getCollapsedAttributes  [line 419]

  void getCollapsedAttributes( )


API Tags:
Access:  public


[ Top ]
getEapMethodsinOrderOfPreference  [line 291]

  void getEapMethodsinOrderOfPreference( )


API Tags:
Access:  public


[ Top ]
getRealm  [line 268]

  void getRealm( )


API Tags:
Access:  public


[ Top ]
isBlacklisted  [line 157]

  mixed isBlacklisted( $eaptype, $device  )

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

Parameters:
   $eaptype: 
   $device: 

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


[ Top ]
isEapTypeDefinitionComplete  [line 393]

  void isEapTypeDefinitionComplete( $eaptype  )

Parameters:
   $eaptype: 

API Tags:
Access:  public


[ Top ]
registerBlacklist  [line 90]

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

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

toggle anonID support

Parameters:
boolean   $shallwe: 
string   $realm: 

API Tags:
Access:  public


[ Top ]
setName  [line 185]

  void setName( $name  )

Parameters:
   $name: 

API Tags:
Access:  public


[ Top ]
setRealm  [line 262]

  void setRealm( $realm  )

Parameters:
   $realm: 

API Tags:
Access:  public


[ Top ]
unregisterBlacklist  [line 127]

  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 Fri, 05 Aug 2011 15:56:30 +0200 by phpDocumentor 1.4.3