The Red Matrix
 All Classes Namespaces Files Functions Variables Pages
App Class Reference

Public Member Functions

 __construct ()
 
 get_baseurl ($ssl=false)
 
 set_baseurl ($url)
 
 get_hostname ()
 
 set_hostname ($h)
 
 set_path ($p)
 
 get_path ()
 
 set_account ($aid)
 
 get_account ()
 
 set_channel ($channel)
 
 get_channel ()
 
 set_observer ($xchan)
 
 get_observer ()
 
 set_perms ($perms)
 
 get_perms ()
 
 get_apps ()
 
 set_apps ($arr)
 
 set_groups ($g)
 
 get_groups ()
 
 set_widget ($title, $html, $location= 'aside')
 
 get_widgets ($location= '')
 
 set_pager_total ($n)
 
 set_pager_itemspage ($n)
 
 build_pagehead ()
 
 set_curl_code ($code)
 
 get_curl_code ()
 
 set_curl_headers ($headers)
 
 get_curl_headers ()
 
 register_template_engine ($class, $name= '')
 
 template_engine ($name= '')
 
 get_template_engine ()
 
 set_template_engine ($engine= 'smarty3')
 
 get_template_ldelim ($engine= 'smarty3')
 
 get_template_rdelim ($engine= 'smarty3')
 
 head_set_icon ($icon)
 
 head_get_icon ()
 

Public Attributes

 $account = null
 
 $channel = null
 
 $observer = null
 
 $groups
 
 $language
 
 $module_loaded = false
 
 $query_string
 
 $config
 
 $page
 
 $profile
 
 $user
 
 $cid
 
 $contact
 
 $contacts
 
 $content
 
 $data = array()
 
 $error = false
 
 $cmd
 
 $argv
 
 $argc
 
 $module
 
 $pager
 
 $strings
 
 $hooks
 
 $timezone
 
 $interactive = true
 
 $plugins
 
 $identities
 
 $css_sources = array()
 
 $js_sources = array()
 
 $theme_info = array()
 
 $nav_sel
 
 $category
 
 $sourcename = ''
 
 $videowidth = 425
 
 $videoheight = 350
 
 $force_max_items = 0
 
 $theme_thread_allow = true
 
 $template_engines = array()
 
 $template_engine_instance = array()
 

Private Attributes

 $perms = null
 
 $widgets = array()
 
 $widgetlist = null
 
 $apps = array()
 
 $theme
 
 $ldelim
 
 $rdelim
 
 $scheme
 
 $hostname
 
 $baseurl
 
 $path
 
 $db
 
 $curl_code
 
 $curl_headers
 
 $cached_profile_image
 
 $cached_profile_picdate
 

Detailed Description

class: App

Our main application structure for the life of this page Primarily deals with the URL that got us here and tries to make some sense of it, and stores our page contents and config storage and anything else that might need to be passed around before we spit the page out.

Constructor & Destructor Documentation

App::__construct ( )

Figure out if we are running at the top of a domain or in a sub-directory and adjust accordingly

Break the URL path into C style argc/argv style arguments for our modules. Given "http://example.com/module/arg1/arg2", $this->argc will be 3 (integer) and $this->argv will contain: [0] => 'module' [1] => 'arg1' [2] => 'arg2'

There will always be one argument. If provided a naked domain URL, $this->argv[0] is set to "home".

See if there is any page number information, and initialise pagination

Detect mobile devices

register template engines

Member Function Documentation

App::build_pagehead ( )
App::get_account ( )
App::get_apps ( )
App::get_baseurl (   $ssl = false)

Referenced by build_pagehead().

App::get_channel ( )
App::get_curl_code ( )
App::get_curl_headers ( )
App::get_groups ( )
App::get_hostname ( )
App::get_observer ( )
App::get_path ( )
App::get_perms ( )
App::get_template_engine ( )
App::get_template_ldelim (   $engine = 'smarty3')
App::get_template_rdelim (   $engine = 'smarty3')
App::get_widgets (   $location = '')
App::head_get_icon ( )

Referenced by build_pagehead().

App::head_set_icon (   $icon)

Referenced by __construct().

App::register_template_engine (   $class,
  $name = '' 
)

register template engine class if $name is "", is used class static property $class::$name

Parameters
string$class
string$name

Referenced by __construct().

App::set_account (   $aid)
App::set_apps (   $arr)
App::set_baseurl (   $url)
App::set_channel (   $channel)
App::set_curl_code (   $code)
App::set_curl_headers (   $headers)
App::set_groups (   $g)
App::set_hostname (   $h)
App::set_observer (   $xchan)
App::set_pager_itemspage (   $n)
App::set_pager_total (   $n)
App::set_path (   $p)
App::set_perms (   $perms)
App::set_template_engine (   $engine = 'smarty3')
App::set_widget (   $title,
  $html,
  $location = 'aside' 
)
App::template_engine (   $name = '')

return template engine instance. If $name is not defined, return engine defined by theme, or default

Parameters
strin$nameTemplate engine name
Returns
object Template Engine instance

Member Data Documentation

App::$account = null

Referenced by get_account().

App::$apps = array()
private

Referenced by get_apps().

App::$argc
App::$argv
App::$baseurl
private

Referenced by get_baseurl().

App::$cached_profile_image
private
App::$cached_profile_picdate
private
App::$category
App::$channel = null

Referenced by get_channel(), and set_channel().

App::$cid
App::$cmd
App::$config
App::$contact
App::$contacts
App::$content
App::$css_sources = array()
App::$curl_code
private

Referenced by get_curl_code().

App::$curl_headers
private

Referenced by get_curl_headers().

App::$data = array()
App::$db
private
App::$error = false
App::$force_max_items = 0
App::$groups

Referenced by get_groups().

App::$hooks
App::$hostname
private

Referenced by get_hostname().

App::$identities
App::$interactive = true
App::$js_sources = array()
App::$language
App::$ldelim
private
Initial value:
= array(
'internal' => '',
'smarty3' => '{{'
)
App::$module
App::$module_loaded = false
App::$nav_sel
App::$observer = null

Referenced by get_observer().

App::$page
App::$pager
App::$path
private

Referenced by __construct(), and get_path().

App::$perms = null
private

Referenced by get_perms(), and set_perms().

App::$plugins
App::$profile
App::$query_string
App::$rdelim
private
Initial value:
= array(
'internal' => '',
'smarty3' => '}}'
)
App::$scheme
private

Referenced by get_baseurl().

App::$sourcename = ''
App::$strings
App::$template_engine_instance = array()
App::$template_engines = array()
App::$theme
private
Initial value:
= array(
'sourcename' => '',
'videowidth' => 425,
'videoheight' => 350,
'force_max_items' => 0,
'thread_allow' => true,
'stylesheet' => '',
'template_engine' => 'smarty3',
)
App::$theme_info = array()
App::$theme_thread_allow = true
App::$timezone
App::$user
App::$videoheight = 350
App::$videowidth = 425
App::$widgetlist = null
private
App::$widgets = array()
private

Referenced by get_widgets().


The documentation for this class was generated from the following file: