Class RaxanWebPage

Description

Implements interfaces:

  • ArrayAccess (internal interface)

Raxan Web Page Controller Base Class

This class is used to traverse and manipulate HTML DOM elements

  • property: Raxan $Raxan: Instance of Raxan main class
  • property: RaxanDataSanitizer $post: Sanitized Post Request
  • property: RaxanDataSanitizer $get: Sanitized Get Request
  • property: mixed $autoAppendView: Automatically appends a view to the document. Set to true to append files using the default file name pattern {basename}.{view}.php or enter a customized pattern. For example: 'myapp-{view}.php'
  • property: string $activeView: Currently active view
  • property: string $masterTemplate: Master template file name or html string
  • property: string $masterContentBlock: Master template content css selector. Defaults to .master-content

Located in /raxan.webpage.php (line 75)

RaxanBase
   |
   --RaxanWebPage
Variable Summary
static mixed $actions
static mixed $autoId
static mixed $autoIdPrefix
static mixed $badIdChars
static mixed $cliExtLoaded
static mixed $customMethods
static mixed $customProps
static mixed $eventId
static mixed $mPageId
static mixed $pages
static mixed $regScripts
static mixed $vars
static mixed $varsGlobal
mixed $activeView
mixed $degradable
mixed $doc
mixed $isCache
mixed $isCallback
mixed $isEmbedded
mixed $isLoaded
mixed $isPostBack
mixed $isRendering
mixed $isReplying
mixed $pageOutput
mixed $Raxan
mixed $_charset
mixed $_clientElms
mixed $_dataReset
mixed $_dataStore
mixed $_eCache
mixed $_flyDOM
mixed $_get
mixed $_headers
mixed $_hiddenElms
mixed $_post
mixed $_postRqst
mixed $_scripts
mixed $_startTime
mixed $_storeName
mixed $_uiElms
Method Summary
static void addMethod ( $name, [ $callback = null])
static void addProperty ( $name, [ $value = null])
static RaxanWebPage controller ([ $pageId = null])
static RaxanDOMDocument createDOM ( $html, [ $charset = 'UTF-8'], [ $type = null])
static RaxanWebPage init ( $pageClass)
static void loadClientExtension ()
static void nodeL10n ( $nodes)
static string pageCode ([ $type = 'html'], [ $charset = 'UTF-8'], [ $content = ''])
static void registerCSS (string $name, string $src, [array $dependencies = null])
static void registerScript (string $name, string $src, [array $dependencies = null])
static String uniqueElmId ([ $prefix = null])
RaxanWebPage __construct ([ $xhtml = ''], [ $charset = null], [ $type = null])
void __destruct ()
RaxanWebPage addCSS (string $style)
RaxanWebPage addScript (string $script, [string $startupEvent = null])
RaxanWebPage append (string $html)
RaxanWebPage appendView (string $view, [string $selector = null], [mixed $data = null])
RaxanWebPage bind ( $type, [ $data = null], [ $fn = null])
RaxanWebPage bindElements ( &$elms,  $type,  $data, [ $fn = null], [ $selector = ''], [ $delegate = false])
String buildActionScripts ([ $includeEvents = true])
RaxanWebPage callScriptFn (string $name, [mixed $param = null])
RaxanClientExtension client ([ $selector = null], [ $context = null])
RaxanWebPage content ([ $html = null])
RaxanWebPage contentDisposition ( $fileName, [ $transEncode = null], [ $fileSize = null])
RaxanWebPage contentType ( $type, [ $charset = null])
DOMElement createElement ( $name, [ $value = null], [ $attribs = null])
DOMDocumentFragment createFragment (string $html)
Mixed &data (string $name, [mixed $value = null], [boolean $setValueIfNotIsSet = false])
RaxanWebPage delegate (string $selector, string $type, [mixed $data = null], [mixed $fn = null])
void download (string $content, [string $fileName = null], [string $contentType = null])
void dump (string $content, [string $contentType = 'text/html'])
RaxanElement find ( $css, [ $context = null])
RaxanElement findByXPath ( $pth, [ $context = null])
RaxanWebPage flashmsg ([string $msg = null], [string $effect = null], [string $class = null], [string $id = null], [ $expose = null])
DOMDocument flyDOM ()
DOMElement getElementById ( $id)
mixed &getStateData ([ $type = 'local'])
string getView (string $view, [string $selector = null], [mixed $data = null])
void halt ([ $msg = null])
RaxanWebPage handleScripts ([ $includeEvents = true], [ $returnActionScripts = false])
RaxanWebPage hideElementFromClient (DOMElement $elm, boolen $state)
RaxanWebPage loadCSS (string $css, [boolean $extrn = false])
mixed loadPlugin (string $name, [boolean $extrn = false], [string $alias = null])
RaxanWebPage loadScript (string $js, [boolean $extrn = false], [ $_priority = 0])
RaxanWebPage loadTheme (string $name, [boolean $extrn = false])
boolean loadWidget (string $name, [boolean $extrn = false])
string nodeContent ( $n, [boolean $outer = false])
Boolean offsetExists ( $selector)
RaxanElement offsetGet ( $selector)
RaxanElement offsetSet ( $selector,  $html)
RaxanWebPage offsetUnset ( $selector)
RaxanWebPage prepend ( $html)
void redirectTo (string $url, [ $forceAjax = true], boolean $ajaxEnabled)
void redirectToView (string $view, [string $url = null], [ $forceAjax = true], boolean $ajaxEnabled)
RaxanWebPage registerConduit (string $name, mixed $fn)
RaxanWebPage registerEvent ( $type, [ $data = null], [ $fn = null])
RaxanWebPage registerVar (string $name, mixed $value)
RaxanWebPage removeData ([ $name = null])
RaxanWebPage removeElementState ( $elm, string $id, [string $mode = 'local'])
string render ([string $type = 'html'])
RaxanWebPage reply ([string $responseType = null])
RaxanWebPage restoreElementState ( $elm, string $id, string $mode)
RaxanDataSanitizer sanitizePostBack ([ $incGETRequest = false])
RaxanWebPage saveElementState ( $elm, string $id, [string $mode = 'local'], boolean $reset)
void sendError ( $msg, [ $code = null])
RaxanWebPage source ([ $src = null], [ $srcType = 'html'])
RaxanWebPage storeName ([ $n = null])
RaxanWebPage title ([ $str = null])
void transferTo (string $file, [string $autoStartClass = null])
RaxanWebPage triggerEvent ( &$elms, string $type, [mixed $args = null], [object $eObject = null], array $elms)
Boolean triggerHandle (array $hnd, RaxanWebPageEvent $e, [mixed $args = null], [boolean $conduit = null])
RaxanWebPage unbindElements ( &$elms,  $type,  $selector)
RaxanWebPage updateClient ($selector $selector, $mode $mode, mixed $content)
RaxanElment wrapElement (DOMElement $elm, [ $ui = null])
void _authorize ()
void _config ()
void _destroy ()
void _indexView ()
void _init ()
void _load ()
void _postrender ()
void _prerender ()
void _reply ()
void _reset ()
void __call ( $name,  $args)
RaxanElement __get ( $name, string $id)
Variables
static mixed $actions = array() (line 80)
  • access: public
static mixed $autoId (line 98)
  • access: protected
static mixed $autoIdPrefix = 'e0x' (line 97)
  • access: protected
static mixed $badIdChars = array('\\','"',"\r","\n","\x00","\x1a",'@',':','/',' ') (line 81)
  • access: public
static mixed $cliExtLoaded = false (line 101)
  • access: protected
static mixed $customMethods (line 104)
  • access: protected
static mixed $customProps (line 105)
  • access: protected
static mixed $eventId = 1 (line 100)
  • access: protected
static mixed $mPageId = null (line 102)
  • access: protected
static mixed $pages = array() (line 103)
  • access: protected
static mixed $regScripts = array() (line 106)
  • access: protected
static mixed $vars = array() (line 78)
  • access: public
static mixed $varsGlobal = array() (line 79)
  • access: public
mixed $activeView (line 124)
  • access: protected
mixed $autoAppendView (line 108)
  • access: protected
mixed $clientPostbackUrl (line 84)
  • access: public
mixed $defaultBindOptions = array() (line 94)
  • access: public
mixed $degradable (line 116)
  • access: protected
mixed $disableInlineEvents (line 113)
  • access: protected
mixed $doc = null (line 122)
  • access: protected
mixed $embedOptions (line 86)
  • access: public
mixed $initStartupScript (line 110)
  • access: protected
mixed $isAjaxRequest = false (line 87)
  • access: public
mixed $isAuthorized = false (line 89)
  • access: public
mixed $isCache = false (line 90)
  • access: public
mixed $isCallback = false (line 88)
  • access: public
mixed $isDataStorageLoaded = false (line 90)
  • access: public
mixed $isEmbedded = false (line 86)
  • access: public
mixed $isInitialized = false (line 85)
  • access: public
mixed $isLoaded = false (line 85)
  • access: public
mixed $isPostBack = false (line 87)
  • access: public
mixed $isRendering = false (line 92)
  • access: public
mixed $isReplying = false (line 92)
  • access: public
mixed $isThemeLoaded = false (line 91)
  • access: public
mixed $localizeOnResponse (line 109)
  • access: protected
mixed $masterContentBlock = '.master-content' (line 119)
  • access: protected
mixed $masterTemplate (line 118)
  • access: protected
mixed $pageOutput (line 123)
  • access: protected
mixed $preserveFormContent (line 112)
  • access: protected
mixed $preventBrowserCache (line 117)
  • access: protected
mixed $Raxan (line 83)
  • access: public
mixed $resetDataOnFirstLoad (line 111)
  • access: protected
mixed $responseType = 'html' (line 93)
  • access: public
mixed $serializeOnPostBack (line 115)
  • access: protected
mixed $showRenderTime (line 114)
  • access: protected
mixed $_charset (line 126)
  • access: protected
mixed $_clientElms (line 131)
  • access: protected
mixed $_contentType (line 126)
  • access: protected
mixed $_dataReset = false (line 132)
  • access: protected
mixed $_dataStore (line 132)
  • access: protected
mixed $_eCache = array() (line 129)
  • access: protected
mixed $_endResponse (line 125)
  • access: protected
mixed $_flyDOM (line 128)
  • access: protected
mixed $_get (line 127)
  • access: protected
mixed $_hasRegisteredEvents (line 136)
  • access: protected
mixed $_headers (line 126)
  • access: protected
mixed $_hiddenElms (line 135)
  • access: protected
mixed $_post (line 127)
  • access: protected
mixed $_postRqst (line 127)
  • access: protected
mixed $_preserveElms (line 134)
  • access: protected
mixed $_scripts = array() (line 128)
  • access: protected
mixed $_startTime (line 125)
  • access: protected
mixed $_storeName (line 127)
  • access: protected
mixed $_tmpStateData (line 133)
  • access: protected
mixed $_uiElms (line 130)
  • access: protected

Inherited Variables

Inherited from RaxanBase

RaxanBase::$events
RaxanBase::$mObjId
RaxanBase::$objId
Methods
static addMethod (line 2123)

Adds a custom method to the RaxanWebPage Class. Use addMethod($object) to add multiple methods from an object

  • access: public
static void addMethod ( $name, [ $callback = null])
  • $name
  • $callback
static addProperty (line 2139)

Adds a custom property to the RaxanWebPage Class.

  • access: public
static void addProperty ( $name, [ $value = null])
  • $name
  • $value
static controller (line 2163)

Returns web page controller object based on the pageId.

  • access: public
static RaxanWebPage controller ([ $pageId = null])
  • $pageId
static createDOM (line 2147)

Creates and return a DOMDocument

  • access: public
static RaxanDOMDocument createDOM ( $html, [ $charset = 'UTF-8'], [ $type = null])
  • $html
  • $charset
  • $type
static init (line 2178)

Creates and returns an instance of the web page class

  • access: public
static RaxanWebPage init ( $pageClass)
  • $pageClass
static loadClientExtension (line 2191)

Loads the RaxanClientExtension class

  • access: public
static void loadClientExtension ()
static nodeL10n (line 2200)

Localize nodes

  • access: public
static void nodeL10n ( $nodes)
  • $nodes
static pageCode (line 2221)

Returns blank html page template

  • access: protected
static string pageCode ([ $type = 'html'], [ $charset = 'UTF-8'], [ $content = ''])
  • $type
  • $charset
  • $content
static registerCSS (line 1318)

Registers a CSS stylesheet file by name Use the loadCSS() method to load the stylesheet by name.

  • access: public
static void registerCSS (string $name, string $src, [array $dependencies = null])
  • string $name: - Name of script
  • string $src: - Url for the stylesheer. Set to True if the stylesheet was loaded manually.
  • array $dependencies
static registerScript (line 1330)

Registers a javascript file by name Use the loadScript() method to load the script by name.

  • access: public
static void registerScript (string $name, string $src, [array $dependencies = null])
  • string $name: - Name of script
  • string $src: - Url for the script. Set to True if the script was loaded manually.
  • array $dependencies
static uniqueElmId (line 2235)

Returns a unique id for an elment

  • access: public
static String uniqueElmId ([ $prefix = null])
  • $prefix
Constructor __construct (line 152)
  • access: public
RaxanWebPage __construct ([ $xhtml = ''], [ $charset = null], [ $type = null])
  • $xhtml
  • $charset
  • $type

Redefinition of:
RaxanBase::__construct()
Destructor __destruct (line 304)
  • access: public
void __destruct ()
addCSS (line 356)

Adds a block of CSS to the webpage

  • access: public
RaxanWebPage addCSS (string $style)
  • string $style
addHeader (line 345)

Adds an HTTP header to the page

  • access: public
RaxanWebPage addHeader ( $hdr)
  • $hdr
addScript (line 367)

Adds a block of Javascript to the webpage

  • access: public
RaxanWebPage addScript (string $script, [string $startupEvent = null])
  • string $script
  • string $startupEvent: Set to either ready, load or unload
append (line 383)

Appends the specified content to the page master content block element

  • access: public
RaxanWebPage append (string $html)
  • string $html: HTML content to append to page body
appendView (line 396)

Appends an html view to the page master content block element

  • access: public
RaxanWebPage appendView (string $view, [string $selector = null], [mixed $data = null])
  • string $view: Name of file found inside the views folder. Example: "content.php" or "sidebar.html"
  • string $selector: Optional CSS selector. Used to filter the contebt of the view
  • mixed $data: Optional. Data to be used by dynamic views (.php files)
bind (line 409)

Binds an event to the page body element

  • access: public
RaxanWebPage bind ( $type, [ $data = null], [ $fn = null])
  • $type
  • $data
  • $fn

Redefinition of:
RaxanBase::bind()
Bind the selected event to a callback function
bindElements (line 431)

Binds an array of elements to a client-side event - used by RaxanElement

  • access: public
RaxanWebPage bindElements ( &$elms,  $type,  $data, [ $fn = null], [ $selector = ''], [ $delegate = false])
  • &$elms
  • $type
  • $data
  • $fn
  • $selector
  • $delegate
buildActionScripts (line 1876)

Returns string containing action scripts and client-side event bindings

  • access: protected
String buildActionScripts ([ $includeEvents = true])
  • $includeEvents
callScriptFn (line 610)

Execute a JavaScript function on th client

  • access: public
  • example: example not found
RaxanWebPage callScriptFn (string $name, [mixed $param = null])
  • string $name: Name of JavaScript function
  • mixed $param: Parameter to be passed to function
client (line 626)

Returns an instance of the RaxanClientExtension class

  • access: public
RaxanClientExtension client ([ $selector = null], [ $context = null])
  • $selector
  • $context
content (line 635)

Returns or sets the main (body or card) content for an HTML or WML document

  • return: Returns RaxanWebPage or HTML (string) content of the web page
  • access: public
RaxanWebPage content ([ $html = null])
  • $html
contentDisposition (line 705)

Makes the page content downloadable

  • access: public
RaxanWebPage contentDisposition ( $fileName, [ $transEncode = null], [ $fileSize = null])
  • $fileName
  • $transEncode
  • $fileSize
contentType (line 695)

Set page content type. e.g. text/html

  • access: public
RaxanWebPage contentType ( $type, [ $charset = null])
  • $type
  • $charset
createElement (line 645)

Creates and returns a DOMElement

  • access: public
DOMElement createElement ( $name, [ $value = null], [ $attribs = null])
  • $name
  • $value
  • $attribs
createFragment (line 656)

Create and return a DOM fragment node

  • access: public
DOMDocumentFragment createFragment (string $html)
  • string $html
data (line 718)

Get and/or set a named data value for the current page. The data will be preserved during post back requests.

  • access: public
Mixed &data (string $name, [mixed $value = null], [boolean $setValueIfNotIsSet = false])
  • string $name
  • mixed $value
  • boolean $setValueIfNotIsSet
dataStorage (line 745)

Returns or sets the page data storage handler

  • access: public
RaxanDataStorage dataStorage ([RaxanDataStorage $store = null])
delegate (line 422)

Binds an event to the selector of the page body element using event delegation

  • access: public
RaxanWebPage delegate (string $selector, string $type, [mixed $data = null], [mixed $fn = null])
  • string $selector: CSS selector
  • string $type: Event type. Example click
  • mixed $data: Optional. Event data to be passed to the callback function
  • mixed $fn: Callback function
document (line 758)

Returns RaxanDOMDocument instance

  • access: public
RaxanDOMDocument document ()
download (line 768)

Downloads the content to the browser and stop page execution

  • access: public
void download (string $content, [string $fileName = null], [string $contentType = null])
  • string $content
  • string $fileName: Optional File name
  • string $contentType: Optional content type. If not set the sytem will auto detect content-type based on extension otherwise application/octet-stream is used
dump (line 797)

Dumps the content directly to the browser and stop page execution

  • access: public
void dump (string $content, [string $contentType = 'text/html'])
  • string $content
  • string $contentType: Defaults to text/html
endResponse (line 807)

Ends page event execution and send content to the client. No further events will be processed

  • access: public
RaxanWebPage endResponse ()
find (line 816)

Search the page for matched elements

  • access: public
RaxanElement find ( $css, [ $context = null])
  • $css
  • $context
findById (line 825)

Find and returns a RaxanElement by Id

  • access: public
RaxanElement findById ( $id)
  • $id
findByXPath (line 845)

Find and return matched elements based on specified xpath

  • access: public
RaxanElement findByXPath ( $pth, [ $context = null])
  • $pth
  • DOMNode $context
flashmsg (line 861)

Flash a message unto the page. Message will be displayed inside an element with the "flashmsg" class To allow the user to close the message, add a clickable element with a "close" class inside the message.

Here's an example using a close button: <span>Record successfully saved. <a class="close" href="#">Ok</a></span>

  • return: Returns an array or instance of RaxanWebPage
  • access: public
RaxanWebPage flashmsg ([string $msg = null], [string $effect = null], [string $class = null], [string $id = null], [ $expose = null])
  • string $msg: Message to be displayed
  • string $effect: Optional jQuery UI effect
  • string $class: Optional CSS class name to added to the message
  • string $id: Optional. DOM element id where the message is to be displayed
  • $expose
flyDOM (line 877)

Returns a copy of a reuseable DOM

  • access: public
DOMDocument flyDOM ()
getElementById (line 890)

Returns a DOMElement based on the Id value

  • access: public
DOMElement getElementById ( $id)
  • $id
getStateData (line 2051)

Returns state data

  • access: protected
mixed &getStateData ([ $type = 'local'])
  • $type
getView (line 910)

Returns the content of a view file from within the views folder

  • access: public
string getView (string $view, [string $selector = null], [mixed $data = null])
  • string $view: Name of file found inside the views folder. Example: "content.php" or "sidebar.html"
  • string $selector: Optional CSS selector. Used to filter the content of the view
  • mixed $data: Optional. Data input to be used by dynamic views (.php files)
halt (line 1126)

Halt and exit page processing while displaying a message

  • access: public
void halt ([ $msg = null])
  • $msg
handleClientEventRequest (line 929)

Handle client Postback/Callback events

  • access: protected
RaxanWebPage handleClientEventRequest ( &$eventResult)
  • &$eventResult
handleClientUpdates (line 978)

Handle automatic client-side updates via the CLX

  • access: public
void handleClientUpdates ()
handleDebugResponse (line 1020)

Send debugging information to client

  • access: protected
RaxanWebPage handleDebugResponse ()
handleNodeL10n (line 1009)

Localize nodes with the langid attribute set to a valid lcoale key/value pair

  • access: protected
RaxanWebPage handleNodeL10n ()
handleScripts (line 1041)

Inserts JavaScript into the html document

  • access: protected
RaxanWebPage handleScripts ([ $includeEvents = true], [ $returnActionScripts = false])
  • $includeEvents
  • $returnActionScripts
hideElementFromClient (line 1574)

Used internally to hide element from client's browser

  • access: public
RaxanWebPage hideElementFromClient (DOMElement $elm, boolen $state)
  • DOMElement $elm
  • boolen $state
initDataStorage (line 1937)

Initialize page data storage handler

  • access: protected
RaxanWebPage initDataStorage ()
initInlineEvents (line 1949)

Initialize inline events and bind event handlers on the current page

  • access: protected
RaxanWebPage initInlineEvents ()
initPreservedElements (line 2010)

Initialize preserved elements with xt-preservestate attribute

  • access: protected
RaxanWebPage initPreservedElements ()
initUIWidgets (line 2029)

Initialize inline UI widgets

  • access: protected
RaxanWebPage initUIWidgets ()
loadCSS (line 1136)

Load CSS stylesheet

  • access: public
RaxanWebPage loadCSS (string $css, [boolean $extrn = false])
  • string $css: The name of css file to be loaded or inline <style> tag to be embedded inside the document
  • boolean $extrn: Set to true if stylesheet will be loaded from a folder that's not relative to ui/css
loadPlugin (line 1164)

Loads a plugin from the plugins folder.

Usage: <p>Raxan::loadPlugin($name,$alias)</p> <p>Raxan::loadPlugin($name,$extrn,$alias)</p>

  • return: Returns an instance of the plugin
  • access: public
mixed loadPlugin (string $name, [boolean $extrn = false], [string $alias = null])
  • string $name: Name of plugin file without the .php extension
  • boolean $extrn: Set to true if plugin will be loaded from a folder that's not relative to {plugins.path}
  • string $alias: Page propery instance name
loadScript (line 1177)

Load Javascript library

  • access: public
RaxanWebPage loadScript (string $js, [boolean $extrn = false], [ $_priority = 0])
  • string $js: The name of script file to be loaded or inline <script> tag to be embedded inside the document
  • boolean $extrn: Set to true if JavaScript library file will be loaded from a folder that's not relative to ui/javascripts
  • $_priority
loadTheme (line 1205)

Loads a CSS theme for the current page

  • access: public
RaxanWebPage loadTheme (string $name, [boolean $extrn = false])
  • string $name: The name of theme (folder) to be loaded
  • boolean $extrn: Set to true if theme will be loaded from a folder that's not relative to {raxan.url}/ui/css
loadUIWidgets (line 2071)

Used internally to load regsitered UI Widgets

  • access: protected
RaxanWebPage loadUIWidgets ()
loadWidget (line 1219)

Loads a widget from the widgets folder

  • see: Raxan::loadWidtget()
  • access: public
boolean loadWidget (string $name, [boolean $extrn = false])
  • string $name: Name of widget file without the .php extension
  • boolean $extrn: Set to true if theme will be loaded from a folder that's not relative to {widgets.path}
masterContentSelector (line 2061)

Returns the selector for the master content block

  • access: protected
string masterContentSelector ()
nodeContent (line 1229)

Returns the html content of an elment

  • access: public
string nodeContent ( $n, [boolean $outer = false])
  • DOMElement $n
  • boolean $outer
offsetExists (line 1849)

Check is element exists for the specified selector

  • access: public
Boolean offsetExists ( $selector)
  • $selector

Implementation of:
ArrayAccess::offsetExists
offsetGet (line 1859)

Return selectd elements

  • access: public
RaxanElement offsetGet ( $selector)
  • $selector

Implementation of:
ArrayAccess::offsetGet
offsetSet (line 1854)

Sets HTML for selected elements

  • access: public
RaxanElement offsetSet ( $selector,  $html)
  • $selector
  • $html

Implementation of:
ArrayAccess::offsetSet
offsetUnset (line 1864)

Remove selectd elements

  • access: public
RaxanWebPage offsetUnset ( $selector)
  • $selector

Implementation of:
ArrayAccess::offsetUnset
prepend (line 1244)

Prepends the specified html content to the page master content block element

  • access: public
RaxanWebPage prepend ( $html)
  • $html
redirectTo (line 1255)

Redirect client to the specified url

  • access: public
void redirectTo (string $url, [ $forceAjax = true], boolean $ajaxEnabled)
  • string $url
  • boolean $ajaxEnabled: Optional. Force page redirection during an Ajax request
  • $forceAjax
redirectToView (line 1266)

Redirect to new page view

  • access: public
void redirectToView (string $view, [string $url = null], [ $forceAjax = true], boolean $ajaxEnabled)
  • string $view: View mode
  • string $url: Optional page url
  • boolean $ajaxEnabled: Optional. Force page redirection during an Ajax request
  • $forceAjax
registerConduit (line 1277)

Registers a data conduit

  • access: protected
RaxanWebPage registerConduit (string $name, mixed $fn)
  • string $name: Name of conduit
  • mixed $fn: Conduit callback handler. Parameters passed to callback handler: $offset,$limit,$params,$rowcount
registerEvent (line 1287)

Registers an event to be triggered from the client using page as the target id

Client-side Example: Raxan.dispatchEvent('customevent',function(result,state){ some code here });

  • access: public
RaxanWebPage registerEvent ( $type, [ $data = null], [ $fn = null])
  • $type
  • $data
  • $fn
registerUIWidget (line 1304)

Used internally to register a UI widget with the current web page.

  • access: public
RaxanWebPage registerUIWidget (RaxanUIWidget $ui)
registerVar (line 1343)

Registers a value or variable to be accessed from the client-side Raxan JavaScript library Use registerVar() to send PHP arrays, objects and other datatypes to the client.

To retrieve the value from JavaScript use Raxan.getVar('name');

  • access: public
RaxanWebPage registerVar (string $name, mixed $value)
  • string $name
  • mixed $value
removeData (line 1562)

Remove Page data

  • access: public
RaxanWebPage removeData ([ $name = null])
  • $name
removeElementState (line 1588)

Used internally - Remove element state

  • access: public
RaxanWebPage removeElementState ( $elm, string $id, [string $mode = 'local'])
  • DOMElement $elm
  • string $id
  • string $mode
render (line 1355)

Render and return html content

  • access: public
string render ([string $type = 'html'])
  • string $type: Accepted values: html, xml
renderUIWidgets (line 2081)

Used internally to render regsitered UI Elements

  • access: protected
RaxanWebPage renderUIWidgets ()
reply (line 1488)

Sends data to client

  • access: public
RaxanWebPage reply ([string $responseType = null])
  • string $responseType: Accepted values: html, xhtml, xhtml/html, xml, wml
restoreElementState (line 1603)

Restore element state. Used internally

  • access: public
RaxanWebPage restoreElementState ( $elm, string $id, string $mode)
  • DOMElement $elm
  • string $id
  • string $mode
sanitizePostBack (line 1657)

Returns data sanitizer object with get and/or post values. Defaults to post values

  • see: RaxanWebPage->post and RaxanWebPage->get
  • deprecated: deprecated since 1.0 rc1. Use post and get properties
  • access: public
RaxanDataSanitizer sanitizePostBack ([ $incGETRequest = false])
  • $incGETRequest
saveElementState (line 1633)

Save element state. Used internally

  • access: public
RaxanWebPage saveElementState ( $elm, string $id, [string $mode = 'local'], boolean $reset)
  • DOMElement $elm
  • string $id
  • string $mode
  • boolean $reset: Set to true to reset state data
sendError (line 1668)

Sends an error page or message to the web browser and stop page processing.

  • access: public
void sendError ( $msg, [ $code = null])
  • $msg
  • $code
source (line 1676)

Set or returns the page html/xml source. Source can be a file, url or <html> tags

  • return: or String
  • access: public
RaxanWebPage source ([ $src = null], [ $srcType = 'html'])
  • $src
  • $srcType
storeName (line 1716)

Set or returns the data store name for the page

  • return: or String
  • access: public
RaxanWebPage storeName ([ $n = null])
  • $n
title (line 1771)

Returns or sets the title for an HTML page

  • return: or String
  • access: public
RaxanWebPage title ([ $str = null])
  • $str
transferTo (line 1727)

Transfer page control to the specified php file

  • access: public
void transferTo (string $file, [string $autoStartClass = null])
  • string $file: Physical path and file name of the page to be loaded
  • string $autoStartClass: Name of page class to be initialized
triggerEvent (line 1748)

Trigger events on the specified elements - used by RaxanElement

  • access: public
RaxanWebPage triggerEvent ( &$elms, string $type, [mixed $args = null], [object $eObject = null], array $elms)
  • array $elms: Array or DOMElements
  • string $type: Event Type. Use the @local suffix to only trigger local events
  • mixed $args: Optional arugments to to be passed to event handlers
  • object $eObject: Original event object to passed to handlers
  • &$elms
triggerHandle (line 2095)

Used internaly to triggers event/conduit callback handler

  • return: - Returns true if not $e->isStopPropagation
  • access: protected
Boolean triggerHandle (array $hnd, RaxanWebPageEvent $e, [mixed $args = null], [boolean $conduit = null])
  • array $hnd
  • RaxanWebPageEvent $e
  • mixed $args: Event arguments
  • boolean $conduit: Set to true to trigger conduit callback
unbindElements (line 1809)

Remove event handlers from elements - used by RaxanElement

  • access: public
RaxanWebPage unbindElements ( &$elms,  $type,  $selector)
  • &$elms
  • $type
  • $selector
updateClient (line 1787)

Update or replace client elements with the content or elements specified

RaxanWebPage updateClient ($selector $selector, $mode $mode, mixed $content)
  • mixed $content: String, Array of DOMElements or a single DOMelement
  • $selector $selector: String client-side css selector
  • $mode $mode: String Used internally. possible values 'insert (default), replace, append, prepend, before, after'
updateFormFields (line 1796)

Update form fields with postback values

  • access: public
RaxanWebPage updateFormFields ()
wrapElement (line 1832)

Creates and returns a new RaxanElement from the specified DOM element

  • access: public
RaxanElment wrapElement (DOMElement $elm, [ $ui = null])
  • DOMElement $elm
  • $ui
_authorize (line 141)
  • access: protected
void _authorize ()
_config (line 139)
  • access: protected
void _config ()
_destroy (line 147)
  • access: protected
void _destroy ()
_indexView (line 142)
  • access: protected
void _indexView ()
_init (line 140)
  • access: protected
void _init ()
_load (line 143)
  • access: protected
void _load ()
_postrender (line 145)
  • access: protected
void _postrender ()
_prerender (line 144)
  • access: protected
void _prerender ()
_reply (line 146)
  • access: protected
void _reply ()
_reset (line 150)
  • access: protected
void _reset ()
__call (line 316)
  • access: public
void __call ( $name,  $args)
  • $name
  • $args
__get (line 330)

Returns a matched element by id using the variable name

  • access: public
RaxanElement __get ( $name, string $id)
  • string $id
  • $name

Inherited Methods

Inherited From RaxanBase

RaxanBase::__construct()
RaxanBase::bind()
RaxanBase::log()
RaxanBase::objectId()
RaxanBase::trigger()
RaxanBase::unbind()