Site:Interfaces

From Metrixstream
(Difference between revisions)
Jump to: navigation, search
(DatabaseContext)
(Introduction)
Line 46: Line 46:
 
;getDBOption(name, option)
 
;getDBOption(name, option)
 
: @return a database option; options include: backups
 
: @return a database option; options include: backups
 +
 +
=== ScopeContext ===
 +
 +
The ScopeContext provides relevant scope to consider during various backend processes. At it's core the ScopeContext is a hash-table of objects.
 +
 +
; has(key)
 +
: @return a boolean on whether or not this key exists.
 +
 +
; get(key, default = "")
 +
: @return an object for the relevant key.
 +
 +
; getObjId(key, default = "")
 +
: @return the id of the object if the value stored is an actual object and has an id field.
 +
 +
; getKeys()
 +
: @return an Array of all keys.

Revision as of 10:04, 2 May 2012

Contents

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

The DatabaseContext is responsible for providing the necessary functionality to interact with all relevant databases.

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

ScopeContext

The ScopeContext provides relevant scope to consider during various backend processes. At it's core the ScopeContext is a hash-table of objects.

has(key)
@return a boolean on whether or not this key exists.
get(key, default = "")
@return an object for the relevant key.
getObjId(key, default = "")
@return the id of the object if the value stored is an actual object and has an id field.
getKeys()
@return an Array of all keys.
Personal tools