Documentation
Sushee_shell object
usage
$shell = new Sushee_shell( [boolean include_navigation] );
paramètres
include_navigation : whether to include the results of the execution of navigation.xml
PHP Object allowing to interact with the Sushee framework and the XML Sushee returns.
The scheme of utilization is generally the following :
- adding NQL commands using the addCommand() method
- execute the set of NQL commands using the execute() method
- output HTML using XSL and the transform() method
- OR grab information in the returned XML using getElement(), exists(), count(), etc.
exemples
include_once('../Kernel/common.php');
$shell = new Sushee_shell();
$shell->addCommand(
'<GET>
<CONTACT ID="1857"/>
</GET>'
);
$shell->execute();
$firstname = $shell->valueOf('/RESPONSE/RESULTS/CONTACT/INFO/FIRSTNAME');
echo $firstname; // prints "Boris"
enableEntities
Enables the transformation of accentuated characters to XML entities (e.g. é) to avoid encoding problems.
enableException
enables PHP Exception instead of XML messages when error occurs
setLanguage
Forces all the commands to be executed for a specific language, even if the visitor's language is different.
setUserID
Force the connection of a given user