Class CMS_view

Description

Class CMS_view

XHTML / JS / XML Interface generation This class is a singleton : it can't be instancied directly. You must use getInstance method

Located in /automne/classes/dialogs/view.php (line 26)

CMS_grandFather
   |
   --CMS_view
Class Constant Summary
Variable Summary
 static mixed $_instance
Method Summary
 static void getCSSManagerURL ()
 static void getInstance ()
 static void getJSManagerURL ()
 static void quit ()
 static boolean redirect (string $url, [boolean $exit = true], [integer $type = 302])
 void addContent (string $content)
 void addCSSFile ( $css)
 void addError (array $error)
 void addJavascript (string $js)
 void addJSFile ( $js)
 void addRawData (array $rawData)
 void get ([mixed $mode = ''])
 string getContent ()
 void getCSS ([ $cssarray = array()], [string $media = 'screen'], [boolean $onlyFiles = false], array $files)
 constant getDisplayMode ()
 string getErrors ([boolean $clean = false])
 void getJavascript ([ $jsarray = array()], [string $media = 'screen'], [boolean $onlyFiles = false], array $files)
 string getRawDatas ([boolean $clean = false])
 boolean hasErrors ()
 boolean hasRawDatas ()
 boolean isSent ()
 void setActionMessage (string $message)
 void setContent (string $content)
 boolean setContentTag (string $tag)
 void setDisconnected (boolean $status)
 void setDisplayMode ([string $mode = ''])
 void setJavascript (string $js)
 string setSecure ([ $secure = true])
 void setTitle (string $title)
 void show ([mixed $mode = ''])
 string _copyright ()
 string _espaceCdata (string $text)
 void _showBody ([ $returnValue = false])
 void _showHead ([ $returnValue = false])
 void __constructor ()
Variables
static mixed $_instance = false (line 76)

Create and get class instance This is a singleton : the class is always the same anywhere

  • access: public
Methods
static getCSSManagerURL (line 172)
static void getCSSManagerURL ()
static getInstance (line 78)
static void getInstance ()
static getJSManagerURL (line 141)
static void getJSManagerURL ()
static quit (line 185)

Quit : global shutdown function for the application Send errors present in stack

  • access: public
static void quit ()
static redirect (line 716)

Redirect page to another one Take care of redirections inside Automne administration

  • access: public
static boolean redirect (string $url, [boolean $exit = true], [integer $type = 302])
  • string $url: : the url to redirect to
  • boolean $exit: : does the script must exit now ? (default : true)
  • integer $type: : the http redirection code to use. Accept 302 and 301 (default : 302)
addContent (line 228)

Add content

  • access: public
void addContent (string $content)
  • string $content
addCSSFile (line 166)
void addCSSFile ( $css)
  • $css
addError (line 309)

Add an error state to display later

  • access: public
void addError (array $error)
  • array $error: : the error to add
addJavascript (line 126)

Add javascript

  • access: public
void addJavascript (string $js)
  • string $js: : Javascript code to add
addJSFile (line 113)
void addJSFile ( $js)
  • $js
addRawData (line 359)

Add an raw data to display later

  • access: public
void addRawData (array $rawData)
  • array $rawData: : the raw data to add
get (line 451)

Get all display content for a given display mode page

  • access: public
void get ([mixed $mode = ''])
  • mixed $mode: : the display mode to use
getContent (line 244)

Get content

  • return: : the current view content
  • access: public
string getContent ()
getCSS (line 155)

Create a link for a group of CSS files used into client page

  • access: public
void getCSS ([ $cssarray = array()], [string $media = 'screen'], [boolean $onlyFiles = false], array $files)
  • array $files: : for static calls : array of files path to send to client (FS relative)
  • string $media: : the media to add to CSS HTML code returned (default : screen)
  • boolean $onlyFiles: : return only array of CSS files to add instead of HTML code (default false)
  • $cssarray
getDisplayMode (line 265)

Get current display mode

  • return: : display mode
  • access: public
constant getDisplayMode ()
getErrors (line 320)

Get registered errors at current display mode format

  • return: errors
  • access: public
string getErrors ([boolean $clean = false])
  • boolean $clean: : reset errors stack (default false)
getJavascript (line 94)

Create a link for a group of JS files used into client page

  • access: public
void getJavascript ([ $jsarray = array()], [string $media = 'screen'], [boolean $onlyFiles = false], array $files)
  • array $files: : for static calls : array of files path to send to client (FS relative)
  • string $media: : useless for JS files (only for compatibility with getCSS method)
  • boolean $onlyFiles: : return only array of JS files to add instead of HTML code (default false)
  • $jsarray
getRawDatas (line 370)

Get registered raw datas at current display mode format

  • return: raw datas
  • access: public
string getRawDatas ([boolean $clean = false])
  • boolean $clean: : reset raw datas stack (default false)
hasErrors (line 348)

Does the current view has errors registered ?

  • access: public
boolean hasErrors ()
hasRawDatas (line 397)

Does the current view has raw datas registered ?

  • access: public
boolean hasRawDatas ()
isSent (line 206)

Does the view has been sent to user ?

  • access: public
boolean isSent ()
setActionMessage (line 287)

Set page action message

  • access: public
void setActionMessage (string $message)
  • string $message
setContent (line 217)

Set content

  • access: public
void setContent (string $content)
  • string $content
setContentTag (line 618)

set content tag : overwrite default content tag used

  • access: private
boolean setContentTag (string $tag)
  • string $tag: : the new content tag name to use for current display mode
setDisconnected (line 298)

Set disconnected status

  • access: public
void setDisconnected (boolean $status)
  • boolean $status
setDisplayMode (line 255)

Set display mode

  • access: public
void setDisplayMode ([string $mode = ''])
  • string $mode
setJavascript (line 137)

Set javascript

  • access: public
void setJavascript (string $js)
  • string $js: : Javascript code to set
setSecure (line 493)

Set interface secure. Check request is made from a valid Automne Ajax Use http header

  • return: : the copyright to add
  • access: public
string setSecure ([ $secure = true])
  • $secure
setTitle (line 276)

Set page title

  • access: public
void setTitle (string $title)
  • string $title
show (line 409)

Displays Admin page This method stop all further script execution

  • access: public
void show ([mixed $mode = ''])
  • mixed $mode: : the display mode to use
_copyright (line 476)

add Automne copyright on generated HTML in backend

  • return: : the copyright to add
  • access: private
string _copyright ()
_espaceCdata (line 514)

Escape cdata end tag in text to avoid error in returned content

  • return: : the escaped content
  • access: private
string _espaceCdata (string $text)
  • string $text: : the text to escape
_showBody (line 632)

Shows body of html page

  • access: private
void _showBody ([ $returnValue = false])
  • $returnValue
_showHead (line 524)

Writes html header

  • access: private
void _showHead ([ $returnValue = false])
  • $returnValue
__constructor (line 77)
void __constructor ()

Inherited Methods

Inherited From CMS_grandFather

 CMS_grandFather::autoload()
 CMS_grandFather::hasError()
 CMS_grandFather::log()
 CMS_grandFather::PHPErrorHandler()
 CMS_grandFather::raiseError()
 CMS_grandFather::setDebug()
 CMS_grandFather::setLog()
 CMS_grandFather::_raiseError()
 CMS_grandFather::__call()
Class Constants
SHOW_HTML = 1 (line 33)

Class modes

SHOW_JSON = 2 (line 37)
SHOW_RAW = 4 (line 45)
SHOW_XML = 3 (line 41)

Inherited Constants

Inherited from CMS_grandFather

CMS_grandFather::ERROR_LOG
CMS_grandFather::SYSTEM_LABEL

Documentation generated on Wed, 15 Feb 2012 15:40:56 +0100 by phpDocumentor 1.4.3