Class mosMainFrame

Description

Mambo Mainframe class

Provide many supporting API functions

Located in /includes/core.classes.php (line 2178)


	
			
Variable Summary
 array $_head
 object A $_option
 string $_template
 array $_userstate
Method Summary
 mosMainFrame mosMainFrame (database &$db, string $option, string $basePath, [ $isAdmin = false])
 void addCustomHeadTag (string $html)
 void addMetaTag (string $name, string $content, [string $prepend = ''], [string $append = ''])
 void appendMetaTag (string $name, string $content, [ $ifEmpty = false])
 void appendPathWay ( $html)
 void detect ()
 mixed getCfg (string $varname)
 string getCustomPathWay ()
 string getHead ()
 void &getInstance (object 0)
 correct getItemid ( $id, [ $typed = 1], [ $link = 1], [ $bs = 1], [ $bc = 1], [ $gbs = 1])
 string getPageTitle ()
 void getPath ( $varname, [ $option = ''])
 void getTemplate ()
 void getUser ()
 void getUserState (string $var_name)
 void getUserStateFromRequest (string $var_name, string $req_name, [string $var_default = null])
 void ImageCheck ( $file, [ $directory = '/images/M_images/'], [ $param = NULL], [ $param_directory = '/images/M_images/'], [ $alt = NULL], [ $name = 'image'], [ $type = 1], [ $align = 'middle'])
 void &initSession ()
 void liveBookMark ()
 void login ([ $username = null], [ $passwd = null])
 void logout ()
 void mosShowHead ()
 void prependMetaTag (string $name, string $content)
 void setPageTitle ([string $title = null])
 void setUserState (string $var_name, string $var_value)
 void tryFiles ( $first_choice, [ $second_choice = null], [ $third_choice = null])
 void _getMetaTag (string $name)
 void _setTemplate ([ $isAdmin = false])
 void _tidyMetaData (string $name, string $content)
Variables
string $_custom_pathway = array() (line 2190)
  • var: Custom html string to append to the pathway
database $_db = null (line 2180)
  • var: Internal database class pointer
array $_head = null (line 2188)
  • var: An array of page meta information
object A $_option = null (line 2182)
  • var: default option (e.g. component)
string $_template = null (line 2184)
  • var: The current template
array $_userstate = null (line 2186)
  • var: An array to hold global user state within a session
Methods
Constructor mosMainFrame (line 2198)

Class constructor

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

Adds a custom html string to the head block

void addCustomHeadTag (string $html)
  • string $html: The html to add to the head
addMetaTag (line 2272)
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 2298)
void appendMetaTag (string $name, string $content, [ $ifEmpty = false])
  • 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
  • $ifEmpty
appendPathWay (line 2344)
void appendPathWay ( $html)
  • $html
detect (line 2518)

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 2624)
void getBlogCategoryCount ()
getBlogSectionCount (line 2618)

retained for backward compatability

void getBlogSectionCount ()
getCfg (line 2395)
  • 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 2642)
void getContentItemLinkCount ()
getCustomPathWay (line 2340)
string getCustomPathWay ()
getGlobalBlogSectionCount (line 2630)
void getGlobalBlogSectionCount ()
getHead (line 2327)
string getHead ()
getInstance (line 2239)
void &getInstance (object 0)
  • object 0
getItemid (line 2552)
  • return: Itemid for Content Item
correct getItemid ( $id, [ $typed = 1], [ $link = 1], [ $bs = 1], [ $bc = 1], [ $gbs = 1])
  • $id
  • $typed
  • $link
  • $bs
  • $bc
  • $gbs
getPageTitle (line 2262)
string getPageTitle ()
getPath (line 2474)

Returns a standard path variable

void getPath ( $varname, [ $option = ''])
  • $varname
  • $option
getStaticContentCount (line 2636)
void getStaticContentCount ()
getTemplate (line 2436)
void getTemplate ()
getUser (line 2216)

Get the current user - deprecated - use mamboCore instead

void getUser ()
getUserState (line 2352)

Gets the value of a user state variable

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

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
ImageCheck (line 2446)

Checks to see if an image exists in the current templates image directory if it does it loads this image. Otherwise the default image is loaded.

Also can be used in conjunction with the menulist param to create the chosen image load the default or use no image

void ImageCheck ( $file, [ $directory = '/images/M_images/'], [ $param = NULL], [ $param_directory = '/images/M_images/'], [ $alt = NULL], [ $name = 'image'], [ $type = 1], [ $align = 'middle'])
  • $file
  • $directory
  • $param
  • $param_directory
  • $alt
  • $name
  • $type
  • $align
initSession (line 2386)

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 ()
liveBookMark (line 2558)
void liveBookMark ()
login (line 2230)

Login a user given name and password - deprecated - use the code here directly

void login ([ $username = null], [ $passwd = null])
  • $username
  • $passwd
logout (line 2222)

Logout the current user - deprecated - use the code here directly

void logout ()
mosShowHead (line 2590)
void mosShowHead ()
prependMetaTag (line 2311)
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 2252)
void setPageTitle ([string $title = null])
  • string $title
setUserState (line 2360)

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
tryFiles (line 2463)

Returns the first to be found of one or more files, or null

void tryFiles ( $first_choice, [ $second_choice = null], [ $third_choice = null])
  • $first_choice
  • $second_choice
  • $third_choice
_getMetaTag (line 2281)
void _getMetaTag (string $name)
  • string $name: The value of the name attibute
_setTemplate (line 2399)
void _setTemplate ([ $isAdmin = false])
  • $isAdmin
_tidyMetaData (line 2288)
void _tidyMetaData (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

Documentation generated on Mon, 05 May 2008 16:19:01 +0400 by phpDocumentor 1.4.0