WS & wrap

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@191408 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Sean Coates 2005-07-24 21:23:03 +00:00
parent 13e2bdb8c5
commit 2e2a13363c

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
<reference id="ref.sdo">
<title>SDO Functions</title>
@ -10,7 +10,7 @@
&reftitle.intro;
<para>
<!-- This warns that the extension is experimental -->
&warn.experimental;
&warn.experimental;
</para>
<para>
Service Data Objects (SDOs) are designed to simplify working with
@ -44,11 +44,8 @@
for details on those
currently available. In addition to the provided DASs, SDO also
provides interfaces to enable others to be implemented
(see the section on
<link linkend="sdo.class.sdo-das-spis">
SDO Data Access Services Interface
</link>
for more details).
(see the section on <link linkend="sdo.class.sdo-das-spis">SDO Data
Access Services Interface</link> for more details).
</para>
<para>
This extension is derived from concepts taken from the
@ -64,31 +61,29 @@
The SDO extension requires PHP 5.1 or higher.
</para>
<para>
SDO
<link linkend="ref.sdo-das-xml">XML Data Access Service</link>
, which is built as part of this extension, requires libxml2
SDO <link linkend="ref.sdo-das-xml">XML Data Access Service</link>,
which is built as part of this extension, requires libxml2
(Tested with libxml2 2.6.19) which can be downloaded from
<ulink url='&url.libxml;'>&url.libxml;</ulink>
.
<ulink url='&url.libxml;'>&url.libxml;</ulink>.
</para>
</section>
<section id="sdo.installation">
&reftitle.install;
<para>
SDO extension can be installed using pear. However as it is
still in it's beta you need set <command>pear</command> option 'preferred_state' to beta.
like <command> pear -D preferred_state=beta install sdo </command>.
If you want to install this extension manually on Linux, you
can do so by following steps described below.
</para>
<para>
SDO extension can be installed using pear. However as it is
still in it's beta you need set <command>pear</command> option 'preferred_state' to beta.
like <command> pear -D preferred_state=beta install sdo </command>.
If you want to install this extension manually on Linux, you
can do so by following steps described below.
</para>
<procedure id='sdo.installation.linux.steps'>
<title>Linux intallation steps</title>
<para>
The following instructions describe how to install the
SDO extension on Linux. Note, these steps will also install the
<link linkend="ref.sdo-das-xml">XML Data Access Service</link>
which is packaged as part of this extension.
which is packaged as part of this extension.
</para>
<step>
<para>
@ -108,27 +103,22 @@
</step>
<step>
<para>
Run
<command>phpize</command>
, which will set up the environment to compile both SDO and the
XML Data Access Service.
Run <command>phpize</command>, which will set up the environment to
compile both SDO and the XML Data Access Service.
</para>
</step>
<step>
<para>
Next run
<command>./configure; make; make install</command>. Please note, you may need to login as root to install the extension.
Next run <command>./configure; make; make install</command>. Please
note, you may need to login as root to install the extension.
</para>
</step>
<step>
<para>
Make sure that these modules are loaded by PHP, by adding
<command>extension=sdo.so</command>
and
<command>extension=sdo_das_xml.so</command>
to your
<filename>php.ini</filename>
file in the same order.
<command>extension=sdo.so</command> and
<command>extension=sdo_das_xml.so</command> to your
<filename>php.ini</filename> file in the same order.
</para>
</step>
</procedure>
@ -345,9 +335,8 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<section id="sdo.sample.getset">
<title>Setting and Getting Property Values</title>
<para>
The following examples assume
<command>$company</command>
is a data object created from the schema and instance document shown above.
The following examples assume <command>$company</command> is a data
object created from the schema and instance document shown above.
</para>
<para>
<example>
@ -355,8 +344,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
Data object properties can be accessed using the object property
access syntax. The following gets the list of departments
(containing a single department),
and sets the company name to 'Acme'.
(containing a single department), and sets the company name to 'Acme'.
</para>
<programlisting role="php" id="sdo.examples.propname">
<![CDATA[
@ -375,15 +363,14 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
Data object properties can be accessed via their property index
using array syntax. The property index is the position at which the
property's definition appears in the model
(in this case the xml schema).
property's definition appears in the model (in this case the xml
schema).
We can see from the schema listing above that the departments element
is the first company property defined and the company name attribute
is the second company property
(the SDO interface makes no distinction between XML attributes and
elements).
The following gets the list of departments (containing a
single department), and sets the company name to 'Acme'.
is the second company property (the SDO interface makes no distinction
between XML attributes and elements).
The following gets the list of departments (containing a single
department), and sets the company name to 'Acme'.
</para>
<programlisting role="php" id="sdo.examples.propindex">
<![CDATA[
@ -417,8 +404,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
For the first iteration, $name will be 'name' and $value
will be 'Acme'. For the second iteration, $name will be
'departments' and $value will be an SDO_List (because departments is a
many-valued property (stated
<command>maxOccurs="unbouded"</command>
many-valued property (stated <command>maxOccurs="unbouded"</command>
in the schema)) containing a single data object of type DepartmentType.
For the third iteration, $name will be 'employeeOfTheMonth' and $value
will be a data object of type EmployeeType.
@ -444,9 +430,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
</programlisting>
<para>
Each iteration will assign the next department in the
list to the variable
<command>$department</command>
.
list to the variable <command>$department</command>.
</para>
</example>
</para>
@ -455,9 +439,8 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<example>
<title>Many-valued Element Access</title>
<para>
We can access individual elements of many-valued properties
using array syntax. The following accesses the first department in the
company.
We can access individual elements of many-valued properties using array
syntax. The following accesses the first department in the company.
</para>
<programlisting role="php" id="sdo.examples.mvaccess">
<![CDATA[
@ -595,11 +578,8 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<example>
<title>Unset referenced data object</title>
<para>
We can use the
<function>isset</function>
and
<function>unset</function>
functions to test and remove items
We can use the <function>isset</function> and
<function>unset</function> functions to test and remove items
from the data object.
</para>
<para>
@ -645,9 +625,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
The schema below describes the format of a letter. The letter can
optionally contain three properties; date, firstName, and lastName.
The schema states
<command>mixed="true"</command>
which means that
The schema states <command>mixed="true"</command> which means that
unstructured text can be interspersed between the three properties.
</para>
<para>
@ -756,8 +734,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
(shown in the table above).
The following examples assume the letter instance has been
loaded into a data object referenced by the variable
<command>$letter</command>
.
<command>$letter</command>.
<example>
<title>Getting the SDO_Sequence interface</title>
<para>
@ -785,8 +762,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<example>
<title>Get/set sequence values</title>
<para>
We can get and set individual values
(including unstructured text)
We can get and set individual values (including unstructured text)
using the sequence index.
The following sets the firstName to 'Snappy' and gets the last
sequence values (the unstructured text, 'Your premium is past due.').
@ -893,14 +869,9 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<example>
<title>Removing from a sequence</title>
<para>
We can use the
<function>isset</function>
and
<function>unset</function>
functions to test and remove items
from the sequence (Note:
<function>unset</function>
currently
We can use the <function>isset</function> and
<function>unset</function> functions to test and remove items
from the sequence (Note: <function>unset</function> currently
leaves the values in the data object, but this behaviour is
likely to change to also remove the data from the data object).
Sequence behaves like a contiguous list and therefore removing
@ -944,12 +915,9 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
The main interface through which data objects are manipulated. In
addition to the methods below, SDO_DataObject extends the
ArrayAccess, SDO_PropertyAccess (defines
<function>__get</function>
/
<function>__set</function>
methods for property access overloading), Iterator, and
Countable interfaces.
ArrayAccess, SDO_PropertyAccess (defines <function>__get</function> /
<function>__set</function> methods for property access overloading),
Iterator, and Countable interfaces.
</para>
<section id='sdo.class.SDO_DataObject.methods'> &reftitle.methods;
<itemizedlist>
@ -961,25 +929,29 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
</listitem>
<listitem>
<para>
<link linkend='function.SDO-DataObject-getSequence'>getSequnece</link>
- get the sequence for the data object
<link linkend='function.SDO-DataObject-getSequence'>
getSequnece
</link> - get the sequence for the data object
</para>
</listitem>
<listitem>
<para>
<link linkend='function.SDO-DataObject-createDataObject'>createDataObject</link>
- create a child data object
<link linkend='function.SDO-DataObject-createDataObject'>
createDataObject
</link> - create a child data object
</para>
</listitem>
<listitem>
<para>
<link linkend='function.SDO-DataObject-clear'>clear</link>
<link linkend='function.SDO-DataObject-clear'>clear</link>
- unset the properties of a data object
</para>
</listitem>
<listitem>
<para>
<link linkend='function.SDO-DataObject-getContainer'>getContainer</link>
<link linkend='function.SDO-DataObject-getContainer'>
getContainer
</link>
- get the container (also known as 'parent') of this data object
</para>
</listitem>
@ -987,7 +959,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
<link linkend='function.SDO-DataObject-getContainmentPropertyName'>
getContainmentPropertyName
</link>
</link>
- get the name by which the parent refers to this data object
</para>
</listitem>
@ -1015,7 +987,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
<link linkend='function.SDO-Sequence-getPropertyIndex'>
getPropertyIndex
</link>
</link>
- get the property index for a given sequence index
</para>
</listitem>
@ -1023,19 +995,19 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
<link linkend='function.SDO-Sequence-getPropertyName'>
getPropertyName
</link>
</link>
- get the property name for a given sequence index
</para>
</listitem>
<listitem>
<para>
<link linkend='function.SDO-Sequence-move'>move</link>
<link linkend='function.SDO-Sequence-move'>move</link>
- move an element from one property index to another
</para>
</listitem>
<listitem>
<para>
<link linkend='function.SDO-Sequence-insert'>insert</link>
<link linkend='function.SDO-Sequence-insert'>insert</link>
- insert a new value into the sequence
</para>
</listitem>
@ -1059,8 +1031,8 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<itemizedlist>
<listitem>
<para>
<link linkend='function.SDO-List-insert'>insert</link>
- insert a new value into the list
<link linkend='function.SDO-List-insert'>insert</link>
- insert a new value into the list
</para>
</listitem>
</itemizedlist>
@ -1077,8 +1049,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
(i.e. configuring the data factory with the type and structure
information for the data objects it can create.)
for the factory and can then optionally return an instance of,
or implement,
the SDO_DataFactory interface.
or implement, the SDO_DataFactory interface.
</para>
<section id='sdo.class.SDO-DataFactory.methods'>
&reftitle.methods;
@ -1094,13 +1065,11 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
</section>
</section>
<section id='sdo.class.sdo-das-spis'>
<title>
SDO Data Access Service Developer Interfaces
</title>
<section id='sdo.class.sdodas-dataobject'>
<title>
<classname>SDO_DAS_DataObject</classname>
@ -1110,8 +1079,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
a data object's
<link linkend='sdo.class.sdodas-changesummary'>
SDO_DAS_ChangeSummary
</link>
.
</link>.
The change summary is used by the Data Access Service to check for
conflicts when applying changes back to a data source.
</para>
@ -1121,7 +1089,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
<link linkend='function.SDO-DAS-DataObject-getChangeSummary'>
getChangeSummary
</link>
</link>
- get the change summary for a data object
</para>
</listitem>
@ -1130,7 +1098,6 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
</section>
</section>
<section id='sdo.class.sdodas-changesummary'>
<title>
<classname>SDO_DAS_ChangeSummary</classname>
@ -1157,7 +1124,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
<link linkend='function.SDO-DAS-ChangeSummary-beginLogging'>
beginLogging
</link>
</link>
- begin logging changes made to a data object
</para>
</listitem>
@ -1165,7 +1132,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
<link linkend='function.SDO-DAS-ChangeSummary-endLogging'>
endLogging
</link>
</link>
- end logging changes made to a data object
</para>
</listitem>
@ -1173,7 +1140,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
<link linkend='function.SDO-DAS-ChangeSummary-isLogging'>
isLogging
</link>
</link>
- test to see if change logging is on
</para>
</listitem>
@ -1181,7 +1148,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
<link linkend='function.SDO-DAS-ChangeSummary-getChangedDataObjects'>
getChangedDataObjects
</link>
</link>
- get a list of the data objects which have been changed
</para>
</listitem>
@ -1189,7 +1156,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
<link linkend='function.SDO-DAS-ChangeSummary-getChangeType'>
getChangeType
</link>
</link>
- get the type of change which has been made to a data object
</para>
</listitem>
@ -1197,7 +1164,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
<link linkend='function.SDO-DAS-ChangeSummary-getOldValues'>
getOldValues
</link>
</link>
- get a list of old values for a data object
</para>
</listitem>
@ -1205,7 +1172,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
<link linkend='function.SDO-DAS-ChangeSummary-getOldContainer'>
getOldContainer
</link>
</link>
- get the old container data object for a deleted data object
</para>
</listitem>
@ -1222,8 +1189,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
accessed. A list of settings is returned by the change summary method
<link linkend='function.SDO-DAS-ChangeSummary-getOldValues'>
<function>getOldValues</function>
</link>
.
</link>.
</para>
<section id='sdo.class.SDO_DAS_Setting.methods'>
&reftitle.methods;
@ -1232,7 +1198,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
<link linkend='function.SDO-DAS-Setting-getPropertyIndex'>
getPropertyIndex
</link>
</link>
- get the property index for the changed property
</para>
</listitem>
@ -1240,7 +1206,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
<link linkend='function.SDO-DAS-Setting-getPropertyName'>
getPropertyName
</link>
</link>
- get the property name for the changed property
</para>
</listitem>
@ -1248,7 +1214,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
<link linkend='function.SDO-DAS-Setting-getValue'>
getValue
</link>
</link>
- get the old value for the changed property
</para>
</listitem>
@ -1256,16 +1222,14 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
<link linkend='function.SDO-DAS-Setting-getListIndex'>
getListIndex
</link>
</link>
- get the list index for the old value if it was part of a
many-valued property
</para>
</listitem>
<listitem>
<para>
<link linkend='function.SDO-DAS-Setting-isSet'>
isSet
</link>
<link linkend='function.SDO-DAS-Setting-isSet'>isSet</link>
- test to see if the property was set prior to being modified
</para>
</listitem>
@ -1283,17 +1247,18 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
method which returns a concrete data factory implementation.
The implementation is used by Data Access Services to create an
SDO model from their model.
For example, a Relational Data Access Service might create and populate an
SDO_DAS_DataFactory model based on a schema for a relational database.
For example, a Relational Data Access Service might create and populate
an SDO_DAS_DataFactory model based on a schema for a relational
database.
</para>
<section id='sdo.class.SDO_DAS_DataFactory.methods'>
&reftitle.methods;
&reftitle.methods;
<itemizedlist>
<listitem>
<para>
<link linkend='function.SDO-DAS-DataFactory-getDataFactory'>
getDataFactory
</link>
</link>
- static methods for getting a concrete data factory instance
</para>
</listitem>
@ -1303,7 +1268,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
<link linkend='function.SDO-DAS-DataFactory-addType'>
addType
</link>
</link>
- add a new type to the SDO model
</para>
</listitem>
@ -1313,7 +1278,7 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
<para>
<link linkend='function.SDO-DAS-DataFactory-addPropertyToType'>
addPropertyToType
</link>
</link>
- add a new property to a type definition in the SDO model
</para>
</listitem>
@ -1323,11 +1288,11 @@ sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
</section>
</section>
&reference.sdo.constants;
&reference.sdo.constants;
</partintro>
&reference.sdo.functions;
&reference.sdo.functions;
</reference>
<!-- Keep this comment at the end of the file