OrbitEnum

(no version information, might be only in CVS)

OrbitEnum -- Use CORBA enums

說明

new OrbitEnum ( string id )

警示

本函數是實驗性的。本函數的行為,內含函數名稱以及其它任何關於本函數的文件可能會在沒有知會的情況下隨 PHP 以後的發佈而改變。使用本函數風險自擔。

This class represents the enumeration identified with the id parameter.

參數

id

Can be either the name of the enumeration (e.g "MyEnum"), or the full repository id (e.g. "IDL:MyEnum:1.0").

範例

例子 1. Sample IDL file

enum MyEnum {
    a,b,c,d,e
};

例子 2. PHP code for accessing MyEnum

<?php
$enum 
= new OrbitEnum ("MyEnum");

echo 
$enum->a;    /* write 0 */
echo $enum->c;    /* write 2 */
echo $enum->e;    /* write 4 */
?>