Table of Contents Previous Next
Logo
Client-Side Slice-to-PHP Mapping : 28.3 Mapping for Identifiers
Copyright © 2003-2010 ZeroC, Inc.

28.3 Mapping for Identifiers

Slice identifiers map to an identical PHP identifier. For example, the Slice identi­fier Clock becomes the PHP identifier Clock. There is one exception to this rule: if a Slice identifier is the same as a PHP keyword or is an identifier reserved by the Ice run time (such as checkedCast), the corresponding PHP identifier is prefixed with an underscore. For example, the Slice identifier while is mapped as _while.1
A single Slice identifier often results in several PHP identifiers. For example, for a Slice interface named Foo, the generated PHP code uses the identifiers Foo and FooPrx (among others). If the interface has the name while, the generated identifiers are _while and whilePrx (not _whilePrx), that is, the under­score prefix is applied only to those generated identifiers that actually require it.

1
As suggested in Section 4.5.3 on page 92, you should try to avoid such identifiers as much as possible.


Table of Contents Previous Next
Logo