Class mosMainFrame

Description

Mambo Mainframe class

Provide many supporting API functions

Located in /includes/mambo.php (line 83)


	
			
Variable Summary
Method Summary
mosMainFrame mosMainFrame (database &$db, string $option, string $basePath, [mixed $isAdmin = false])
void addCustomHeadTag (string $html)
void addMetaTag (string $name, string $content, [string $prepend = ''], [string $append = ''])
void appendMetaTag (string $name, string $content)
void appendPathWay (mixed $html)
void detect ()
mixed getCfg (string $varname)
string getCustomPathWay ()
string getHead ()
correct getItemid (mixed $id, [mixed $typed = 1], [mixed $link = 1], [mixed $bs = 1], [mixed $bc = 1], [mixed $gbs = 1])
string getPageTitle ()
void getPath (mixed $varname, [mixed $option = ''])
void getTemplate ()
void getUserState (string $var_name)
void getUserStateFromRequest (string $var_name, string $req_name, [string $var_default = null])
void initSession ()
void loadConfig ()
void login ([mixed $username = null], [mixed $passwd = null])
void logout ()
void prependMetaTag (string $name, string $content)
void setPageTitle ([string $title = null])
void setUserState (string $var_name, string $var_value)
void _setAdminPaths (string $option, [string $basePath = '.'])
void _setConfig ([string $basePath = '.'])
void _setTemplate ([mixed $isAdmin = false])
Variables
object An $_config = null (line 87)
  • var: object of configuration variables
string $_custom_pathway = null (line 99)
  • var: Custom html string to append to the pathway
database $_db = null (line 85)
  • var: Internal database class pointer
array $_head = null (line 97)
  • var: An array of page meta information
object An $_path = null (line 89)
  • var: object of path variables
mosSession $_session = null (line 91)
  • var: The current session
string $_template = null (line 93)
  • var: The current template
array $_userstate = null (line 95)
  • var: An array to hold global user state within a session
Methods
Constructor mosMainFrame (line 107)

Class constructor

mosMainFrame mosMainFrame (database &$db, string $option, string $basePath, [mixed $isAdmin = false])
  • database &$db: A database connection object
  • string $option: The url option
  • string $basePath: The path of the mos directory
addCustomHeadTag (line 191)

Adds a custom html string to the head block

void addCustomHeadTag (string $html)
  • string $html: The html to add to the head
addMetaTag (line 140)
void addMetaTag (string $name, string $content, [string $prepend = ''], [string $append = ''])
  • string $name: The value of the name attibute
  • string $content: The value of the content attibute
  • string $prepend: Text to display before the tag
  • string $append: Text to display after the tag
appendMetaTag (line 152)
void appendMetaTag (string $name, string $content)
  • string $name: The value of the name attibute
  • string $content: The value of the content attibute to append to the existing Tags ordered in with Site Keywords and Description first
appendPathWay (line 228)
void appendPathWay (mixed $html)
detect (line 705)

Detects a 'visit'

This function updates the agent and domain table hits for a particular visitor. The user agent is recorded/incremented if this is the first visit. A cookie is set to mark the first visit.

void detect ()
getBlogCategoryCount (line 854)
  • return: of Published Blog Categories
number getBlogCategoryCount ()
getBlogSectionCount (line 838)
  • return: of Published Blog Sections
number getBlogSectionCount ()
getCfg (line 503)
  • return: The value of the configuration variable or null if not found
mixed getCfg (string $varname)
  • string $varname: The name of the variable (from configuration.php)
getContentItemLinkCount (line 899)
  • return: of Content Item Links
number getContentItemLinkCount ()
getCustomPathWay (line 224)
string getCustomPathWay ()
getGlobalBlogSectionCount (line 870)
  • return: of Published Global Blog Sections
number getGlobalBlogSectionCount ()
getHead (line 197)
string getHead ()
getItemid (line 762)
  • return: Itemid for Content Item
correct getItemid (mixed $id, [mixed $typed = 1], [mixed $link = 1], [mixed $bs = 1], [mixed $bc = 1], [mixed $gbs = 1])
getPageTitle (line 217)
string getPageTitle ()
getPath (line 621)

Returns a stored path variable

void getPath (mixed $varname, [mixed $option = ''])
getStaticContentCount (line 885)
  • return: of Static Content
number getStaticContentCount ()
getTemplate (line 564)
void getTemplate ()
getUser (line 419)
  • return: A user object with the information from the current session
mosUser getUser ()
getUserState (line 236)

Gets the value of a user state variable

void getUserState (string $var_name)
  • string $var_name: The name of the variable
getUserStateFromRequest (line 249)

Gets the value of a user state variable

void getUserStateFromRequest (string $var_name, string $req_name, [string $var_default = null])
  • string $var_name: The name of the user state variable
  • string $req_name: The name of the variable passed in a request
  • string $var_default: The default value for the variable if not found
initSession (line 279)

Initialises the user session

Old sessions are flushed based on the configuration value for the cookie lifetime. If an existing session, then the last access time is updated. If a new session, a session id is generated and a record is created in the mos_sessions table.

void initSession ()
loadConfig (line 512)
void loadConfig ()
login (line 319)

Login validation function

Username and encoded password is compare to db entries in the mos_users table. A successful validation updates the current session record with the users details.

void login ([mixed $username = null], [mixed $passwd = null])
logout (line 396)

User logout

Reverts the current session record back to 'anonymous' parameters

void logout ()
prependMetaTag (line 175)
void prependMetaTag (string $name, string $content)
  • string $name: The value of the name attibute
  • string $content: The value of the content attibute to append to the existing
setPageTitle (line 128)
void setPageTitle ([string $title = null])
  • string $title
setUserState (line 266)

Sets the value of a user state variable

void setUserState (string $var_name, string $var_value)
  • string $var_name: The name of the variable
  • string $var_value: The value of the variable
_setAdminPaths (line 573)

Determines the paths for including engine and menu files

void _setAdminPaths (string $option, [string $basePath = '.'])
  • string $option: The current option used in the url
  • string $basePath: The base path from which to load the configuration file
_setConfig (line 433)

Loads the configuration.php file and assigns values to the internal variable

void _setConfig ([string $basePath = '.'])
  • string $basePath: The base path from which to load the configuration file
_setTemplate (line 523)
void _setTemplate ([mixed $isAdmin = false])

Documentation generated on Fri, 4 Mar 2005 13:56:32 +1000 by phpDocumentor 1.3.0RC3