Class XOAD_Utilities

Description

XOAD Utilities Class.

This class defines extended functions that the XOAD package uses and overrides some deprecated functions, like gettype(...).

  • version: 0.6.0.0
  • author: Stanimir Angeloff

Located in /classes/Utilities.class.php (line 29)

XOAD_Observable
   |
   --XOAD_Utilities
Method Summary
 string addObserver (mixed &$observer)
 string caseConvert (string $text)
 bool customHeader (string $fileName, [string $optimizedFileName = null])
 string eventsHeader ([string $callbackUrl = null])
 bool extensionHeader (string $extension, string $fileName, [string $optimizedFileName = null])
 float getMicroTime ()
 string getRequestUrl ()
 string getType (mixed $var)
 string header ([string $base = '.'], [bool $optimized = true])
 bool isAssocArray (mixed $var)
 bool notifyObservers ([mixed $event = 'default'], [mixed $arg = null])
Methods
addObserver (line 406)

Adds a XOAD_Utilities events observer.

  • return: true on success, false otherwise.
  • static:
  • access: public
string addObserver (mixed &$observer)
  • mixed $observer: The observer object to add (must extend XOAD_Observer).

Redefinition of:
XOAD_Observable::addObserver()
caseConvert (line 389)

Returns the input string with all alphabetic characters converted to lower or upper case depending on the configuration.

  • return: The converted text.
  • static:
string caseConvert (string $text)
  • string $text: The text to convert to lower/upper case.
customHeader (line 347)

Registers custom client header file.

  • return: true on success, false otherwise.
  • static:
  • access: public
bool customHeader (string $fileName, [string $optimizedFileName = null])
  • string $fileName: The JavaScript file name. This file must be located in the base folder.
  • string $optimizedFileName: The optimized JavaScript file name. This file must be located in the base folder.
eventsHeader (line 254)

Registers XOAD Events header data.

You should call this method after XOAD_Utilities::header.

XOAD Events header data includes server time and callback URL.

  • return: HTML code to initialize XOAD Events.
  • static:
  • access: public
string eventsHeader ([string $callbackUrl = null])
  • string $callbackUrl: XOAD Events callback URL.
extensionHeader (line 290)

Registers XOAD extension client header file.

  • return: true on success, false otherwise.
  • static:
  • access: public
bool extensionHeader (string $extension, string $fileName, [string $optimizedFileName = null])
  • string $extension: The name of the XOAD extension.
  • string $fileName: The extension JavaScript file name. This file must be located in the extension base folder.
  • string $optimizedFileName: The optimized extension JavaScript file name. This file must be located in the extension base folder.
getMicroTime (line 158)

Return current UNIX timestamp with microseconds.

  • return: Returns the float 'sec,msec' where 'sec' is the current time measured in the number of seconds since the Unix Epoch (0:00:00 January 1, 1970 GMT), and 'msec' is the microseconds part.
  • static:
  • access: public
float getMicroTime ()
getRequestUrl (line 176)

Returns the URL for the current request (includings the query string).

  • return: Current request URL.
  • static:
  • access: public
string getRequestUrl ()
getType (line 104)

Gets the type of a variable.

  • return: Possibles values for the returned string are:
    • "bool"
    • "int"
    • "float"
    • "string"
    • "s_array"
    • "a_array"
    • "object"
    • "null"
    • "unknown"
  • static:
  • access: public
string getType (mixed $var)
  • mixed $var: The source variable.
header (line 202)

Registers XOAD client header files.

  • return: HTML code to include XOAD client files.
  • static:
  • access: public
string header ([string $base = '.'], [bool $optimized = true])
  • string $base: Base XOAD folder.
  • bool $optimized: true to include optimized headers, false otherwise.
isAssocArray (line 44)

Checks if an array is an associative array.

  • return: true if $var is an associative array, false if $var is a sequential array.
  • static:
  • access: public
bool isAssocArray (mixed $var)
  • mixed $var: The array to check.
notifyObservers (line 418)
  • access: public
bool notifyObservers ([mixed $event = 'default'], [mixed $arg = null])

Redefinition of:
XOAD_Observable::notifyObservers()

Inherited Methods

Inherited From XOAD_Observable

 XOAD_Observable::addObserver()
 XOAD_Observable::notifyObservers()

Documentation generated on Sat, 12 Nov 2005 20:24:51 +0200 by phpDocumentor 1.3.0RC3