1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282
|
<?xml version="1.0" encoding="iso-8859-2"?>
<!--
$Id: satellite.xml,v 1.8 2002/02/02 15:32:53 hholzgra Exp $
Author: David Eriksson <david@2good.com>
-->
<reference id="ref.satellite">
<title>Satellite CORBA klient extenze</title>
<titleabbrev>Satellite</titleabbrev>
<partintro>
&warn.experimental;
<para>
Satellite extenze se pouv pro pstup ke CORBA objektm. Vyaduje
idl_directory= poloku v php.ini ukazujc na cestu kde jsou vechny
pouvan IDL soubory.
</para>
</partintro>
<refentry id="class.orbitobject">
<refnamediv>
<refname>OrbitObject</refname>
<refpurpose>Zpstupnit CORBA objekty</refpurpose>
</refnamediv>
<refsect1>
<title>Popis</title>
<methodsynopsis>
<type>new</type><methodname>OrbitObject</methodname>
<methodparam><type>string</type><parameter>ior</parameter></methodparam>
</methodsynopsis>
<para>
Tato tda poskytuje pstup ke CORBA objektu. Argument
<parameter>ior</parameter> by ml bt etzec obsahujc IOR
(Interoperable Object Reference) kter identifikuje vzdlen objekt.
</para>
<para>
<example>
<title>Ukzkov IDL soubor</title>
<programlisting>
interface MyInterface {
void SetInfo (string info);
string GetInfo();
attribute int value;
}
</programlisting>
</example>
</para>
<para>
<example>
<title>PHP kd pro pstup k MyInterface</title>
<programlisting role="php">
<?php
$obj = new OrbitObject ($ior);
$obj->SetInfo ("A 2GooD object");
echo $obj->GetInfo();
$obj->value = 42;
echo $obj->value;
?>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<refentry id="class.orbitenum">
<refnamediv>
<refname>OrbitEnum</refname>
<refpurpose>Pout CORBA enumerace</refpurpose>
</refnamediv>
<refsect1>
<title>Popis</title>
<methodsynopsis>
<type>new</type><methodname>OrbitEnum</methodname>
<methodparam><type>string</type><parameter>id</parameter></methodparam>
</methodsynopsis>
<para>
Tato tda pedstavuje enumeraci urenou argumentem
<parameter>id</parameter> parameter. <parameter>id</parameter> me bt bu
nzev tto enumerace (nap. "MyEnum"), nebo pln repository id (nap.
"IDL:MyEnum:1.0").
</para>
<para>
<example>
<title>Ukzkov IDL soubor</title>
<programlisting>
enum MyEnum {
a,b,c,d,e
};
</programlisting>
</example>
</para>
<para>
<example>
<title>PHP kd pro pstup k MyEnum</title>
<programlisting role="php">
<?php
$enum = new OrbitEnum ("MyEnum");
echo $enum->a; /* write 0 */
echo $enum->c; /* write 2 */
echo $enum->e; /* write 4 */
?>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<refentry id="class.orbitstruct">
<refnamediv>
<refname>OrbitStruct</refname>
<refpurpose>Pout CORBA struktury</refpurpose>
</refnamediv>
<refsect1>
<title>Popis</title>
<methodsynopsis>
<type>new</type><methodname>OrbitStruct</methodname>
<methodparam><type>string</type><parameter>id</parameter></methodparam>
</methodsynopsis>
<para>
Tato tda pedstavuje strukturu urenou argumentem
<parameter>id</parameter>. <parameter>id</parameter> me bt bu nzev
tto struktury (nap. "MyStruct"), nebo pln repository id
(nap. "IDL:MyStruct:1.0").
</para>
<para>
<example>
<title>Ukzkov IDL soubor</title>
<programlisting>
struct MyStruct {
short shortvalue;
string stringvalue;
};
interface SomeInterface {
void SetValues (MyStruct values);
MyStruct GetValues();
}
</programlisting>
</example>
</para>
<para>
<example>
<title>PHP kd pro pstup k MyStruct</title>
<programlisting role="php">
<?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>
<refentry id="function.satellite_caught_exception">
<refnamediv>
<refname>satellite_caught_exception</refname>
<refpurpose>
Zjistit, jestli byla v pedchoz funkci zachycena vjimka
</refpurpose>
</refnamediv>
<refsect1>
<title>Popis</title>
<methodsynopsis>
<type>bool</type><methodname>satellite_caught_exception</methodname>
<void/>
</methodsynopsis>
<para>
Tato funkce vrac &true;, pokud byla zachycena vjimka.
</para>
<para>
<example>
<title>Ukzkov IDL soubor</title>
<programlisting>
/* ++?????++ Out of Cheese Error. Redo From Start. */
exception OutOfCheeseError {
int parameter;
}
interface AnotherInterface {
void AskWhy() raises (OutOfCheeseError);
}
</programlisting>
</example>
</para>
<para>
<example>
<title>PHP kd pro zpracovn CORBA vjimek</title>
<programlisting role="php">
<?php
$obj = new OrbitObject ($ior);
$obj->AskWhy();
if (satellite_caught_exception()) {
if ("IDL:OutOfCheeseError:1.0" == satellite_exception_id()) {
$exception = satellite_exception_value();
echo $exception->parameter;
}
}
?>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<refentry id="function.satellite_exception_id">
<refnamediv>
<refname>satellite_exception_id</refname>
<refpurpose>Zjistit repository id posledn vjimky</refpurpose>
</refnamediv>
<refsect1>
<title>Popis</title>
<methodsynopsis>
<type>string</type><methodname>satellite_exception_id</methodname>
<void/>
</methodsynopsis>
<para>
Vrac etzec obsahujc repository id (napr. "IDL:MyException:1.0".).
Ukzkov pouit viz <function>satellite_caught_exception</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.satellite_exception_value">
<refnamediv>
<refname>satellite_exception_value</refname>
<refpurpose>Zskat strukturu posledn vjimky</refpurpose>
</refnamediv>
<refsect1>
<title>Popis</title>
<methodsynopsis>
<type>OrbitStruct</type><methodname>satellite_exception_value</methodname>
<void/>
</methodsynopsis>
<para>
Vrt strukturu vjimky. Ukzkov pouit viz
<function>satellite_caught_exception</function>.
</para>
</refsect1>
</refentry>
</reference>
<!-- 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:
-->
|