Table of Contents Previous Next
Logo
Client-Side Slice-to-PHP Mapping : 28.5 The Ice Module
Copyright © 2003-2010 ZeroC, Inc.

28.5 The Ice Module

All of the APIs for the Ice run time are nested in the Ice module, to avoid clashes with definitions for other libraries or applications. Some of the contents of the Ice module are generated from Slice definitions; other parts of the Ice module provide special-purpose definitions that do not have a corresponding Slice defini­tion. We will incrementally cover the contents of the Ice module throughout the remainder of the book.
A PHP application can load the Ice run time using the require statement:
require 'Ice.php';
If the statement executes without error, the Ice run time is loaded and available for use. You can determine the version of the Ice run time you have just loaded by calling the stringVersion function:
$icever = Ice_stringVersion();
Using the namespace mapping, you can refer to a global Ice function such as stringVersion either by its flattened name (as shown above) or by its namespace equivalent:
$icever = \Ice\stringVersion();

Table of Contents Previous Next
Logo