Site:Interfaces
From Metrixstream
(Difference between revisions)
MetrixAdmin (Talk | contribs) |
MetrixAdmin (Talk | contribs) (→Introduction) |
||
Line 2: | Line 2: | ||
Contexts are objects that encapsulate various functionality available to you during integration. | Contexts are objects that encapsulate various functionality available to you during integration. | ||
+ | |||
+ | === AuthContext === | ||
+ | |||
+ | ; 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 === | === DatabaseContext === |
Revision as of 09:56, 2 May 2012
Introduction
Contexts are objects that encapsulate various functionality available to you during integration.
AuthContext
- 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