php-doc-en/reference/sca/reference.xml
2011-09-30 14:21:51 +00:00

164 lines
5.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!-- $Revision$ -->
<reference xml:id="ref.sca" xmlns="http://docbook.org/ns/docbook">
<title>SCA &Functions;</title>
<partintro>
<!-- FIXME: This needs to be upgraded to the new oo-markup -->
<!-- Class definition section -->
<section xml:id="sca.classes"><!-- {{{ -->
&reftitle.classes;
<para>
Most of the interface to SCA is through the annotations within
SCA components so there are few public classes and methods. The only
SCA classes that scripts or components can call are the <classname>SCA</classname>
class itself, and the proxy classes <classname>SCA_LocalProxy</classname>
and <classname>SCA_SoapProxy</classname>.
</para>
<section xml:id="sca.class"><!-- {{{ -->
<title><classname>SCA</classname></title>
<para>
Much of the work of the SCA class is performed when the file
<filename>SCA.php</filename> is included within an SCA component.
However, a PHP script may include
<filename>SCA.php</filename> and call the
<function>getService</function> method on the SCA class in order
to obtain a proxy for a service. A component will not need to do this as
proxies are obtained instead by defining an instance variable with
the @reference annotation.
</para>
<para>
Components that need to create an SDO to return to a caller will
need a data factory to call. For this purpose the SCA class supports
the
<function>createDataObject</function> method, which will
create an SDO according to the model defined by the component's
@types annotations. The arguments to
<function>createDataObject</function> are the same as those to
SDO's XML Data Access Service.
</para>
<section xml:id="sca.class.SCA.methods"><!-- {{{ -->
&reftitle.methods;
<itemizedlist>
<listitem>
<para>
<link linkend="function.sca-getservice">
getService</link> - obtain a proxy for a service
</para>
</listitem>
<listitem>
<para>
<link linkend="function.sca-createdataobject">
createDataObject</link> - create an SDO
</para>
</listitem>
</itemizedlist>
</section> <!-- }}} -->
</section><!-- }}} -->
<section xml:id="sca-local-proxy.class"><!-- {{{ -->
<title>
<classname>SCA_LocalProxy</classname>
</title>
<para>
When
<function>getService</function> is called with the target of a
local PHP component, a local proxy is returned. A local proxy is also
injected into the instance variables of a component that are
defined with an @reference and an @binding.php anotation. When the
script or component makes calls on the local proxy, they are passed
on to the target component itself.
</para>
<para>
Components that need to create an SDO to pass to a component
will need a data factory to call. For this purpose the
SCA_LocalProxy class supports the <function>createDataObject</function> method,
which will create an SDO according to the model defined by the
components' @types annotations. The arguments to the
<function>createDataObject</function> are the same as those to SDO's XML Data Access
Service.
</para>
<section xml:id="sca.class.SCA-LocalProxy.methods"><!-- {{{ -->
&reftitle.methods;
<itemizedlist>
<listitem>
<para>
<link
linkend="function.sca-localproxy-createdataobject">
createDataObject</link> - create an SDO
</para>
</listitem>
</itemizedlist>
</section><!-- }}} -->
</section><!-- }}} -->
<section xml:id="sca-soap-proxy.class"><!-- {{{ -->
<title>
<classname>SCA_SoapProxy</classname>
</title>
<para>
When
<function>getService</function> is called with the target of a
WSDL file, a SOAP proxy is returned. A SOAP proxy is also injected
into the instance variables of a component that are defined with an
@reference and an @binding.soap anotations. When the script or
component makes calls on the SOAP proxy, they are formed into Web
service SOAP requests and passed on to the target component, with
the help of the PHP Soap extension.
</para>
<para>
Components that need to create an SDO to pass to a component
will need a data factory to call. For this purpose the
<classname>SCA_SoapProxy</classname> class supports the
<function>createDataObject</function> method, which will create an
SDO according to the model defined within the target WSDL. The
arguments to the <function>createDataObject</function> are the same
as those to SDO's XML Data Access Service.
</para>
<section xml:id="sca.class.SCA-SoapProxy.methods"><!-- {{{ -->
&reftitle.methods;
<itemizedlist>
<listitem>
<para>
<link
linkend="function.sca-soapproxy-createdataobject">
createDataObject</link> - create an SDO
</para>
</listitem>
</itemizedlist>
</section><!-- }}} -->
</section><!-- }}} -->
</section>
<!-- }}} -->
</partintro>
&reference.sca.entities.functions;
</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:"~/.phpdoc/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
-->