[ Index ]

PHP Cross Reference of Mambo 4.6.5

[ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/includes/ -> core.helpers.php (summary)

(no description)

File Size: 956 lines (29 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 3 classes

mosHtmlHelper:: (20 methods):
  getInstance()
  doctypeIsMobile()
  get()
  set()
  useXmlPrologue()
  tag()
  render()
  renderDocType()
  renderXmlPrologue()
  renderTitle()
  renderMeta()
  renderMetaLink()
  renderMetaLinkRel()
  renderCharset()
  renderCss()
  renderJavascript()
  renderBase()
  loadHeadTags()
  showHead()
  showMeta()

mosUriHelper:: (27 methods):
  mosUriHelper()
  getInstance()
  setUri()
  toString()
  getUri()
  pushParam()
  get()
  popParam()
  setRawQuery()
  getQuery()
  _parseRawQuery()
  resolvePath()
  getScheme()
  setScheme()
  getUser()
  setUser()
  getPass()
  setPass()
  getHost()
  setHost()
  getPort()
  setPort()
  getPath()
  setPath()
  getAnchor()
  setAnchor()
  checkSSL()

mosCrypto:: (6 methods):
  getInstance()
  get()
  encrypt()
  decrypt()
  encryptQuery()
  decryptQuery()


Class: mosHtmlHelper  - X-Ref


getInstance()   X-Ref
Singleton accessor


doctypeIsMobile($key='')   X-Ref
Get method

param: unknown_type $var
return: unknown

get($var)   X-Ref
Get method

param: unknown_type $var
return: unknown

set($property, $value)   X-Ref
Set method - set public properties. Does not set a property that does not already exist

param: unknown_type $property - the property to set
param: unknown_type $value - the value to set the property to

useXmlPrologue($flag=null)   X-Ref
Set method - set public properties. Does not set a property that does not already exist

param: unknown_type $property - the property to set
param: unknown_type $value - the value to set the property to

tag($key, $vars=array()   X-Ref
Generic tag construction

param: string $key - should be a key in the _tags property list
param: unknown $vars - a string or array of strings
return: formatted html

render($string, $prepend=null, $postpend="\n")   X-Ref
Render output
Default is to render output wrapped by $prepend/$postpend. Default value of postpend is \n.
A case statement calls various public rendering functions

param: string $string
param: string $postpend
param: string $prepend

renderDocType($type='')   X-Ref
Render DTD

param: string $type - doctype

renderXmlPrologue($charset='', $force=false)   X-Ref
Render xml prologue

param: string $charset - the character set for the prologue
param: string $force - render prologue even if class property userXmlPrologue is false

renderTitle($title='')   X-Ref
Render title tag

param: string $title - page title

renderMeta($name='', $content='')   X-Ref
Render meta tag


renderMetaLink($href='', $title='', $extra='')   X-Ref
Render meta link href tag


renderMetaLinkRel($rel='', $href='')   X-Ref
Render meta link rel tag


renderCharset($charset='')   X-Ref
Render character set meta tag

param: string $charset - character set

renderCss($filepath='', $media='')   X-Ref
Render css link tag

param: string $path - css file path. Default is template_css.css in the current template folder

renderJavascript($link='', $code='')   X-Ref
Render Javascript tags


renderBase($url='')   X-Ref
Render base tag

param: string $url - base url

loadHeadTags()   X-Ref
Load Mambo generated head tags into an array


showHead($keys='', $exclude='')   X-Ref
Render Mambo generated head tags.

param: string $keys - a key or array of keys in the head tag array to render
param: string $exclue - a key or array of keys in the head tag array to exclude

showMeta($keys='', $exclude='')   X-Ref
Render Mambo generated meta tags.

param: string $keys - a key or array of keys in the meta tag array to render
param: string $exclue - a key or array of keys in the meta tag array to exclude

Class: mosUriHelper  - X-Ref

mosUriHelper is a single instance class used for altering and receiving the Uri
from different apps.  By default, it looks to current Uri, and provides
methods for retrieving the various parts of the given Uri.

Usage:
$Uri =& mosUriHelper::getInstance();
$Uri->setUri('http://domain.com/path/to/script.php?param1=value1');
$Uri->pushParam('foo','bar');
$Uri->popParam('param1');
print $Uri->getUri();

Outputs: http://domain.com/path/to/script.php?foo=bar

mosUriHelper()   X-Ref
Constructor set Uri on class instantiation.

param: string

getInstance()   X-Ref
Singleton accessor


setUri($uri = null)   X-Ref
Looks to _SERVER vars, and sets Uri property accordingly if Uri not passed.


toString()   X-Ref
Returns full uri string

return: string Full uri

getUri()   X-Ref
Alias for toString()


pushParam($name, $value)   X-Ref
Adds a query item

param: string $name       Name of item
param: string $value      Value of item

get($key, $default='')   X-Ref
Get a query item

param: string $key Name of item
return: mixed

popParam($name)   X-Ref
Removes a query item

param: string $name Name of item

setRawQuery($query)   X-Ref
Sets the query to literally what you supply

param: string $query The query data. Should be of the format foo=bar&x=y etc

getQuery()   X-Ref
Returns flat query

return: string Query

_parseRawQuery($query)   X-Ref
Parses raw query and returns an array of it

param: string  $query   The querystring to parse
return: array            An array of the query data

resolvePath($path)   X-Ref
Resolves //, ../ and ./ from a path and returns
the result. Eg:

/foo/bar/../boo.php    => /foo/boo.php
/foo/bar/../../boo.php => /boo.php
/foo/bar/.././/boo.php => /foo/boo.php

This method can also be called statically.

param: string $uri Uri path to resolve
return: string      The result

getScheme()   X-Ref
Get scheme - returns the scheme

return: string

setScheme($scheme)   X-Ref
Set scheme - sets the scheme (protocol)

param: string  scheme

getUser()   X-Ref
Get username - returns the username, or null if no username was specified

return: string

setUser($user)   X-Ref
Set username - sets the username

param: string  username

getPass()   X-Ref
Get password - returns the password

return: string

setPass($pass)   X-Ref
Set password - sets the password

param: string  password

getHost()   X-Ref
Get host - returns the hostname/ip, or null if no hostname/ip was specifi

return: string

setHost($host)   X-Ref
Set host - sets the hostname/ip

param: string  hostname

getPort()   X-Ref
Get port - returns the port number, or null if no port was specified

return: int

setPort($port)   X-Ref
Set port - sets the port number

param: int   port number

getPath()   X-Ref
Gets the path string

return: string

setPath($path)   X-Ref
Set path

param: string  fragment for page anchors

getAnchor()   X-Ref
Gets the archor string

return: string

setAnchor($anchor)   X-Ref
Set anchor - sets everything after the "#"

param: string  fragment for page anchors

checkSSL()   X-Ref
Checks whether the current URI is using HTTPS

return: boolean

Class: mosCrypto  - X-Ref

getInstance()   X-Ref
No description

get($property, $default=null)   X-Ref
No description

encrypt($plain_text, $key='')   X-Ref
No description

decrypt($enc_text, $key='')   X-Ref
No description

encryptQuery($query, $key='')   X-Ref
No description

decryptQuery($query, $key='')   X-Ref
No description