mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-30 15:58:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@196113 c90b9560-bf6c-de11-be94-00142212c4b1
106 lines
2.3 KiB
XML
106 lines
2.3 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.1 $ -->
|
|
<!-- splitted from ./en/functions/satellite.xml, last change in rev 1.2 -->
|
|
<refentry id="function.orbitstruct">
|
|
<refnamediv>
|
|
<refname>OrbitStruct</refname>
|
|
<refpurpose>Use CORBA structs</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>new</type><methodname>OrbitStruct</methodname>
|
|
<methodparam><type>string</type><parameter>id</parameter></methodparam>
|
|
</methodsynopsis>
|
|
&warn.experimental.func;
|
|
<para>
|
|
This class represents the structure identified with the
|
|
<parameter>id</parameter> parameter.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>id</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Can be either the name of the struct (e.g "MyStruct"), or the full
|
|
repository id (e.g. "IDL:MyStruct:1.0").
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Sample IDL file</title>
|
|
<programlisting role="txt">
|
|
<![CDATA[
|
|
struct MyStruct {
|
|
short shortvalue;
|
|
string stringvalue;
|
|
};
|
|
|
|
interface SomeInterface {
|
|
void SetValues (MyStruct values);
|
|
MyStruct GetValues();
|
|
}
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>PHP code for accessing MyStruct</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?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;
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|
|
|