[svn-components] 7404 - in /trunk/PersistentObjectDatabaseSchemaTiein: ChangeLog docs/tutorial.txt

2008-02-19 Thread Tobias Schlitt
Author: ts
Date: Tue Feb 19 09:50:58 2008
New Revision: 7404

Log:
- Fixed issue #12562: PersistentObjectDatabaseSchemaTiein tutorial is 
  outdated.
# Based on a patch by James Pic. Thanks for helping!

Modified:
trunk/PersistentObjectDatabaseSchemaTiein/ChangeLog
trunk/PersistentObjectDatabaseSchemaTiein/docs/tutorial.txt

Modified: trunk/PersistentObjectDatabaseSchemaTiein/ChangeLog
==
--- trunk/PersistentObjectDatabaseSchemaTiein/ChangeLog [iso-8859-1] (original)
+++ trunk/PersistentObjectDatabaseSchemaTiein/ChangeLog [iso-8859-1] Tue Feb 19 
09:50:58 2008
@@ -3,6 +3,8 @@
 
 - Fixed issue #12022: PersistentObjectDatabaseSchemaTiein not passing it's
   tests.
+- Fixed issue #12562: PersistentObjectDatabaseSchemaTiein tutorial is 
+  outdated.
 
 
 1.2 - Monday 02 July 2007

Modified: trunk/PersistentObjectDatabaseSchemaTiein/docs/tutorial.txt
==
--- trunk/PersistentObjectDatabaseSchemaTiein/docs/tutorial.txt [iso-8859-1] 
(original)
+++ trunk/PersistentObjectDatabaseSchemaTiein/docs/tutorial.txt [iso-8859-1] 
Tue Feb 19 09:50:58 2008
@@ -7,9 +7,9 @@
 
 
 The PersistentObjectDatabaseSchemaTiein component allows you to generate 
-template PersistentObject definition files from a database structure or a
-DatabaseSchema schema file. You will most likely have to adjust the
-PersistentObject definitions afterwards.
+template PersistentObject definition files and php classes from a database
+structure or a DatabaseSchema schema file. You will most likely have to
+adjust the PersistentObject definitions afterwards.
 
 For more information regarding PersistentObject definition files, please refer
 to the API documentation for ezcPersistentObjectDefinition. Details on
@@ -20,10 +20,13 @@
 
 ::
 
-$ php rungenerator.php -s string -f string [-h] [--] target_directory
+$ PersistentObjectDatabaseSchemaTiein/src/rungenerator.php -s string \
+  -f string [-o] [-p string] [-h] [--] string:def dir \
+  [string:class dir]
 
 The component contains an executable script, which can be called using the PHP
-command line interpreter (CLI). You have to provide two options:
+command line interpreter (CLI). You have to provide at least the following two
+options and the def dir argument.
 
 -s / --source string
   This option determines the source DatabaseSchema file from which to generate
@@ -33,15 +36,25 @@
   Examples are 'xml' and 'array'. For a full list of valid formats, please
   refer to the `DatabaseSchema API`_ documentation.
 
+The def dir argument defines where the generated PersistentObject
+definitions are stored. The optional class dir argument can be used to
+define another directory, where class stubs for the generated defintions are
+created in. Additional options that might be useful are:
+ 
+-o / --overwrite
+  If this option is set, files will be overwriten if they alreday exist. The
+  default behaviour is not to overwrite any files.
+-p / --prefix string
+  Using this option you can define a unique prefix that will be prepended to
+  all class names, and class file names, if appliable.
+
 .. _`DatabaseSchema API`: classtrees_DatabaseSchema.html
 
-There is also a help option available that can be accessed with -h or 
---help. 
+The -h / --help option gives you some information on these options and
+arguments, too.
 
-The 'target_directory' argument specifies the directory where the
-PersistentObject definitions are stored. Make sure that script can write to
-this target directory. 
- 
+Make sure that the script can write to its target directories in respect to
+permissions and accessability.
 
 Usage
 =
@@ -61,10 +74,10 @@
 Once you have a valid DatabaseSchema file, you should create a directory
 where your PersistentObject definitions will be stored. Then you can use the
 rungenerator.php script to create the template definition files. Use the 
following
-command::
+command ::
 
 $ php PersistentObjectDatabaseSchemaTiein/rungenerator.php \
--s path/to/schema.file -f array 
path/to/persistentobject/definition/dir/
+  -s path/to/schema.file -f array path/to/persistentobject/definition/dir/
 
 You have to replace the paths according to the example. The -s parameter
 defines where the DatabaseSchema definition file can be found. The -f option
@@ -73,30 +86,40 @@
 call specifies the target directory to store the generated PersistentObject
 definitions.
 
-Customizing definitions
-===
+It is also possible to generate class stubs for the defined persistent objects
+at the same time by specifying the class dir argument. To do so, create a
+directory where your classes will be stored and add it to the command ::
+
+$ php PersistentObjectDatabaseSchemaTiein/rungenerator.php \
+  -s path/to/schema.file -f array path/to/definition/dir/ \
+  path/to/classes/dir/
+
+Customizing 

[svn-components] 7406 - /trunk/Feed/src/modules/dublincore_module.php

2008-02-19 Thread Alexandru Stanoi
Author: as
Date: Tue Feb 19 10:09:47 2008
New Revision: 7406

Log:
- Fixed typo.

Modified:
trunk/Feed/src/modules/dublincore_module.php

Modified: trunk/Feed/src/modules/dublincore_module.php
==
--- trunk/Feed/src/modules/dublincore_module.php [iso-8859-1] (original)
+++ trunk/Feed/src/modules/dublincore_module.php [iso-8859-1] Tue Feb 19 
10:09:47 2008
@@ -142,7 +142,7 @@
  ) );
 
 /**
- * Constructs a new ezcFeedContentModule object.
+ * Constructs a new ezcFeedDublinCoreModule object.
  *
  * @param string $level The level of the data container ('feed' or 'item')
  */


-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components


[svn-components] 7407 - /experimental/MvcTools/design/design.txt

2008-02-19 Thread Tobias Schlitt
Author: ts
Date: Tue Feb 19 11:41:34 2008
New Revision: 7407

Log:
- Rephrasing and spell check.

Modified:
experimental/MvcTools/design/design.txt

Modified: experimental/MvcTools/design/design.txt
==
--- experimental/MvcTools/design/design.txt [iso-8859-1] (original)
+++ experimental/MvcTools/design/design.txt [iso-8859-1] Tue Feb 19 11:41:34 
2008
@@ -1,5 +1,5 @@
-eZ component: MvcTools, Design Draft
-
+eZ component: MvcTools, Design
+~~
 
 :Author: James Pic, Kore Nordmann, Thomas Nunninger
 :Revision: $Rev$
@@ -20,34 +20,49 @@
 ===
 
 Because of the variaty of protocols and formats that a modern PHP application
-should handle, this MVC implementation will provide an abstraction to input
+should handle, this MVC implementation will provide an abstraction for input
 and output of controllers. Besides that, a few tieins will be provided.
 
 The main classes of this component are ezcMvcInput and ezcMvcOutput, which
-are respectively the abstract input object for the controller and the
-abstract output object that the controller should return.
-
-Additionally, a collection of interfaces will be provided for routing,
-request-parsing, view-managing and view-handling.
+represent the abstract input object for a controller and the abstract output
+object that the controller returns.
+
+Beside these concrete classes a collection of interfaces will be provided for
+routing, request-parsing, view-managing and view-handling. This will allow the
+user of this component to build his own MVC_ on basis of the components
+buildingblocks and to adjust it to his needs.
+
+Very basic implementations of these interfaces will be shipped with the
+component, that can be used for very basic applications and are mainly meant
+as reference implementations. In future tie-ins with other eZ Components might
+be provided, that ship with more advanced impelementations.
 
 Layers
 ==
 
-The component is basically devided into 4 layers: the request parsing layer
-is represented by an interface. An instance of such a class is responsible
-for parsing the request and making an abstract input object.
-
-The routing layer is in charge of selecting the controller(s) and the view
-manager, using the abstract input object.
-
-Controllers are the third layers, at this level : classes process the
-request and select the data to use for making the response : controllers
-accept the abstract input object and are responsible for returning an
-abstract output object.
-
-View management is the final layer, using on the output and input objects :
-the view-manager use the view-handler(s) to create the formatted final 
-response to send to the client.
+The component is devided into 4 layers:
+
+The request parsing layer is represented by the ezcMvcRequestParser interface.
+An instance of a implementing this interface is responsible for parsing an
+incoming request and creating an instance of ezcMvcInput from it. This object
+will encapsulate the complete request data, independent from the protocol and
+format used for the request.
+
+The routing layer, represented by the ezcMvcRouter interface, is in charge of
+selecting the correct controller(s) and the view manager to handle the
+request, based on the ezcMvcInput object it received.
+
+Controllers represent the third layer. At this level: Classes process the
+request, based on the ezcMvcInput object they received, and select the data to
+be used to create a response. Controllers only accept an instance of
+ezcMvcInput as input and and are responsible for returning an instance of
+ezcMvcOutput, encapsulating all data necessary to render the response.
+
+View management is the final layer, which is based on the incoming ezcMvcInput
+object and the ezcMvcOutput object created by the controllers. An instance of
+a class implementing the ezcMvcViewManager interface uses one or more
+instances of ezcMvcViewHandler to create the actual response and to send it to
+the client.
 
 Classes
 ===
@@ -56,71 +71,77 @@
 ---
 
 The ezcMvcRequestParser interface has to be implemented by classes that will
-parse the request and create an ezcMvcInput object.
+parse a request and create an ezcMvcInput object.
 
 ezcMvcInput
 ---
 
-This object encapsulates the client-request, abstracting the request
-protocol.
-
-It's important to separate the object's properties from the request variables
-in the class facade.
-This class implements Iterator, ArrayAccess and Countable for request-values,
-and public properties will be used for the object's variables.
+An instance of this class encapsulates a client-request, abstracting from the
+request protocol and format.
+
+To seperate the class properties of the input object, containing settings and
+the object state, from the request data it carries, the class will provide an
+array-like $data 

[svn-components] 7409 - /experimental/MvcTools/design/design.txt

2008-02-19 Thread Tobias Schlitt
Author: ts
Date: Tue Feb 19 12:05:56 2008
New Revision: 7409

Log:
- Added Open issues section.

Modified:
experimental/MvcTools/design/design.txt

Modified: experimental/MvcTools/design/design.txt
==
--- experimental/MvcTools/design/design.txt [iso-8859-1] (original)
+++ experimental/MvcTools/design/design.txt [iso-8859-1] Tue Feb 19 12:05:56 
2008
@@ -217,18 +217,37 @@
 
 $router-run();
 
+Open issues
+===
+
+Definition of the ezcMvcController interface
+
+
+The description and definition of the ezcMvcController interface should be
+reworked. The expected behaviour and API of classes implementing this
+interface should be described in more details.
+
 Should the router be selected by a router manager?
 --
 
-The router could be selected by a router-manager.
-In that case, some routing mechanism should be in the router manager.
-Router-manager shouldn't be implemented, routers should be factorized instead.
+The router could be selected by a router-manager.  In that case, some routing
+mechanism should be in the router manager.  Router-manager shouldn't be
+implemented, routers should be factorized instead.
 
 Should the MVC implementation take care of actions/sub-controllers?
 ---
 
-Controllers have a method looking like : run( ezcMvcInput $input )
-It's up to the controller to figure it's action using $input.
+Controllers have a method looking like : run( ezcMvcInput $input ) It's up to
+the controller to figure it's action using $input.
+
+Shipping of example-implementations
+---
+
+The section `Design overview`_ states that very basic implementations of the
+provided interfaces should be shipped with the component. It must be decided
+if these implementations should be part of the components source code itself
+or should deal as documentation (and therefore reside in the docs/ directory
+instead of src/).
 
 
 ..


-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components


[svn-components] 7405 - /trunk/PersistentObjectDatabaseSchemaTiein/docs/tutorial.txt

2008-02-19 Thread Tobias Schlitt
Author: ts
Date: Tue Feb 19 10:00:00 2008
New Revision: 7405

Log:
- Removed explicit class links.

Modified:
trunk/PersistentObjectDatabaseSchemaTiein/docs/tutorial.txt

Modified: trunk/PersistentObjectDatabaseSchemaTiein/docs/tutorial.txt
==
--- trunk/PersistentObjectDatabaseSchemaTiein/docs/tutorial.txt [iso-8859-1] 
(original)
+++ trunk/PersistentObjectDatabaseSchemaTiein/docs/tutorial.txt [iso-8859-1] 
Tue Feb 19 10:00:00 2008
@@ -141,13 +141,8 @@
 
 
 For more information, see the API documentation of
-ezcPersistentObjectDefinition_, ezcPersistentObjectProperty_, ezcDbSchema_ and
-ezcDbschemaPersistentWriter_.
-
-.. _ezcPersistentObjectDefinition: 
PersistentObject/ezcPersistentObjectDefinition.html
-.. _ezcPersistentObjectProperty: 
PersistentObject/ezcPersistentObjectProperty.html
-.. _ezcDbSchema: DatabaseSchema/ezcDbSchema.html
-.. _ezcDbSchemaPersistentWriter: 
DatabaseSchema/ezcDbschemaPersistentWriter.html
+ezcPersistentObjectDefinition, ezcPersistentObjectProperty, ezcDbSchema and
+ezcDbschemaPersistentWriter.
 
 
 


-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components


Re: [svn-components] 7404 - in /trunk/PersistentObjectDatabaseSchemaTiein: ChangeLog docs/tutorial.txt

2008-02-19 Thread Derick Rethans
On Tue, 19 Feb 2008, Tobias Schlitt wrote:

  For more information, see the API documentation of
 -ezcPersistentObjectDefinition_, ezcPersistentObjectProperty_,
 -ezcDbSchema_ and ezcDbschemaPersistentWriter_.
 +ezcPersistentObjectDefinition_, ezcPersistentObjectProperty_, ezcDbSchema_ 
 and
 +ezcDbschemaPersistentWriter_.
  
  .. _ezcPersistentObjectDefinition: 
 PersistentObject/ezcPersistentObjectDefinition.html
  .. _ezcPersistentObjectProperty: 
 PersistentObject/ezcPersistentObjectProperty.html

You actually don't have to create links for those, classnames should be 
linked automatically.

regards,
Derick
-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components


[svn-components] 7408 - /trunk/PersistentObject/tests/suite.php

2008-02-19 Thread Tobias Schlitt
Author: ts
Date: Tue Feb 19 12:05:22 2008
New Revision: 7408

Log:
- Removed () from require_once calls.

Modified:
trunk/PersistentObject/tests/suite.php

Modified: trunk/PersistentObject/tests/suite.php
==
--- trunk/PersistentObject/tests/suite.php [iso-8859-1] (original)
+++ trunk/PersistentObject/tests/suite.php [iso-8859-1] Tue Feb 19 12:05:22 2008
@@ -11,32 +11,32 @@
 /**
  * Including the tests
  */
-require_once( 'managers/code_manager_test.php' );
-require_once( 'managers/cache_manager_test.php' );
-require_once( 'managers/multi_manager_test.php' );
+require_once 'managers/code_manager_test.php';
+require_once 'managers/cache_manager_test.php';
+require_once 'managers/multi_manager_test.php';
 
-require_once( 'persistent_session_delete_test.php' );
-require_once( 'persistent_session_find_test.php' );
-require_once( 'persistent_session_load_test.php' );
-require_once( 'persistent_session_misc_test.php' );
-require_once( 'persistent_session_save_test.php' );
+require_once 'persistent_session_delete_test.php';
+require_once 'persistent_session_find_test.php';
+require_once 'persistent_session_load_test.php';
+require_once 'persistent_session_misc_test.php';
+require_once 'persistent_session_save_test.php';
 
-require_once( 'find_iterator_test.php' );
-require_once( 'manual_generator_test.php' );
-require_once( 'native_generator_test.php' );
-require_once( 'persistent_session_instance_test.php' );
-require_once( 'one_to_many_relation_test.php' );
-require_once( 'many_to_one_relation_test.php' );
-require_once( 'one_to_one_relation_test.php' );
-require_once( 'many_to_many_relation_test.php' );
-require_once( 'keyword_test.php' );
-require_once( 'string_identifier_test.php' );
-require_once( 'object_property_test.php' );
-require_once( 'object_id_property_test.php' );
-require_once( 'object_definition_test.php' );
-require_once( 'object_relations_test.php' );
-require_once( 'object_properties_test.php' );
-require_once( 'object_columns_test.php' );
+require_once 'find_iterator_test.php';
+require_once 'manual_generator_test.php';
+require_once 'native_generator_test.php';
+require_once 'persistent_session_instance_test.php';
+require_once 'one_to_many_relation_test.php';
+require_once 'many_to_one_relation_test.php';
+require_once 'one_to_one_relation_test.php';
+require_once 'many_to_many_relation_test.php';
+require_once 'keyword_test.php';
+require_once 'string_identifier_test.php';
+require_once 'object_property_test.php';
+require_once 'object_id_property_test.php';
+require_once 'object_definition_test.php';
+require_once 'object_relations_test.php';
+require_once 'object_properties_test.php';
+require_once 'object_columns_test.php';
 require_once 'property_date_time_converter_test.php';
 
 require_once 'database_type_test.php';


-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components


[svn-components] 7413 - /experimental/MvcTools/design/design.txt

2008-02-19 Thread James Pic
Author: jpic
Date: Tue Feb 19 13:33:59 2008
New Revision: 7413

Log:
- Added methods definitions for interfaces.

Modified:
experimental/MvcTools/design/design.txt

Modified: experimental/MvcTools/design/design.txt
==
--- experimental/MvcTools/design/design.txt [iso-8859-1] (original)
+++ experimental/MvcTools/design/design.txt [iso-8859-1] Tue Feb 19 13:33:59 
2008
@@ -73,6 +73,13 @@
 The ezcMvcRequestParser interface has to be implemented by classes that will
 parse a request and create an ezcMvcInput object.
 
+Methods::
+
+  /**
+   * Parses the request and creates an input object.
+   */
+  ezcMvcInput public function createInput()
+
 ezcMvcInput
 ---
 
@@ -89,7 +96,6 @@
 This object encapsulates the result of a controller, abstracting from the
 actual response protocol. The output object will be modelled similar to the
 input variant, described above.
-
 
 ezcMvcRouter
 
@@ -100,6 +106,26 @@
 implementation of ezcMvcViewManager, instantiate it and submit the collected
 responses to be handled by it.
 
+Methods::
+
+  /**
+   * Instanciate a router, parses input and selects the controllers and
+   * view-manager.
+   */
+  ezcMvcRouter public function __construct( $input )
+
+  /**
+   * Returns the list of controllers.
+   *
+   * @see Encapsulate controller multiplicity ?
+   */
+  ? public function getControllers()
+
+  /**
+   * Returns the view-manager.
+   */
+  ezcMvcViewManager public function getViewManager()
+
 ezcMvcViewManager
 -
 
@@ -107,6 +133,32 @@
 coordinating the rendering of ezcMvcOutput instances into a format acceptable
 for the response protocol. The rendering itself is done by instances of
 ezcViewHandler.
+
+Methods::
+
+  /**
+   * This method should use the list of controllers, run it, select the view
+   * handlers and send the response to the client.
+   *
+   * @param $controllers array|object Array of controllers or an object
+   *  wrapping them ?
+   * @see Encapsulate controller multiplicity ?
+   */
+  void public function handle( ? $controllers )
+
+  /**
+   * Create and return the response string.
+   *
+   * Returns a string or an ezcMvcResponseBody ?
+   */
+  ? public function createResponseBody( ? $controllers )
+
+  /**
+   * Create and return the response header variables.
+   *
+   * Return an array of key=values or an ezcMvcResponseHeaders ?
+   */
+  ? public function createResponseHeader( ? $controllers )
 
 ezcMvcViewHandler
 -
@@ -117,6 +169,22 @@
 different view handlers and to merge their output to a consistent response
 string.
 
+Methods::
+
+  /**
+   * Create and return the response string.
+   *
+   * Returns a string or an ezcMvcResponseBody ?
+   */
+  ? public function createResponseBody( ? $controllers )
+
+  /**
+   * Create and return the response header variables.
+   *
+   * Return an array of key=values or an ezcMvcResponseHeaders ?
+   */
+  ? public function createResponseHeader( ? $controllers )
+
 ezcMvcController
 
 
@@ -151,7 +219,7 @@
 $parser = new ezcMvcUrlUserInputRequestParser();
 
 // The parser returns an instance of ezcMvcInput.
-$input  = $parser-getInput();
+$input  = $parser-createInput();
 
 // ezcMvcUrlUserInputRouter implements ezcMvcRouter
$router = new ezcMvcUrlUserInputRouter( $input );


-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components


[svn-components] 7410 - /experimental/MvcTools/design/design.txt

2008-02-19 Thread James Pic
Author: jpic
Date: Tue Feb 19 12:40:40 2008
New Revision: 7410

Log:
Added open-issue about dependencies paradox.

Modified:
experimental/MvcTools/design/design.txt

Modified: experimental/MvcTools/design/design.txt
==
--- experimental/MvcTools/design/design.txt [iso-8859-1] (original)
+++ experimental/MvcTools/design/design.txt [iso-8859-1] Tue Feb 19 12:40:40 
2008
@@ -249,6 +249,12 @@
 or should deal as documentation (and therefore reside in the docs/ directory
 instead of src/).
 
+Tiein components
+
+
+ezcMvcToolsTemplateTiein should include an extension with a function to
+generate urls for ezcMvcToolsUrlTiein; how to handle this dependency paradox?
+
 
 ..
Local Variables:


-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components


[svn-components] 7411 - in /trunk/Debug: src/tools/dump.php tests/variable_dump_tool_test.php

2008-02-19 Thread Tobias Schlitt
Author: ts
Date: Tue Feb 19 13:19:00 2008
New Revision: 7411

Log:
- Make ezcDebugVariableDumpTool respect $maxDepth parameter.

Modified:
trunk/Debug/src/tools/dump.php
trunk/Debug/tests/variable_dump_tool_test.php

Modified: trunk/Debug/src/tools/dump.php
==
--- trunk/Debug/src/tools/dump.php [iso-8859-1] (original)
+++ trunk/Debug/src/tools/dump.php [iso-8859-1] Tue Feb 19 13:19:00 2008
@@ -81,26 +81,38 @@
  */
 private static function dumpArray( array $arg, $maxData, $maxChildren, 
$maxDepth )
 {
-$max = min( count( $arg ), $maxChildren );
-
-$results = array();
-reset( $arg );
-for ( $i = 0; $i  $max; ++$i )
-{
-$results[] =
-self::dumpVariable( key( $arg ), $maxData, $maxChildren, 
$maxDepth - 1 )
-. ' = '
-. self::dumpVariable( current( $arg ), $maxData, $maxChildren, 
$maxDepth - 1 );
-next( $arg );
-}
-
-if ( $max  count( $arg ) )
-{
-$results[] = '...';
-}
+$arrayContent = '';
+
+if ( $maxDepth != 0 )
+{
+$max = min( count( $arg ), $maxChildren );
+
+$results = array();
+reset( $arg );
+for ( $i = 0; $i  $max; ++$i )
+{
+$results[] =
+self::dumpVariable( key( $arg ), $maxData, $maxChildren, 
$maxDepth - 1 )
+. ' = '
+. self::dumpVariable( current( $arg ), $maxData, 
$maxChildren, $maxDepth - 1 );
+next( $arg );
+}
+
+if ( $max  count( $arg ) )
+{
+$results[] = '...';
+}
+
+$arrayContent = implode( ', ', $results );
+}
+else
+{
+$arrayContent = '...';
+}
+
 
 return sprintf(
-'array (%s)', implode( ', ', $results )
+'array (%s)', $arrayContent
 );
 }
 
@@ -118,31 +130,42 @@
 private static function dumpObject( $arg, $maxData, $maxChildren, 
$maxDepth )
 {
 $refObj   = new ReflectionObject( $arg );
-$refProps = $refObj-getProperties();
-
-$max = min(
-count( $refProps ),
-$maxChildren
-);
-
-$results = array();
-reset( $refProps );
-for( $i = 0; $i  $max; $i++ )
-{
-$refProp = current( $refProps );
-$results[] = sprintf(
-'%s $%s = %s',
-self::getPropertyVisibility( $refProp ),
-$refProp-getName(),
-self::getPropertyValue( $refProp, $arg, $maxDepth - 1 )
+
+$objectContent = '';
+if ( $maxDepth != 0 )
+{
+$refProps = $refObj-getProperties();
+
+$max = min(
+count( $refProps ),
+$maxChildren
 );
-next( $refProps );
-}
+$results = array();
+
+reset( $refProps );
+for( $i = 0; $i  $max; $i++ )
+{
+$refProp = current( $refProps );
+$results[] = sprintf(
+'%s $%s = %s',
+self::getPropertyVisibility( $refProp ),
+$refProp-getName(),
+self::getPropertyValue( $refProp, $arg, $maxDepth - 1 )
+);
+next( $refProps );
+}
+$objectContent = implode( '; ', $results );
+}
+else
+{
+$objectContent = '...';
+}
+
 
 return sprintf(
 'class %s { %s }',
 $refObj-getName(),
-implode( '; ', $results )
+$objectContent
 );
 }
 

Modified: trunk/Debug/tests/variable_dump_tool_test.php
==
--- trunk/Debug/tests/variable_dump_tool_test.php [iso-8859-1] (original)
+++ trunk/Debug/tests/variable_dump_tool_test.php [iso-8859-1] Tue Feb 19 
13:19:00 2008
@@ -137,7 +137,7 @@
 );
 
 $res = EOT
-array (0 = 23, 'foo bar' = array (1 = '293', 2 = 234223, 'foo' = array (0 
= 1, 1 = 2, 2 = 3, 3 = 4, 4 = 5, 5 = array (), 8 = 23, 9 = 'foo', 10 = 
array (0 = 23, 1 = 42))), 1 = 42.23, 'a' = TRUE, 'd' = FALSE, 23 = 
'test', 24 = 'foo bar baz')
+array (0 = 23, 'foo bar' = array (1 = '293', 2 = 234223, 'foo' = array (0 
= 1, 1 = 2, 2 = 3, 3 = 4, 4 = 5, 5 = array (...), 8 = 23, 9 = 'foo', 10 
= array (...))), 1 = 42.23, 'a' = TRUE, 'd' = FALSE, 23 = 'test', 24 = 
'foo bar baz')
 EOT;
 $this-assertEquals(
 $res,


-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components


[svn-components] 7414 - in /trunk/Search/src: ./ abstraction/ exceptions/ handlers/ interfaces/ managers/ structs/

2008-02-19 Thread Derick Rethans
Author: dr
Date: Tue Feb 19 15:03:56 2008
New Revision: 7414

Log:
- Work-in-progress of Search prototype.

Added:
trunk/Search/src/abstraction/
trunk/Search/src/abstraction/query.php   (with props)
trunk/Search/src/abstraction/query_find.php   (with props)
trunk/Search/src/abstraction/query_index.php   (with props)
trunk/Search/src/exceptions/
trunk/Search/src/exceptions/can_not_connect.php   (with props)
trunk/Search/src/exceptions/exception.php   (with props)
trunk/Search/src/handlers/
trunk/Search/src/handlers/solr.php   (with props)
trunk/Search/src/interfaces/
trunk/Search/src/interfaces/definition_manager.php   (with props)
trunk/Search/src/interfaces/handler.php   (with props)
trunk/Search/src/interfaces/index_handler.php   (with props)
trunk/Search/src/managers/
trunk/Search/src/managers/code_manager.php   (with props)
trunk/Search/src/search_autoload.php   (with props)
trunk/Search/src/search_result.php   (with props)
trunk/Search/src/search_session.php   (with props)
trunk/Search/src/search_session_instance.php   (with props)
trunk/Search/src/structs/

Added: trunk/Search/src/abstraction/query.php
==
--- trunk/Search/src/abstraction/query.php (added)
+++ trunk/Search/src/abstraction/query.php [iso-8859-1] Tue Feb 19 15:03:56 2008
@@ -1,0 +1,57 @@
+?php
+/**
+ * File containing the ezcSearchQuery class.
+ *
+ * @package Search
+ * @version //autogentag//
+ * @copyright Copyright (C) 2005-2008 eZ systems as. All rights reserved.
+ * @license http://ez.no/licenses/new_bsd New BSD License
+ */
+
+/**
+ * The ezcSearchQuery class provides the common API for all Query objects.
+ *
+ * Subclasses should provide functionality to build an actual query.
+ *
+ * @package Search
+ * @version //autogentag//
+ * @private
+ */
+abstract class ezcSearchQuery
+{
+/**
+ * A pointer to the search handler to use for this query.
+ *
+ * @var ezcSearchHandler
+ */
+protected $handler;
+
+/**
+ * Constructs a new ezcSearchQuery that works on the handler $handler.
+ *
+ * @param ezcSearchHandler $handler
+ */
+public function __construct( ezcSearchHandler $handler )
+{
+$this-handler = $handler;
+}
+
+/**
+ * Return query string.
+ *
+ * @return string
+ */
+public function __toString()
+{
+return $this-getQuery();
+}
+
+/**
+ * Returns the query string for this query object.
+ *
+ * @throws ezcSearchQueryInvalidException if it was not possible to build 
a valid query.
+ * @return string
+ */
+abstract public function getQuery();
+}
+?

Propchange: trunk/Search/src/abstraction/query.php
--
svn:eol-style = native

Added: trunk/Search/src/abstraction/query_find.php
==
--- trunk/Search/src/abstraction/query_find.php (added)
+++ trunk/Search/src/abstraction/query_find.php [iso-8859-1] Tue Feb 19 
15:03:56 2008
@@ -1,0 +1,303 @@
+?php
+/**
+ * File containing the ezcSearchFindQuery class.
+ *
+ * @package Search
+ * @version //autogentag//
+ * @copyright Copyright (C) 2005-2008 eZ systems as. All rights reserved.
+ * @license http://ez.no/licenses/new_bsd New BSD License
+ */
+
+/**
+ * Class to create select search backend indepentent search queries.
+ *
+ * @package Search
+ * @version //autogentag//
+ * @mainclass
+ */
+class ezcSearchFindQuery extends ezcSearchQuery
+{
+/**
+ * Sort the result ascending.
+ */
+const ASC = 'ASC';
+
+/**
+ * Sort the result descending.
+ */
+const DESC = 'DESC';
+
+/**
+ * Stores the SELECT part of the SQL.
+ *
+ * Everything from 'SELECT' until 'FROM' is stored.
+ * @var string
+ */
+protected $selectString = null;
+
+/**
+ * Stores the FROM part of the SQL.
+ *
+ * Everything from 'FROM' until 'WHERE' is stored.
+ * @var string
+ */
+protected $fromString = null;
+
+/**
+ * Stores the WHERE part of the SQL.
+ *
+ * Everything from 'WHERE' until 'GROUP', 'LIMIT', 'ORDER' or 'SORT' is 
stored.
+ * @var string
+ */
+protected $whereString = null;
+
+/**
+ * Stores the FACET part of SQL
+ *
+ * @var string
+ */
+protected $facetString = null;
+
+/**
+ * Stores the ORDER BY part of the SQL.
+ *
+ * @var string
+ */
+protected $orderString = null;
+
+/**
+ * Stores the LIMIT part of the SQL.
+ *
+ * @var string
+ */
+protected $limitString = null;
+
+/**
+ * Stores the name of last invoked SQL clause method.
+ *
+ * Could be 'select', 'from', 'where', 'group', 'having', 'order', 'limit'
+ * @var string
+ */
+protected $lastInvokedMethod = null;

[svn-components] 7415 - in /trunk/Feed/src/modules: content_module.php dublincore_module.php

2008-02-19 Thread Alexandru Stanoi
Author: as
Date: Tue Feb 19 15:44:35 2008
New Revision: 7415

Log:
- Fixed the types of the properties.

Modified:
trunk/Feed/src/modules/content_module.php
trunk/Feed/src/modules/dublincore_module.php

Modified: trunk/Feed/src/modules/content_module.php
==
--- trunk/Feed/src/modules/content_module.php [iso-8859-1] (original)
+++ trunk/Feed/src/modules/content_module.php [iso-8859-1] Tue Feb 19 15:44:35 
2008
@@ -29,10 +29,11 @@
  * $text = $item-Content-encoded;
  * /code
  *
- * @property string $encoded
- *  Item-level container for text. The text is stored in a 
feed by
- *  applying htmlspecialchars() with ENT_NOQUOTES and restored 
from
- *  a feed with htmlspecialchars_decode() with ENT_NOQUOTES.
+ * @property ezcFeedElement $encoded
+ *  Item-level container for text. The text is stored
+ *  in a feed by applying htmlspecialchars() with
+ *  ENT_NOQUOTES and restored from a feed with
+ *  htmlspecialchars_decode() with ENT_NOQUOTES.
  *
  * @package Feed
  * @version //autogentag//

Modified: trunk/Feed/src/modules/dublincore_module.php
==
--- trunk/Feed/src/modules/dublincore_module.php [iso-8859-1] (original)
+++ trunk/Feed/src/modules/dublincore_module.php [iso-8859-1] Tue Feb 19 
15:44:35 2008
@@ -35,53 +35,62 @@
  * }
  * /code
  *
- * @property string $contributor
- *  An entity responsible for making contributions to the 
resource.
- *  Usually the name of a person, organization or service.
- * @property string $coverage
- *  The spatial or temporal topic of the resource, the spatial
- *  applicability of the resource, or the jurisdiction under 
which
- *  the resource is relevant. A recommended practice is to use 
a
- *  controlled vocabulary such as
- *  [EMAIL PROTECTED] 
http://www.getty.edu/research/tools/vocabulary/tgn/index.html TGN}.
- * @property string $creator
- *  An entity responsible for making the resource.
- *  Usually the name of a person or organization.
- * @property int$date
- *  A point or period of time associated with an event in the
- *  lifecycle of the resource. It is a Unix timestamp, which 
will
- *  be converted to an [EMAIL PROTECTED] 
http://www.w3.org/TR/NOTE-datetime ISO 8601}
- *  date when generating the feed.
- * @property string $description
- *  A description of the resource.
- * @property string $format
- *  The file format, physical medium, or dimensions of the 
resource.
- *  Recommended best practices is to use a controlled 
vocabulary such as the list of
- *  [EMAIL PROTECTED] 
http://www.iana.org/assignments/media-types/ Internet Media Types}
- *  (MIME).
- * @property string $identifier
- *  An unambiguous reference to the resource within a given 
context.
- * @property string $language
- *  A language of the resource.
- *  Recommended best practice is to use a controlled vocabulary
- *  such as [EMAIL PROTECTED] 
http://www.faqs.org/rfcs/rfc4646.html RFC 4646}.
- * @property string $publisher
- *  An entity responsible for making the resource available.
- *  Usually the name of a person, organization or service.
- * @property string $relation
- *  A related resource.
- * @property string $rights
- *  Information about rights held in and over the resource.
- * @property string $source
- *  A related resource from which the described resource is 
derived.
- * @property string $subject
- *  The topic of the resource.
- * @property string $title
- *  The name given to the resource.
- * @property string $type
- *  The nature or genre of the resource.
- *  Recommended best practice is to use a controlled 
vocabulary such as the
- *  [EMAIL PROTECTED] 
http://dublincore.org/documents/dcmi-type-vocabulary/ DCMI Type Vocabulary}
+ * @property ezcFeedElement $contributor
+ *  An entity responsible for making contributions to
+ *  the resource.
+ *  Usually the name of a person, organization or 
service.
+ * @property ezcFeedElement $coverage
+ *  The spatial or temporal topic of the resource, the
+ *  spatial applicability of the resource, or the
+ *  jurisdiction under which the resource is relevant.
+ *