cvs: phpdoc /cs/functions satellite.xml

From: Date: Fri, 26 Jan 2001 03:58:41 +0000
Subject: cvs: phpdoc /cs/functions satellite.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969333950@lists.php.net to get a copy of this message
cynic Thu Jan 25 19:58:41 2001 EDT Added files: /phpdoc/cs/functions satellite.xml Log: translated (win-1250) Index: phpdoc/cs/functions/satellite.xml +++ phpdoc/cs/functions/satellite.xml <!-- $Id: satellite.xml,v 1.1 2001/01/26 03:58:41 cynic Exp $ Author: David Eriksson <david@2good.com> --> <reference id="ref.satellite"> <title>Satellite CORBA klient extenze</title> <titleabbrev>Satellite</titleabbrev> <partintro> <para> Satellite extenze se používá pro pøístup ke CORBA objektùm. Vyžaduje idl_directory= položku v php.ini ukazující na cestu kde jsou všechny používané IDL soubory. </para> </partintro> <refentry id="class.orbitobject"> <refnamediv> <refname>OrbitObject</refname> <refpurpose>Zpøístupnit CORBA objekty</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <funcsynopsis> <funcprototype> <funcdef>new <function>OrbitObject</function></funcdef> <paramdef>string <parameter>ior</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Tato tøída poskytuje pøístup ke CORBA objektu. Argument <parameter>ior</parameter> by mìl být øetìzec obsahující IOR (Interoperable Object Reference) která identifikuje vzdálený objekt. </para> <para> <example> <title>Ukázkový IDL soubor</title> <programlisting> interface MyInterface { void SetInfo (string info); string GetInfo(); attribute int value; } </programlisting> </example> </para> <para> <example> <title>PHP kód pro pøístup k MyInterface</title> <programlisting role="php"> &lt;?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>Použít CORBA enumerace</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <funcsynopsis> <funcprototype> <funcdef>new <function>OrbitEnum</function></funcdef> <paramdef>string <parameter>id</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Tato tøída pøedstavuje enumeraci urèenou argumentem <parameter>id</parameter> parameter. <parameter>id</parameter> mùže být buï název této enumerace (napø. "MyEnum"), nebo plné repository id (napø. "IDL:MyEnum:1.0"). </para> <para> <example> <title>Ukázkový IDL soubor</title> <programlisting> enum MyEnum { a,b,c,d,e }; </programlisting> </example> </para> <para> <example> <title>PHP kód pro pøístup k MyEnum</title> <programlisting role="php"> &lt;?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>Použít CORBA struktury</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <funcsynopsis> <funcprototype> <funcdef>new <function>OrbitStruct</function></funcdef> <paramdef>string <parameter>id</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Tato tøída pøedstavuje strukturu urèenou argumentem <parameter>id</parameter>. <parameter>id</parameter> mùže být buï název této struktury (napø. "MyStruct"), nebo plné repository id (napø. "IDL:MyStruct:1.0"). </para> <para> <example> <title>Ukázkový 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 kód pro pøístup k MyStruct</title> <programlisting role="php"> &lt;?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 pøedchozí funkci zachycena výjimka </refpurpose> </refnamediv> <refsect1> <title>Popis</title> <funcsynopsis> <funcprototype> <funcdef>bool <function>satellite_caught_exception</function> </funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> <para> Tato funkce vrací <literal>true</literal>, pokud byla zachycena výjimka. </para> <para> <example> <title>Ukázkový 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 kód pro zpracování CORBA výjimek</title> <programlisting role="php"> &lt;?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í výjimky</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <funcsynopsis> <funcprototype> <funcdef>string <function>satellite_exception_id</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> <para> Vrací øetìzec obsahující repository id (napr. "IDL:MyException:1.0".). Ukázkové použití viz <function>satellite_caught_exception</function>. </para> </refsect1> </refentry> <refentry id="function.satellite_exception_value"> <refnamediv> <refname>satellite_exception_value</refname> <refpurpose>Získat strukturu poslední výjimky</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <funcsynopsis> <funcprototype> <funcdef>OrbitStruct <function>satellite_exception_value</function> </funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> <para> Vrátí strukturu výjimky. Ukázkové použití 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 sgml-parent-document:nil sgml-default-dtd-file:"../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: -->

« previous php.doc (#969333950) next »