[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-03-21 Thread William Candillon
The proposal to merge lp:~zorba-coders/zorba/phpapi into lp:zorba has been 
updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/97612
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/97612
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-03-21 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/phpapi-2012-03-21T10-54-06.165Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/97612
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-03-21 Thread Zorba Build Bot
Validation queue job phpapi-2012-03-21T10-54-06.165Z is finished. The final 
status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/97612
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-03-21 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/phpapi into lp:zorba has been 
updated.

Status: Approved = Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/97612
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/97612
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-03-15 Thread William Candillon
William Candillon has proposed merging lp:~zorba-coders/zorba/phpapi into 
lp:zorba.

Requested reviews:
  Matthias Brantner (matthias-brantner)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/97612

Minor update on the PHP example page.
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/97612
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'doc/php/manual/indexpage.dox'
--- doc/php/manual/indexpage.dox	2010-04-28 14:13:44 +
+++ doc/php/manual/indexpage.dox	2012-03-15 10:57:27 +
@@ -2,15 +2,11 @@
 
   Zorba ships with a PHP language binding that provides some basic features in order to prepare and execute queries
   with Zorba.
-
-  For the moment, we provide a a class=en href=examples.htmlset of examples/a that show how this language binding can be used.
-
-  \section note Note for garbage collected languages
-  Zorba requires that objects must be deleted in a certain order, which Garbage Collectors are not aware of. For that reason,
-  the Iterators created with XQuery.iterator() must be explicitly destroyed with iterator.destroy() before the XQuery object
-  is destroyed.
-
-  \example simple.php
+  
+  The a href=http://www.zorba-xquery.com/html/entry/2011/12/27/PHP_Meets_XQuery;following tutorial/a provides an overview on how to leverage Zorba into PHP applications. 
+  We also provide the following a class=en href=examples.htmlset of examples/a that show how the Zorba PHP API can be used.
+
+  \example test.php
This is a simple example that demonstrate how to use the Zorba XQuery Engine to
create, compile, and execute queries.
  */

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-03-15 Thread Matthias Brantner
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/97612
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-19 Thread Chris Hillery
The proposal to merge lp:~zorba-coders/zorba/phpapi into lp:zorba has been 
updated.

Status: Merged = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/89002
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/89002
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-19 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/phpapi-2012-01-19T09-02-58.633Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/89002
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-19 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/phpapi into lp:zorba has been 
updated.

Status: Approved = Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/89002
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/89002
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-19 Thread Zorba Build Bot
The attempt to merge lp:~zorba-coders/zorba/phpapi into lp:zorba failed. Below 
is the output from the failed tests.


CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 
(message):
  Validation queue job phpapi-2012-01-19T09-02-58.633Z is finished.  The
  final status was:

  

  1 tests did not succeed - changes not commited.


Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/89002
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-19 Thread Chris Hillery
The proposal to merge lp:~zorba-coders/zorba/phpapi into lp:zorba has been 
updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/89002
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/89002
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-19 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/phpapi-2012-01-19T09-41-08.589Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/89002
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-19 Thread Zorba Build Bot
Validation queue job phpapi-2012-01-19T09-41-08.589Z is finished. The final 
status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/89002
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-19 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/phpapi into lp:zorba has been 
updated.

Status: Approved = Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/89002
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/89002
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-18 Thread William Candillon
William Candillon has proposed merging lp:~zorba-coders/zorba/phpapi into 
lp:zorba.

Requested reviews:
  William Candillon (wcandillon)
  Rodolfo Ochoa (rodolfo-ochoa)
  Matthias Brantner (matthias-brantner)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/89002

This merge adds the PHP API that was introduced at the PHP Tour 2011.
It contains a test for it (php2).

From the last merge proposal, the following things have been done:
- Revert bogus change in  swig/php/generate_proxy.php.in (renaming of libPrefix 
to prefix).
- Introduce a STD Iterator for streaming results.
- Make the parseXML() method private.
- Improve importQueryFromURI

The two key tests are: 
- php1
- php2


-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/89002
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2012-01-11 17:30:25 +
+++ ChangeLog	2012-01-18 10:31:35 +
@@ -20,6 +20,7 @@
   * Added split function to the string module that allows for streamable tokenization but doesn't have regular expression
 support.
   * zerr is not predeclared anymore to be http://www.zorba-xquery.com/errors
+  * Add new XQuery interface for the PHP bindings.
   * Added API method Item::getNamespaceBindings().
 
 version 2.1

=== modified file 'doc/php/CMakeLists.txt'
--- doc/php/CMakeLists.txt	2011-06-20 12:44:21 +
+++ doc/php/CMakeLists.txt	2012-01-18 10:31:35 +
@@ -1,4 +1,4 @@
-# Copyright 2006-2008 The FLWOR Foundation.
+# Copyright 2006-2012 The FLWOR Foundation.
 # 
 # Licensed under the Apache License, Version 2.0 (the License);
 # you may not use this file except in compliance with the License.

=== modified file 'doc/php/examples/CMakeLists.txt'
--- doc/php/examples/CMakeLists.txt	2011-08-19 00:03:31 +
+++ doc/php/examples/CMakeLists.txt	2012-01-18 10:31:35 +
@@ -1,4 +1,4 @@
-# Copyright 2006-2008 The FLWOR Foundation.
+# Copyright 2006-2012 The FLWOR Foundation.
 # 
 # Licensed under the Apache License, Version 2.0 (the License);
 # you may not use this file except in compliance with the License.
@@ -20,14 +20,21 @@
   MESSAGE(STATUS PHP Path: ${phpPath})
   SET(phpExtensionPath ${CMAKE_BINARY_DIR}/swig/php)
   MESSAGE(STATUS PHP Extension Path:  ${phpExtensionPath})
+  SET(phpIncludePath ${CMAKE_BINARY_DIR}/swig/php)
+  MESSAGE(STATUS PHP Include Path:  ${phpExtensionPath})
   CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/php.ini.in ${CMAKE_CURRENT_BINARY_DIR}/php.ini)
   MESSAGE(STATUS Configuration file:  ${CMAKE_CURRENT_BINARY_DIR}/php.ini)
   CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/simple.php.in ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
   MESSAGE(STATUS Simple configuration file:  ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
-  ADD_TEST(php ${PHP5_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
+  CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/test.php.in ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  MESSAGE(STATUS PHP test  file configured:  ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  ADD_TEST(php1 ${PHP5_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
   MESSAGE(STATUS Installing:  ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
-  
-  INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/simple.php
+  ADD_TEST(php2 ${PHP5_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  MESSAGE(STATUS Installing:  ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  
+  
+  INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/simple.php ${CMAKE_CURRENT_BINARY_DIR}/test.php
   COMPONENT php_examples
   DESTINATION
   share/doc/zorba-${ZORBA_MAJOR_NUMBER}.${ZORBA_MINOR_NUMBER}.${ZORBA_PATCH_NUMBER}/php/examples)

=== modified file 'doc/php/examples/php.ini.in'
--- doc/php/examples/php.ini.in	2009-10-30 16:34:37 +
+++ doc/php/examples/php.ini.in	2012-01-18 10:31:35 +
@@ -1,2 +1,3 @@
 enable_dl=On
 extension_dir=@phpExtensionPath@
+include_path=.:@phpIncludePath@
\ No newline at end of file

=== modified file 'doc/php/examples/simple.php.in'
--- doc/php/examples/simple.php.in	2011-08-04 02:14:56 +
+++ doc/php/examples/simple.php.in	2012-01-18 10:31:35 +
@@ -1,6 +1,6 @@
 ?php
 /*
- * Copyright 2006-2008 The FLWOR Foundation.
+ * Copyright 2006-2012 The FLWOR Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the License);
  * you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-require '@phpPath@/zorba_api_wrapper.php';
+require '@phpPath@/Zorba/zorba_api_wrapper.php';
 
 function example_1(Zorba $aZorba)
 {

=== added file 'doc/php/examples/test.php.in'
--- doc/php/examples/test.php.in	1970-01-01 00:00:00 +
+++ doc/php/examples/test.php.in	2012-01-18 10:31:35 +
@@ -0,0 +1,120 @@
+?php
+/*
+ * Copyright 2006-2012 The FLWOR Foundation.
+ * 
+ * Licensed under the Apache 

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-18 Thread Rodolfo Ochoa
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/89002
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-18 Thread Matthias Brantner
The proposal to merge lp:~zorba-coders/zorba/phpapi into lp:zorba has been 
updated.

Commit Message changed to:

This merge adds the PHP API that was introduced at the PHP Tour 2011.

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/89002
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/89002
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-18 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/phpapi-2012-01-18T18-48-01.633Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/89002
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-18 Thread Zorba Build Bot
Validation queue job phpapi-2012-01-18T18-48-01.633Z is finished. The final 
status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/89002
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-17 Thread William Candillon
William Candillon has proposed merging lp:~zorba-coders/zorba/phpapi into 
lp:zorba.

Requested reviews:
  David Graf (davidagraf)
  Matthias Brantner (matthias-brantner)
  Rodolfo Ochoa (rodolfo-ochoa)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/88853

This merge adds the PHP API that was introduced at the PHP Tour 2011.
It contains a test for it (php2).

From the last merge proposal, the following things have been done:
- Revert bogus change in  swig/php/generate_proxy.php.in (renaming of libPrefix 
to prefix).
- Introduce a STD Iterator for streaming results.
- Make the parseXML() method private.
- Improve importQueryFromURI

The two key tests are: 
- php1
- php2


-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/88853
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2012-01-11 17:30:25 +
+++ ChangeLog	2012-01-17 13:39:27 +
@@ -20,6 +20,7 @@
   * Added split function to the string module that allows for streamable tokenization but doesn't have regular expression
 support.
   * zerr is not predeclared anymore to be http://www.zorba-xquery.com/errors
+  * Add new XQuery interface for the PHP bindings.
   * Added API method Item::getNamespaceBindings().
 
 version 2.1

=== modified file 'doc/php/CMakeLists.txt'
--- doc/php/CMakeLists.txt	2011-06-20 12:44:21 +
+++ doc/php/CMakeLists.txt	2012-01-17 13:39:27 +
@@ -1,4 +1,4 @@
-# Copyright 2006-2008 The FLWOR Foundation.
+# Copyright 2006-2012 The FLWOR Foundation.
 # 
 # Licensed under the Apache License, Version 2.0 (the License);
 # you may not use this file except in compliance with the License.

=== modified file 'doc/php/examples/CMakeLists.txt'
--- doc/php/examples/CMakeLists.txt	2011-08-19 00:03:31 +
+++ doc/php/examples/CMakeLists.txt	2012-01-17 13:39:27 +
@@ -1,4 +1,4 @@
-# Copyright 2006-2008 The FLWOR Foundation.
+# Copyright 2006-2012 The FLWOR Foundation.
 # 
 # Licensed under the Apache License, Version 2.0 (the License);
 # you may not use this file except in compliance with the License.
@@ -20,14 +20,21 @@
   MESSAGE(STATUS PHP Path: ${phpPath})
   SET(phpExtensionPath ${CMAKE_BINARY_DIR}/swig/php)
   MESSAGE(STATUS PHP Extension Path:  ${phpExtensionPath})
+  SET(phpIncludePath ${CMAKE_BINARY_DIR}/swig/php)
+  MESSAGE(STATUS PHP Include Path:  ${phpExtensionPath})
   CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/php.ini.in ${CMAKE_CURRENT_BINARY_DIR}/php.ini)
   MESSAGE(STATUS Configuration file:  ${CMAKE_CURRENT_BINARY_DIR}/php.ini)
   CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/simple.php.in ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
   MESSAGE(STATUS Simple configuration file:  ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
-  ADD_TEST(php ${PHP5_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
+  CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/test.php.in ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  MESSAGE(STATUS PHP test  file configured:  ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  ADD_TEST(php1 ${PHP5_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
   MESSAGE(STATUS Installing:  ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
-  
-  INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/simple.php
+  ADD_TEST(php2 ${PHP5_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  MESSAGE(STATUS Installing:  ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  
+  
+  INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/simple.php ${CMAKE_CURRENT_BINARY_DIR}/test.php
   COMPONENT php_examples
   DESTINATION
   share/doc/zorba-${ZORBA_MAJOR_NUMBER}.${ZORBA_MINOR_NUMBER}.${ZORBA_PATCH_NUMBER}/php/examples)

=== modified file 'doc/php/examples/php.ini.in'
--- doc/php/examples/php.ini.in	2009-10-30 16:34:37 +
+++ doc/php/examples/php.ini.in	2012-01-17 13:39:27 +
@@ -1,2 +1,3 @@
 enable_dl=On
 extension_dir=@phpExtensionPath@
+include_path=.:@phpIncludePath@
\ No newline at end of file

=== modified file 'doc/php/examples/simple.php.in'
--- doc/php/examples/simple.php.in	2011-08-04 02:14:56 +
+++ doc/php/examples/simple.php.in	2012-01-17 13:39:27 +
@@ -1,6 +1,6 @@
 ?php
 /*
- * Copyright 2006-2008 The FLWOR Foundation.
+ * Copyright 2006-2012 The FLWOR Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the License);
  * you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-require '@phpPath@/zorba_api_wrapper.php';
+require '@phpPath@/Zorba/zorba_api_wrapper.php';
 
 function example_1(Zorba $aZorba)
 {

=== added file 'doc/php/examples/test.php.in'
--- doc/php/examples/test.php.in	1970-01-01 00:00:00 +
+++ doc/php/examples/test.php.in	2012-01-17 13:39:27 +
@@ -0,0 +1,120 @@
+?php
+/*
+ * Copyright 2006-2012 The FLWOR Foundation.
+ * 
+ * Licensed under the Apache License, 

[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-17 Thread Matthias Brantner
The proposal to merge lp:~zorba-coders/zorba/phpapi into lp:zorba has been 
updated.

Commit Message changed to:

This merge adds the PHP API that was introduced at the PHP Tour 2011.

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/88853
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/88853
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-17 Thread Rodolfo Ochoa
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/88853
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-17 Thread Zorba Build Bot
The attempt to merge lp:~zorba-coders/zorba/phpapi into lp:zorba failed. Below 
is the output from the failed tests.


CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:273 
(message):
  Validation queue job phpapi-2012-01-17T19-41-11.72Z is finished.  The final
  status was:

  

  1 tests did not succeed - changes not commited.


Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/88853
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-17 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/phpapi into lp:zorba has been 
updated.

Status: Approved = Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/88853
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/88853
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-16 Thread William Candillon
importQueryFromURI() can read any kind of stream and there is even a test for 
it.
It is commented out so the php tests don't rely on http connections.

-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/88315
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-16 Thread William Candillon
I've updated the changelog.
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/88713
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-12 Thread William Candillon
 - Is it on purpose that the only thing that is returned by the iterator is a
 serialized version of the item? For example, this will return an error for
 attribute nodes.
Yes.
We have two use cases for XQPHP:
- The mobile app which uses execute().
- The google earth demo which uses the iterator.

 
 - There is a tab at the beginning of
 
   /**
* Internal
 
 - Is this wrapper supposed to be merged before the implementation of execute()
 can stream?
Yes

-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/88160
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-12 Thread William Candillon
William Candillon has proposed merging lp:~zorba-coders/zorba/phpapi into 
lp:zorba.

Requested reviews:
  David Graf (davidagraf)
  Matthias Brantner (matthias-brantner)
  Rodolfo Ochoa (rodolfo-ochoa)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/88315

This merge adds the PHP API that was introduced at the PHP Tour 2011.
It contains a test for it (php2).

From the last merge proposal, the following things have been done:
- Revert bogus change in  swig/php/generate_proxy.php.in (renaming of libPrefix 
to prefix).
- Introduce a STD Iterator for streaming results.
- Make the parseXML() method private.
- Improve importQueryFromURI

The two key tests are: 
- php1
- php2


-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/88315
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'doc/php/CMakeLists.txt'
--- doc/php/CMakeLists.txt	2011-06-20 12:44:21 +
+++ doc/php/CMakeLists.txt	2012-01-12 08:56:26 +
@@ -1,4 +1,4 @@
-# Copyright 2006-2008 The FLWOR Foundation.
+# Copyright 2006-2012 The FLWOR Foundation.
 # 
 # Licensed under the Apache License, Version 2.0 (the License);
 # you may not use this file except in compliance with the License.

=== modified file 'doc/php/examples/CMakeLists.txt'
--- doc/php/examples/CMakeLists.txt	2011-08-19 00:03:31 +
+++ doc/php/examples/CMakeLists.txt	2012-01-12 08:56:26 +
@@ -1,4 +1,4 @@
-# Copyright 2006-2008 The FLWOR Foundation.
+# Copyright 2006-2012 The FLWOR Foundation.
 # 
 # Licensed under the Apache License, Version 2.0 (the License);
 # you may not use this file except in compliance with the License.
@@ -20,14 +20,21 @@
   MESSAGE(STATUS PHP Path: ${phpPath})
   SET(phpExtensionPath ${CMAKE_BINARY_DIR}/swig/php)
   MESSAGE(STATUS PHP Extension Path:  ${phpExtensionPath})
+  SET(phpIncludePath ${CMAKE_BINARY_DIR}/swig/php)
+  MESSAGE(STATUS PHP Include Path:  ${phpExtensionPath})
   CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/php.ini.in ${CMAKE_CURRENT_BINARY_DIR}/php.ini)
   MESSAGE(STATUS Configuration file:  ${CMAKE_CURRENT_BINARY_DIR}/php.ini)
   CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/simple.php.in ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
   MESSAGE(STATUS Simple configuration file:  ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
-  ADD_TEST(php ${PHP5_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
+  CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/test.php.in ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  MESSAGE(STATUS PHP test  file configured:  ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  ADD_TEST(php1 ${PHP5_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
   MESSAGE(STATUS Installing:  ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
-  
-  INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/simple.php
+  ADD_TEST(php2 ${PHP5_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  MESSAGE(STATUS Installing:  ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  
+  
+  INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/simple.php ${CMAKE_CURRENT_BINARY_DIR}/test.php
   COMPONENT php_examples
   DESTINATION
   share/doc/zorba-${ZORBA_MAJOR_NUMBER}.${ZORBA_MINOR_NUMBER}.${ZORBA_PATCH_NUMBER}/php/examples)

=== modified file 'doc/php/examples/php.ini.in'
--- doc/php/examples/php.ini.in	2009-10-30 16:34:37 +
+++ doc/php/examples/php.ini.in	2012-01-12 08:56:26 +
@@ -1,2 +1,3 @@
 enable_dl=On
 extension_dir=@phpExtensionPath@
+include_path=.:@phpIncludePath@
\ No newline at end of file

=== modified file 'doc/php/examples/simple.php.in'
--- doc/php/examples/simple.php.in	2011-08-04 02:14:56 +
+++ doc/php/examples/simple.php.in	2012-01-12 08:56:26 +
@@ -1,6 +1,6 @@
 ?php
 /*
- * Copyright 2006-2008 The FLWOR Foundation.
+ * Copyright 2006-2012 The FLWOR Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the License);
  * you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-require '@phpPath@/zorba_api_wrapper.php';
+require '@phpPath@/Zorba/zorba_api_wrapper.php';
 
 function example_1(Zorba $aZorba)
 {

=== added file 'doc/php/examples/test.php.in'
--- doc/php/examples/test.php.in	1970-01-01 00:00:00 +
+++ doc/php/examples/test.php.in	2012-01-12 08:56:26 +
@@ -0,0 +1,120 @@
+?php
+/*
+ * Copyright 2006-2012 The FLWOR Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language 

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-12 Thread William Candillon
This new proposal is removing unwanted tabs.
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/88315
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-12 Thread Matthias Brantner
I'm fine with it now. Before merging, please make sure the change is contained 
in the ChangeLog. Also, don't mention the obsolete comment in the description 
or commit message - Revert bogus change in swig/php/generate_proxy.php.in 
(renaming of libPrefix to prefix)..

As an aside, importQueryFromURI still allows file system access only. I saw 
that the comment mentions that but it's still strange.
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/88315
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-11 Thread William Candillon
William Candillon has proposed merging lp:~zorba-coders/zorba/phpapi into 
lp:zorba.

Requested reviews:
  Rodolfo Ochoa (rodolfo-ochoa)
  David Graf (davidagraf)
  Matthias Brantner (matthias-brantner)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/88160

This merge adds the PHP API that was introduced at the PHP Tour 2011.
It contains a test for it (php2).

From the last merge proposal, the following things have been done:
- Revert bogus change in  swig/php/generate_proxy.php.in (renaming of libPrefix 
to prefix).
- Introduce a STD Iterator for streaming results.
- Make the parseXML() method private.
- Improve importQueryFromURI

The two key tests are: 
- php1
- php2


-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/88160
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'doc/php/CMakeLists.txt'
--- doc/php/CMakeLists.txt	2011-06-20 12:44:21 +
+++ doc/php/CMakeLists.txt	2012-01-11 09:30:31 +
@@ -1,4 +1,4 @@
-# Copyright 2006-2008 The FLWOR Foundation.
+# Copyright 2006-2012 The FLWOR Foundation.
 # 
 # Licensed under the Apache License, Version 2.0 (the License);
 # you may not use this file except in compliance with the License.

=== modified file 'doc/php/examples/CMakeLists.txt'
--- doc/php/examples/CMakeLists.txt	2011-08-19 00:03:31 +
+++ doc/php/examples/CMakeLists.txt	2012-01-11 09:30:31 +
@@ -1,4 +1,4 @@
-# Copyright 2006-2008 The FLWOR Foundation.
+# Copyright 2006-2012 The FLWOR Foundation.
 # 
 # Licensed under the Apache License, Version 2.0 (the License);
 # you may not use this file except in compliance with the License.
@@ -20,14 +20,21 @@
   MESSAGE(STATUS PHP Path: ${phpPath})
   SET(phpExtensionPath ${CMAKE_BINARY_DIR}/swig/php)
   MESSAGE(STATUS PHP Extension Path:  ${phpExtensionPath})
+  SET(phpIncludePath ${CMAKE_BINARY_DIR}/swig/php)
+  MESSAGE(STATUS PHP Include Path:  ${phpExtensionPath})
   CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/php.ini.in ${CMAKE_CURRENT_BINARY_DIR}/php.ini)
   MESSAGE(STATUS Configuration file:  ${CMAKE_CURRENT_BINARY_DIR}/php.ini)
   CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/simple.php.in ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
   MESSAGE(STATUS Simple configuration file:  ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
-  ADD_TEST(php ${PHP5_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
+  CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/test.php.in ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  MESSAGE(STATUS PHP test  file configured:  ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  ADD_TEST(php1 ${PHP5_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
   MESSAGE(STATUS Installing:  ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
-  
-  INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/simple.php
+  ADD_TEST(php2 ${PHP5_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  MESSAGE(STATUS Installing:  ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  
+  
+  INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/simple.php ${CMAKE_CURRENT_BINARY_DIR}/test.php
   COMPONENT php_examples
   DESTINATION
   share/doc/zorba-${ZORBA_MAJOR_NUMBER}.${ZORBA_MINOR_NUMBER}.${ZORBA_PATCH_NUMBER}/php/examples)

=== modified file 'doc/php/examples/php.ini.in'
--- doc/php/examples/php.ini.in	2009-10-30 16:34:37 +
+++ doc/php/examples/php.ini.in	2012-01-11 09:30:31 +
@@ -1,2 +1,3 @@
 enable_dl=On
 extension_dir=@phpExtensionPath@
+include_path=.:@phpIncludePath@
\ No newline at end of file

=== modified file 'doc/php/examples/simple.php.in'
--- doc/php/examples/simple.php.in	2011-08-04 02:14:56 +
+++ doc/php/examples/simple.php.in	2012-01-11 09:30:31 +
@@ -1,6 +1,6 @@
 ?php
 /*
- * Copyright 2006-2008 The FLWOR Foundation.
+ * Copyright 2006-2012 The FLWOR Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the License);
  * you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-require '@phpPath@/zorba_api_wrapper.php';
+require '@phpPath@/Zorba/zorba_api_wrapper.php';
 
 function example_1(Zorba $aZorba)
 {

=== added file 'doc/php/examples/test.php.in'
--- doc/php/examples/test.php.in	1970-01-01 00:00:00 +
+++ doc/php/examples/test.php.in	2012-01-11 09:30:31 +
@@ -0,0 +1,120 @@
+?php
+/*
+ * Copyright 2006-2012 The FLWOR Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language 

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-10 Thread Matthias Brantner
Review: Needs Fixing

Here are some more comments and questions:

* Copyright 2006-2008 The FLWOR Foundation.
= * Copyright 2006-2012 The FLWOR Foundation.

* Iterate over an instance of the XML Data Model (i.e, a sequence of items).
* This class implements the SPL Iterator interface.

You can only iterate over a sequence of instances of the XDM. The sequence
is not an instance by itself.

* The XQueryProcessor class allows to invoke
* a href=http://www.zorba-xquery.com;Zorba XQuery Processor/a.

to invoke _the_ ...

* Instruction to install the extension can be found at a href=/a.

Instruction_s_

* Shutdowns

Shuts down

* In the following code snippet, the following code snippets imports and 
execute an emHello World/em query:

confusing sentence

* Import a query to execute from its filename.

Import a query to execute from a file with the given name.

* $xquery-importQueryiFromURI('hello_world.xq');

$xquery-importQueryFromURI('hello_world.xq');


* Filename of the query to execute.

Filename containing the query to execute.

* Set value for an external variable.

Set a value for an external variable.

* The following code snippet sets the value of the variable
* em$i/em with em1/em.

The following code snippet sets the value of the variable
em$i/em to em1/em with type xs:integer.



* The following code snippet sets the value of the variable em$i/em in
* the local namespace with the value em1/em.

The following code snippet sets the value of the variable em$i/em in
the local namespace to the value em1/em.

getIterator and compile() don't have comments. Also, the indentation of 
compile() and getItem() seem to be broken

Why do you repeat the conversion rules from setVariable in the comment of 
getItem. Why does one rule include SimpleXMLElement and the other one doesn't?


Did you drop the streaming execution for execute()? If so, why?
-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/87856
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-07 Thread William Candillon
William Candillon has proposed merging lp:~zorba-coders/zorba/phpapi into 
lp:zorba.

Requested reviews:
  Matthias Brantner (matthias-brantner)
  David Graf (davidagraf)
  Rodolfo Ochoa (rodolfo-ochoa)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/87856

This merge adds the PHP API that was introduced at the PHP Tour 2011.
It contains a test for it (php2).

From the last merge proposal, the following things have been done:
- Revert bogus change in  swig/php/generate_proxy.php.in (renaming of libPrefix 
to prefix).
- Introduce a STD Iterator for streaming results.
- Make the parseXML() method private.
- Improve importQueryFromURI

The two key tests are: 
- php1
- php2


-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/87856
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'doc/php/examples/CMakeLists.txt'
--- doc/php/examples/CMakeLists.txt	2011-08-19 00:03:31 +
+++ doc/php/examples/CMakeLists.txt	2012-01-07 17:52:25 +
@@ -20,14 +20,21 @@
   MESSAGE(STATUS PHP Path: ${phpPath})
   SET(phpExtensionPath ${CMAKE_BINARY_DIR}/swig/php)
   MESSAGE(STATUS PHP Extension Path:  ${phpExtensionPath})
+  SET(phpIncludePath ${CMAKE_BINARY_DIR}/swig/php)
+  MESSAGE(STATUS PHP Include Path:  ${phpExtensionPath})
   CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/php.ini.in ${CMAKE_CURRENT_BINARY_DIR}/php.ini)
   MESSAGE(STATUS Configuration file:  ${CMAKE_CURRENT_BINARY_DIR}/php.ini)
   CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/simple.php.in ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
   MESSAGE(STATUS Simple configuration file:  ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
-  ADD_TEST(php ${PHP5_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
+  CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/test.php.in ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  MESSAGE(STATUS PHP test  file configured:  ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  ADD_TEST(php1 ${PHP5_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
   MESSAGE(STATUS Installing:  ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
-  
-  INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/simple.php
+  ADD_TEST(php2 ${PHP5_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  MESSAGE(STATUS Installing:  ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  
+  
+  INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/simple.php ${CMAKE_CURRENT_BINARY_DIR}/test.php
   COMPONENT php_examples
   DESTINATION
   share/doc/zorba-${ZORBA_MAJOR_NUMBER}.${ZORBA_MINOR_NUMBER}.${ZORBA_PATCH_NUMBER}/php/examples)

=== modified file 'doc/php/examples/php.ini.in'
--- doc/php/examples/php.ini.in	2009-10-30 16:34:37 +
+++ doc/php/examples/php.ini.in	2012-01-07 17:52:25 +
@@ -1,2 +1,3 @@
 enable_dl=On
 extension_dir=@phpExtensionPath@
+include_path=.:@phpIncludePath@
\ No newline at end of file

=== modified file 'doc/php/examples/simple.php.in'
--- doc/php/examples/simple.php.in	2011-08-04 02:14:56 +
+++ doc/php/examples/simple.php.in	2012-01-07 17:52:25 +
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-require '@phpPath@/zorba_api_wrapper.php';
+require '@phpPath@/Zorba/zorba_api_wrapper.php';
 
 function example_1(Zorba $aZorba)
 {

=== added file 'doc/php/examples/test.php.in'
--- doc/php/examples/test.php.in	1970-01-01 00:00:00 +
+++ doc/php/examples/test.php.in	2012-01-07 17:52:25 +
@@ -0,0 +1,122 @@
+?php
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+require '@phpPath@/Zorba/XQueryProcessor.php';
+
+function omitXMLDecl($xml)
+{
+  $xml = str_replace('?xml version=1.0 encoding=UTF-8?', '', $xml);
+  $xml = trim($xml);
+  return $xml;
+}
+
+function assertEquality($test, $reference, $label)
+{
+  $test = omitXMLDecl($test);
+  echo =\n;
+  var_dump($test);
+  var_dump($reference);
+  if($test != $reference) {
+throw new Exception(
+   Test 
+ . $label
+ .  failed. Result:\n
+ . $test
+ . \nDoesn't match reference:\n
+ . $reference
+);
+  }
+}
+/* Test 1 */
+$xquery = new XQueryProcessor();
+$xquery-importQuery('1+1');
+$result = $xquery-execute();
+assertEquality($result, '2', 1+1);
+
+/* Test 2 */
+$query = 'XQ'
+declare variable $foo as xs:string external;
+declare variable $bar as xs:integer external;

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2012-01-06 Thread William Candillon
 - One thing that I don't understand is the relationship with the existing PHP 
 binding.
The low level API enables us to extend/debug the XQueryProcessor API more 
easily.

 - The first three changes in swig/php/generate_proxy.php.in should be 
 reverted (renaming of libPrefix to prefix)
This is fixed in commit 10597.

 - executeToURI is only capable of writing to files. Also, it currently 
 doesn't stream.
This is fixed in commit 10598.

 - importQueryFromURI only works for file URIs.
This is fixed in commit 10600. There is a test for it in commit 10601.

 - The parse functionality should probably be removed. It merges two 
 functionalities which don't really belong together (retrieving of data and 
 parsing xml). The latter can also be done in XQuery. If this philosophy is to 
 push more functionality into XQuery, the parse functionality should be 
 removed or made symmetric to the existing C++ and XQuery data manager APIs.

This is fixed in commit 10598. Unfortunately there two orthogonal things in 
commit 10598.

 - getItem doesn't have a comment and is incomplete. Shouldn't it support 
 more/all XQuery types?
It should support any kind of PHP type. Currently objects are not supported. 
Maybe in the futur we will introduce support for objects.

-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/87718
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/phpapi into lp:zorba

2011-12-24 Thread William Candillon
William Candillon has proposed merging lp:~zorba-coders/zorba/phpapi into 
lp:zorba.

Requested reviews:
  Matthias Brantner (matthias-brantner)
  David Graf (davidagraf)
  Rodolfo Ochoa (rodolfo-ochoa)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/86856

This merge adds the PHP API that was introduced at the PHP Tour 2011.
It contains a test for it (php2).
It also fix issues with the PHP include paths to ease the deployment of the API 
into PHP apps.

The two key tests are: 
- php1
- php2

-- 
https://code.launchpad.net/~zorba-coders/zorba/phpapi/+merge/86856
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'doc/php/examples/CMakeLists.txt'
--- doc/php/examples/CMakeLists.txt	2011-08-19 00:03:31 +
+++ doc/php/examples/CMakeLists.txt	2011-12-24 16:33:26 +
@@ -20,14 +20,21 @@
   MESSAGE(STATUS PHP Path: ${phpPath})
   SET(phpExtensionPath ${CMAKE_BINARY_DIR}/swig/php)
   MESSAGE(STATUS PHP Extension Path:  ${phpExtensionPath})
+  SET(phpIncludePath ${CMAKE_BINARY_DIR}/swig/php)
+  MESSAGE(STATUS PHP Include Path:  ${phpExtensionPath})
   CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/php.ini.in ${CMAKE_CURRENT_BINARY_DIR}/php.ini)
   MESSAGE(STATUS Configuration file:  ${CMAKE_CURRENT_BINARY_DIR}/php.ini)
   CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/simple.php.in ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
   MESSAGE(STATUS Simple configuration file:  ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
-  ADD_TEST(php ${PHP5_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
+  CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/test.php.in ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  MESSAGE(STATUS PHP test  file configured:  ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  ADD_TEST(php1 ${PHP5_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
   MESSAGE(STATUS Installing:  ${CMAKE_CURRENT_BINARY_DIR}/simple.php)
-  
-  INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/simple.php
+  ADD_TEST(php2 ${PHP5_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  MESSAGE(STATUS Installing:  ${CMAKE_CURRENT_BINARY_DIR}/test.php)
+  
+  
+  INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/simple.php ${CMAKE_CURRENT_BINARY_DIR}/test.php
   COMPONENT php_examples
   DESTINATION
   share/doc/zorba-${ZORBA_MAJOR_NUMBER}.${ZORBA_MINOR_NUMBER}.${ZORBA_PATCH_NUMBER}/php/examples)

=== modified file 'doc/php/examples/php.ini.in'
--- doc/php/examples/php.ini.in	2009-10-30 16:34:37 +
+++ doc/php/examples/php.ini.in	2011-12-24 16:33:26 +
@@ -1,2 +1,3 @@
 enable_dl=On
 extension_dir=@phpExtensionPath@
+include_path=.:@phpIncludePath@
\ No newline at end of file

=== modified file 'doc/php/examples/simple.php.in'
--- doc/php/examples/simple.php.in	2011-08-04 02:14:56 +
+++ doc/php/examples/simple.php.in	2011-12-24 16:33:26 +
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-require '@phpPath@/zorba_api_wrapper.php';
+require '@phpPath@/Zorba/zorba_api_wrapper.php';
 
 function example_1(Zorba $aZorba)
 {

=== added file 'doc/php/examples/test.php.in'
--- doc/php/examples/test.php.in	1970-01-01 00:00:00 +
+++ doc/php/examples/test.php.in	2011-12-24 16:33:26 +
@@ -0,0 +1,69 @@
+?php
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+require '@phpPath@/Zorba/XQueryProcessor.php';
+
+function omitXMLDecl($xml)
+{
+  $xml = str_replace('?xml version=1.0 encoding=UTF-8?', '', $xml);
+  $xml = trim($xml);
+  return $xml;
+}
+
+function assertEquality($test, $reference, $label)
+{
+  
+  if($test == $reference) {
+throw new Exception(
+   Test 
+ . $label
+ .  failed. Result:\n
+ . $test
+ . \nDoesn't match reference:\n
+ . $reference
+);
+  }
+}
+/* Test 1 */
+$xquery = new XQueryProcessor();
+$xquery-importQuery('1+1');
+$result = $xquery-execute();
+assertEquality($result, '2', 1+1);
+
+/* Test 2 */
+$query = 'XQ'
+declare variable $foo as xs:string external;
+declare variable $bar as xs:integer external;
+declare variable $doc1 as document-node() external;
+declare variable $doc2 as document-node() external;
+
+$foo, $bar, $doc1, $doc2
+XQ;
+
+$xquery-importQuery($query);
+
+$xquery-setVariable(foo, bar);
+$xquery-setVariable(bar, 3);
+
+$doc = simplexml_load_string('root /');
+$xquery-setVariable(doc1,