From 1a9b341bc98aa1166353c6e6165a4541d7fe10af Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 23 Jul 2005 11:08:37 +0000 Subject: [PATCH] No space before fullstop and comma No parse errors in examples git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@191272 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/sdo/reference.xml | 40 ++++++++---------- reference/sdo_das_xml/reference.xml | 19 ++++----- .../SDO-DAS-Relational-construct.xml | 19 ++++----- .../SDO-DAS-Relational-executeQuery.xml | 5 +-- reference/sdodasrel/reference.xml | 41 ++++++++----------- 5 files changed, 49 insertions(+), 75 deletions(-) diff --git a/reference/sdo/reference.xml b/reference/sdo/reference.xml index 524077afb7..0286562616 100644 --- a/reference/sdo/reference.xml +++ b/reference/sdo/reference.xml @@ -1,5 +1,5 @@ - + SDO Functions @@ -65,11 +65,10 @@ SDO - XML Data Access Service - , which is built as part of this extension, requires libxml2 + XML Data Access Service, + which is built as part of this extension, requires libxml2 (Tested with libxml2 2.6.19) which can be downloaded from - &url.libxml; - . + &url.libxml;. @@ -95,8 +94,7 @@ Note, if you built your PHP installation in a different location, using - --prefix - , + --prefix, then you will need to adjust the ./configure steps below accordingly. @@ -128,8 +126,7 @@ The following step is required to ensure - g++ - , and NOT + g++, and NOT gcc is used to build the the libraries. @@ -140,8 +137,7 @@ change the line which says CC="gcc" to - CC="g++" - . + CC="g++". @@ -161,8 +157,8 @@ Run - phpize - , which will set up the environment to compile both SDO and the + phpize, + which will set up the environment to compile both SDO and the XML Data Access Service. @@ -473,7 +469,7 @@ sdoxml:propertyType="company:EmployeeType"/> $value) { - ... + // ... } ?> ]]> @@ -502,7 +498,7 @@ sdoxml:propertyType="company:EmployeeType"/> departments as $department) { - ... + // ... } ?> ]]> @@ -510,8 +506,7 @@ sdoxml:propertyType="company:EmployeeType"/> Each iteration will assign the next department in the list to the variable - $department - . + $department. @@ -680,7 +675,7 @@ sdoxml:propertyType="company:EmployeeType"/> employeeOfTheMonth) { + if (isset($company->employeeOfTheMonth)) { unset($company->employeeOfTheMonth); } ?> @@ -821,8 +816,7 @@ sdoxml:propertyType="company:EmployeeType"/> (shown in the table above). The following examples assume the letter instance has been loaded into a data object referenced by the variable - $letter - . + $letter. Getting the SDO_Sequence interface @@ -878,7 +872,7 @@ sdoxml:propertyType="company:EmployeeType"/> getSequence() as $value) { - ... + // ... } ?> ]]> @@ -1174,9 +1168,7 @@ sdoxml:propertyType="company:EmployeeType"/> The interface through which a Data Access Service can access a data object's - SDO_DAS_ChangeSummary - - . + SDO_DAS_ChangeSummary. The change summary is used by the Data Access Service to check for conflicts when applying changes back to a data source. diff --git a/reference/sdo_das_xml/reference.xml b/reference/sdo_das_xml/reference.xml index a3d93efc84..d691295888 100644 --- a/reference/sdo_das_xml/reference.xml +++ b/reference/sdo_das_xml/reference.xml @@ -1,5 +1,5 @@ - + SDO XML Data Access Service Functions @@ -18,8 +18,7 @@ the data graph, the data object, XPath and property expressions, and so on. If you are not familiar with these ideas, you might want to look first at - the section on SDO - . + the section on SDO. The job of the XML DAS is to move data between the @@ -53,8 +52,7 @@ &reftitle.install; The XML Data Access Service is packaged and installed as part of the - SDO extension - . + SDO extension. There are additional installations steps required. @@ -247,13 +245,11 @@ The following examples are based on the letter example described in the - SDO documentation - . + SDO documentation. The examples assume the XML Schema for the letter is contained in a file letter.xsd and the letter instance is in the file - letter.xml - . + letter.xml. @@ -388,7 +384,7 @@ try { $xmldas = SDO_DAS_XML::create("letter.xsd"); $xdoc = $xmldas->loadFromFile("letter.xml"); print("Encoding is set to : " . $xdoc->getEncoding()); - print("XML Version : " . $xdoc->getXMLVersion(); + print("XML Version : " . $xdoc->getXMLVersion()); $xdoc->setXMLVersion("1.1"); print($xmldas->saveDocumentToString($xdoc)); } catch (SDO_TypeNotFoundException $e) { @@ -638,8 +634,7 @@ try { Is a subclass of - SDO_Exception - . + SDO_Exception. Thrown for any parser errors while loading the xsd/xml file. diff --git a/reference/sdodasrel/functions/SDO-DAS-Relational-construct.xml b/reference/sdodasrel/functions/SDO-DAS-Relational-construct.xml index f8aaeaef64..c3155e1303 100644 --- a/reference/sdodasrel/functions/SDO-DAS-Relational-construct.xml +++ b/reference/sdodasrel/functions/SDO-DAS-Relational-construct.xml @@ -1,5 +1,5 @@ - + SDO_DAS_Relational::__construct @@ -45,14 +45,10 @@ An array containing one or more table definitions, each of which is an associative array containing the keys - name - , - columns - , - PK - , and optionally, - FK - . + name, + columns, + PK, and optionally, + FK. For a full discussion of the metadata, see the metadata section in the general information about the Relational DAS. @@ -81,8 +77,7 @@ each of which is an associative array containing the keys parent and - child - . + child. The containment relations describe how the types in the model are connected to form a tree. The type specified as the application root type must be present @@ -110,7 +105,7 @@ &reftitle.exceptions; - SDO_DAS_Relational::construct + SDO_DAS_Relational::__construct throws a SDO_DAS_Relational_Exception if any problems are found in the metadata. diff --git a/reference/sdodasrel/functions/SDO-DAS-Relational-executeQuery.xml b/reference/sdodasrel/functions/SDO-DAS-Relational-executeQuery.xml index 5cb54ff0ab..2d1c990a8d 100644 --- a/reference/sdodasrel/functions/SDO-DAS-Relational-executeQuery.xml +++ b/reference/sdodasrel/functions/SDO-DAS-Relational-executeQuery.xml @@ -1,5 +1,5 @@ - + SDO_DAS_Relational::executeQuery @@ -78,8 +78,7 @@ $dbh = new PDO("mysql:dbname=COMPANYDB;host=localhost",DATABASE_USER,DATABASE_PA In these cases a column specifier is needed, which is an array that identifies the columns. Each entry in the array is simply a string in the form - table-name.column_name - . + table-name.column_name. diff --git a/reference/sdodasrel/reference.xml b/reference/sdodasrel/reference.xml index e532c48c47..b9ab95a20e 100644 --- a/reference/sdodasrel/reference.xml +++ b/reference/sdodasrel/reference.xml @@ -1,5 +1,5 @@ - + SDO Relational Data Access Service Functions @@ -19,15 +19,13 @@ the data graph, the data object, the disconnected way of working, the change summary, XPath and property expressions, and so on. If you are not familiar with these ideas, you might want to look first at - the section on SDO - . + the section on SDO. In addition, the Relational DAS makes use of the PDO extension to isolate itself from specifics of different back-end relational databases. In order to use the Relational DAS you will need to be able to create and pass a PDO database connection; for this reason you might also want to take a look at - the section on PDO - . + the section on PDO. @@ -100,8 +98,7 @@ of the Relational DAS must be constructed, using the same metadata, and another connection to the database obtained. These, plus the data graph itself, are passed to - applyChanges - . + applyChanges. At this point the Relational DAS examines the change summary and generates the necessary INSERT, UPDATE and DELETE SQL statements to apply the changes. The UPDATE and DELETE statements are qualified @@ -118,8 +115,8 @@ There are other ways of working with the data in the database: it is possible to just create data objects and write them to the database without a preliminary call to - executeQuery - , for example. This scenario and others are explored in the + executeQuery, + for example. This scenario and others are explored in the Examples section below. @@ -356,7 +353,7 @@ $company_table = array ( ); $department_table = array ( 'name' => 'department', - 'columns' => array('id', 'name', 'location' , 'number', 'co_id'), + 'columns' => array('id', 'name', 'location', 'number', 'co_id'), 'PK' => 'id', 'FK' => array ( 'from' => 'co_id', @@ -705,13 +702,12 @@ $das -> applyChanges($dbh, $root); In this example the third argument to - executeQuery - , the column specifier is needed as there are other tables in the + executeQuery, + the column specifier is needed as there are other tables in the metadata with column names of name and - id - . + id. If there were no possible ambiguity it could be omitted. @@ -765,8 +761,8 @@ foreach ($root['company'] as $company) { In this example the same instance of the Relational DAS is reused for the - applyChanges - , as is the PDO database handle. This is quite alright; it also + applyChanges, + as is the PDO database handle. This is quite alright; it also alright to allow the previous instances to be garbage collected and to obtain new instances. No state data regarding the graph is held the Relational DAS once it has returned a data graph to @@ -1099,8 +1095,7 @@ $das -> applyChanges($dbh, $root); the company, department, and employee tables. These introduce the final piece of function not exercised by the examples above: the non-containment reference - employee_of_the_month - . + employee_of_the_month. Like the examples above for company and department, this set of examples @@ -1229,7 +1224,7 @@ $name = 'Acme'; $root = $das->executeQuery($dbh, 'select c.id, c.name, c.employee_of_the_month, d.id, d.name, e.id, e.name ' . 'from company c, department d, employee e ' . - 'where e.dept_id = d.id and d.co_id = c.id and c.name="' . $name . '";' , + 'where e.dept_id = d.id and d.co_id = c.id and c.name="' . $name . '";', array('company.id','company.name','company.employee_of_the_month', 'department.id','department.name','employee.id','employee.name')); $acme = $root['company'][0]; @@ -1289,7 +1284,7 @@ $name='MegaCorp'; $root = $das->executeQuery($dbh, 'select c.id, c.name, c.employee_of_the_month, d.id, d.name, e.id, e.name ' . 'from company c, department d, employee e ' . - 'where e.dept_id = d.id and d.co_id = c.id and c.name="' . $name . '";' , + 'where e.dept_id = d.id and d.co_id = c.id and c.name="' . $name . '";', array('company.id','company.name','company.employee_of_the_month', 'department.id','department.name','employee.id','employee.name')); $megacorp = $root['company'][0]; @@ -1403,11 +1398,9 @@ echo "Deleted the company, departments and employees all in one go.\n"; Is a subclass of PHP's - Exception - . + Exception. It adds no behaviour to - Exception - . + Exception. Thrown, with useful descriptive text, to signal errors in the metadata or unexpected failures to perform SQL operations.