Author: Derick Rethans
Date: 2006-10-10 14:56:43 +0200 (Tue, 10 Oct 2006)
New Revision: 3679

Log:
- Implemented FR #8753: Added the 'Base/ezc_bootstrap.php' file which sets up
  the autoload environment for you to facilitate an easier way of starting to
  use the eZ components.

Added:
   trunk/Base/src/ezc_bootstrap.php
Modified:
   trunk/Base/ChangeLog

Modified: trunk/Base/ChangeLog
===================================================================
--- trunk/Base/ChangeLog        2006-10-10 11:16:27 UTC (rev 3678)
+++ trunk/Base/ChangeLog        2006-10-10 12:56:43 UTC (rev 3679)
@@ -6,8 +6,11 @@
   components.
 - Added the ezcBaseInit class that assists you by setting up on-demand
   configurations for objects (most notable useful for singleton classes).
-- Implemented FR #8508: display search paths for the autoload files in case of
+- Implemented FR #8508: Display search paths for the autoload files in case of
   a missing class.
+- Implemented FR #8753: Added the 'Base/ezc_bootstrap.php' file which sets up
+  the autoload environment for you to facilitate an easier way of starting to
+  use the eZ components.
 
 
 1.1.1 - Monday 28 August 2006

Added: trunk/Base/src/ezc_bootstrap.php
===================================================================
--- trunk/Base/src/ezc_bootstrap.php    2006-10-10 11:16:27 UTC (rev 3678)
+++ trunk/Base/src/ezc_bootstrap.php    2006-10-10 12:56:43 UTC (rev 3679)
@@ -0,0 +1,22 @@
+<?php
+$dir = dirname( __FILE__ );
+$dirParts = split( '/', $dir );
+
+if ( $dirParts[count( $dirParts ) - 1] === 'src' )
+{
+    require 'Base/src/base.php'; // svn, bundle
+}
+else if ( $dirParts[count( $dirParts ) - 2] === 'ezc' )
+{
+    require 'ezc/Base/base.php'; // pear
+}
+else
+{
+    die( "Your environment isn't properly set-up. Please refer to the eZ 
components documentation at http://components.ez.no/doc ." );
+}
+
+function __autoload( $className )
+{
+       ezcBase::autoload( $className );
+}
+?>


Property changes on: trunk/Base/src/ezc_bootstrap.php
___________________________________________________________________
Name: svn:eol-style
   + native

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

Reply via email to