OrbitStruct
(no version information, might be only in CVS)
OrbitStruct -- Use CORBA structs
说明
new
OrbitStruct ( string id )
警告 |
本函数是实验性的。本函数的行为,包括函数名称以及其它任何关于本函数的文档可能会在没有通知的情况下随
PHP 以后的发布而改变。使用本函数风险自担。 |
This class represents the structure identified with the
id
parameter.
参数
id
Can be either the name of the struct (e.g "MyStruct"), or the full
repository id (e.g. "IDL:MyStruct:1.0").
范例
例 1. Sample IDL file struct MyStruct {
short shortvalue;
string stringvalue;
};
interface SomeInterface {
void SetValues (MyStruct values);
MyStruct GetValues();
} |
|
例 2. PHP code for accessing MyStruct
<?php $obj = new OrbitObject ($ior);
$initial_values = new OrbitStruct ("IDL:MyStruct:1.0"); $initial_values->shortvalue = 42; $initial_values->stringvalue = "HGTTG";
$obj->SetValues ($initial_values);
$values = $obj->GetValues();
echo $values->shortvalue; echo $values->stringvalue; ?>
|
|