- Developper API  2.0.5
developerApi_2.0.5/Utils.php File Reference

Go to the source code of this file.

Functions

 startsWith ($str, $needle)
 Check whether the string starts with the needle pattern.
 endsWith ($haystack, $needle)
 Check whether the string ends with the needle pattern.
 array_copy ($aSource)
 Copy an array and return the copy.
 debug ($message)
 Print debug message if debug is enable (cf. Config.php)
 info ($message)
 Print info message if info is enable (cf. Config.php)
 error ($message)
 Print error message if error is enable (cf. Config.php)
 test ($title, $message)
 Print test message if test is enable (cf. Config.php)
 opentest ($title)
 Open a test tag if test is enable (cf. Config.php) WARNING DO NOT FORGET TO CALL closetest.
 closetest ($title, $message)
 close a test tag if test is enable (cf. Config.php) WARNING Call it only if opentest has previously been called.
 hasChildren ($SXMLElement)
 Check if SimpleXMLElement has children.
 getSXMLElementWithNameSpace ($rootnode, $namespace, $recursively)
 Search and returns all SimpleXMLElement sharing a namespace from the root node.

Function Documentation

array_copy ( aSource)

Copy an array and return the copy.

Parameters:
Arraysource
Returns:
Array

Definition at line 42 of file Utils.php.

closetest ( title,
message 
)

close a test tag if test is enable (cf. Config.php) WARNING Call it only if opentest has previously been called.

Definition at line 185 of file Utils.php.

debug ( message)

Print debug message if debug is enable (cf. Config.php)

Definition at line 77 of file Utils.php.

endsWith ( haystack,
needle 
)

Check whether the string ends with the needle pattern.

Parameters:
Stringstr
StringneedlePattern
Returns:
Boolean

Definition at line 30 of file Utils.php.

error ( message)

Print error message if error is enable (cf. Config.php)

Definition at line 121 of file Utils.php.

getSXMLElementWithNameSpace ( rootnode,
namespace,
recursively 
)

Search and returns all SimpleXMLElement sharing a namespace from the root node.

Parameters:
SimpleXMLElementrootnode: is the root where the namespace will be searched from.
Stringnamespace : is the searched namespace.
Boolean: whether to search recursively or not.
Returns:
SimpleXMLElement[]

Definition at line 218 of file Utils.php.

hasChildren ( SXMLElement)

Check if SimpleXMLElement has children.

Returns:
Boolean

Definition at line 201 of file Utils.php.

info ( message)

Print info message if info is enable (cf. Config.php)

Definition at line 99 of file Utils.php.

opentest ( title)

Open a test tag if test is enable (cf. Config.php) WARNING DO NOT FORGET TO CALL closetest.

Definition at line 165 of file Utils.php.

startsWith ( str,
needle 
)

Check whether the string starts with the needle pattern.

Parameters:
Stringstr
StringneedlePattern
Returns:
Boolean

Definition at line 18 of file Utils.php.

test ( title,
message 
)

Print test message if test is enable (cf. Config.php)

Definition at line 143 of file Utils.php.