Class NAJAX_Utilities

Description

NAJAX Utilities Class.

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

  • version: 0.4.1.0
  • author: Stanimir Angeloff

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

NAJAX_Observable
   |
   --NAJAX_Utilities
Method Summary
string addObserver (mixed &$observer)
string caseConvert (string $text)
string eventsHeader ([string $callbackUrl = null])
bool extensionHeader (string $extension, string $fileName, [string $optimizedFileName = null])
float getMicroTime ()
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 311)

Adds a NAJAX_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 NAJAX_Observer).

Redefinition of:
NAJAX_Observable::addObserver()
caseConvert (line 294)

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.
eventsHeader (line 223)

Registers NACLES header data.

You should call this method after NAJAX_Utilities::header.

NACLES header data includes server time and callback URL.

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

Registers NAJAX 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 NAJAX 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 ()
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 179)

Registers NAJAX client header files.

  • return: HTML code to include NAJAX client files.
  • static:
  • access: public
string header ([string $base = '.'], [bool $optimized = true])
  • string $base: Base NAJAX 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 323)
  • access: private
bool notifyObservers ([mixed $event = 'default'], [mixed $arg = null])

Redefinition of:
NAJAX_Observable::notifyObservers()

Inherited Methods

Inherited From NAJAX_Observable

NAJAX_Observable::addObserver()
NAJAX_Observable::notifyObservers()

Documentation generated on Tue, 20 Sep 2005 21:40:43 +0300 by phpDocumentor 1.3.0RC3