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

Class: UserAPI

Source Location: /core/UserAPI.php

Class UserAPI

Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From CAT

CAT::$lang_index
CAT::$locale
CAT::$root

Inherited From CAT

CAT::__construct()
Constructor sets the language by calling set_lang
CAT::printCountryList()
Prepares a list of countries known to the CAT.
CAT::set_locale()
Sets the gettext domain
CAT::totalIdPs()
CAT::writeAudit()
Writes an audit log entry to the audit log file. These audits are semantic logs; they don't record every single modification in the database, but provide a logical "who did what" overview. The exact modification SQL statements are logged automatically with writeSQLAudit() instead. The log file path is configurable in _config.php.
CAT::writeSQLAudit()
Write an audit log entry to the SQL log file. Every SQL statement which is not a simple SELECT one will be written to the log file. The log file path is configurable in _config.php.

[ Top ]
Property Summary
mixed   $device  

[ Top ]
Method Summary
array   detectOS()   Detect the best device driver form the browser
void   deviceInfo()  
binary   downloadInstaller()   Generate and send the installer
array   generateInstaller()   Prepare the device module environment and send back the link
string   JSON_generateInstaller()   Call installer generation and return the link
string   JSON_listCountries()   Return the list of countiers with configured IdPs
string   JSON_listDevices()   Return the list of devices available for the given profile
string   JSON_listIdentityProviders()   Return the list of IdPs in a given country
string   JSON_listIdentityProvidersForDisco()   return the list of all active IdPs
void   JSON_listLanguages()   Return the list of supported languages.
string   JSON_listProfiles()   Produce a list of profiles available for a given IdP
void   JSON_locateUser()  
string   JSON_orderIdentityProviders()   Return the list of IdPs in a given country ordered with respect to the user location
string   JSON_profileAttributes()   Produce support data prepared within GUI::profileAttributes()
void   listDevices()   interface to Devices::listDevices()
void   locateUser()  
array   orderIdentityProviders()   Order active identity providers according to their distance and name
array   profileAttributes()   Prepare the support data for a given profile
void   return_json()  
void   sendLogo()   Get and prepare logo file

[ Top ]
Properties
mixed   $device [line 546]
API Tags:
Access:  public


[ Top ]
Methods
detectOS  [line 518]

  array detectOS( )

Detect the best device driver form the browser

Detects the operating system and returns its id display name and group membership (as in devices.php)


API Tags:
Return:  indexed by 'id', 'display', 'group'
Access:  public


[ Top ]
deviceInfo  [line 122]

  void deviceInfo( $device, $prof_id  )

Parameters:
   $device: 
   $prof_id: 

API Tags:
Access:  public


[ Top ]
downloadInstaller  [line 358]

  binary downloadInstaller( string $device, int $prof_id, [ $generatedfor = 'user']  )

Generate and send the installer

Parameters:
string   $device:  identifier as in devices.php
int   $prof_id:  profile identifier
   $generatedfor: 

API Tags:
Return:  installerFile
Access:  public


[ Top ]
generateInstaller  [line 53]

  array generateInstaller( string $device, int $prof_id, [ $generated_for = "user"]  )

Prepare the device module environment and send back the link

This method creates a device module instance via the DeviceFactory call, then sets up the device module environment for the specific profile by calling DeviceConfig::setup() method and finally, called the devide writeInstaller meethod passing the returned path name.

Parameters:
string   $device:  identifier as in devices.php
int   $prof_id:  profile identifier
   $generated_for: 

API Tags:
Return:  array with the following fields: profile - the profile identifier; device - the device identifier; link - the path name of the resulting installer mime - the mimetype of the installer
Access:  public


[ Top ]
JSON_generateInstaller  [line 340]

  string JSON_generateInstaller( string $device, int $prof_id  )

Call installer generation and return the link

Parameters:
string   $device:  identifier as in devices.php
int   $prof_id:  profile identifier

API Tags:
Return:  JSON encoded data
Access:  public


[ Top ]
JSON_listCountries  [line 216]

  string JSON_listCountries( )

Return the list of countiers with configured IdPs


API Tags:
Return:  JSON encoded data
Access:  public


[ Top ]
JSON_listDevices  [line 311]

  string JSON_listDevices( int $profile_id  )

Return the list of devices available for the given profile

Parameters:
int   $profile_id:  the Profile identifier

API Tags:
Return:  JSON encoded data
Access:  public


[ Top ]
JSON_listIdentityProviders  [line 231]

  string JSON_listIdentityProviders( $country, int $idp_id  )

Return the list of IdPs in a given country

Parameters:
int   $idp_id:  the IdP identifier
   $country: 

API Tags:
Return:  JSON encoded data
Access:  public


[ Top ]
JSON_listIdentityProvidersForDisco  [line 247]

  string JSON_listIdentityProvidersForDisco( )

return the list of all active IdPs

The IdP list is formatted for DiscoJuice


API Tags:
Return:  JSON encoded data
Access:  public


[ Top ]
JSON_listLanguages  [line 203]

  void JSON_listLanguages( )

Return the list of supported languages.


API Tags:
Access:  public


[ Top ]
JSON_listProfiles  [line 282]

  string JSON_listProfiles( int $idp_id, [ $sort = 0]  )

Produce a list of profiles available for a given IdP

Parameters:
int   $idp_id:  the IdP identifier
   $sort: 

API Tags:
Return:  JSON encoded data
Access:  public


[ Top ]
JSON_locateUser  [line 436]

  void JSON_locateUser( )


API Tags:
Access:  public


[ Top ]
JSON_orderIdentityProviders  [line 267]

  string JSON_orderIdentityProviders( $country, int $idp_id  )

Return the list of IdPs in a given country ordered with respect to the user location

Parameters:
int   $idp_id:  the IdP identifier
   $country: 

API Tags:
Return:  JSON encoded data
Access:  public


[ Top ]
JSON_profileAttributes  [line 445]

  string JSON_profileAttributes( $prof_id  )

Produce support data prepared within GUI::profileAttributes()

Parameters:
   $prof_id: 

API Tags:
Return:  JSON encoded data
Access:  public


[ Top ]
listDevices  [line 103]

  void listDevices( [ $show_hidden = 0]  )

interface to Devices::listDevices()

Parameters:
   $show_hidden: 

API Tags:
Access:  public


[ Top ]
locateUser  [line 422]

  void locateUser( )


API Tags:
Access:  public


[ Top ]
orderIdentityProviders  [line 471]

  array orderIdentityProviders( $country, array $L  )

Order active identity providers according to their distance and name

Parameters:
array   $L:  - current location
   $country: 

API Tags:
Return:  - list of arrays ('id', 'name');
Access:  public


[ Top ]
profileAttributes  [line 148]

  array profileAttributes( int $prof_id  )

Prepare the support data for a given profile

Parameters:
int   $prof_id:  profile identifier

API Tags:
Return:  array with the following fields:
  • local_email
  • local_phone
  • local_url
  • description
  • devices - an array of device names and their statuses (for a given profile)
Access:  public


[ Top ]
return_json  [line 190]

  void return_json( $data, [ $status = 1]  )

Parameters:
   $data: 
   $status: 

API Tags:
Access:  public


[ Top ]
sendLogo  [line 387]

  void sendLogo( int $idp_id, [int $disco = FALSE]  )

Get and prepare logo file

When called for DiscoJuice, first check if file cache exists If not then generate the file and save it in the cache

Parameters:
int   $idp_id:  IdP identifier
int   $disco:  flag turning on image generation for DiscoJuice

API Tags:
Access:  public


[ Top ]

Documentation generated on Thu, 16 Apr 2015 10:26:08 +0000 by phpDocumentor 1.4.4