Site:Interfaces
From Metrixstream
Revision as of 09:59, 2 May 2012 by MetrixAdmin (Talk | contribs)
Introduction
Contexts are objects that encapsulate various functionality available to you during integration.
AuthContext
The AuthContext is responsible for providing all necessary functionality for authenticated users and their various access.
- isLoggedIn()
- @return a boolean on whether or not there is an authenticated user.
- hasUser()
- @return a boolean on whether or not there is an authenticated user and if that authenticated user is a User object.
- isUser(id)
- @return a boolean on whether the param:id represents the current authenticated user (if there is an authenticated user).
- getUser()
- @return a User object for the authenticated user.
- hasOwner()
- @return a boolean on whether or not there is an authenticated user and if that authenticated user is an Owner object.
- getOwner()
- @return a Owner object for the authenticated user.
- isAdministrator()
- @return a boolean on whether or not the authenticated user is an administrator.
- isModerator()
- @return a boolean on whether or not the authenticated user is a moderator.
DatabaseContext
- getNames()
- @return an Array of the available database names.
- closeAll()
- closes all of the database connections.
- getDB(name)
- @return an SQLDB object.
- getDBOption(name, option)
- @return a database option; options include: backups