[ Index ]

PHP Cross Reference of MantisBT

title

Body

[close]

/library/ezc/Base/src/ -> ezc_bootstrap.php (source)

   1  <?php
   2  /**
   3   * Include file that can be used for a quick setup of the eZ Components.
   4   *
   5   * @copyright Copyright (C) 2005-2009 eZ Systems AS. All rights reserved.
   6   * @license http://ez.no/licenses/new_bsd New BSD License
   7   * @version 1.8
   8   * @filesource
   9   * @package Base
  10   * @access private
  11   */
  12  $dir = dirname( __FILE__ );
  13  $dirParts = explode( DIRECTORY_SEPARATOR, $dir );
  14  
  15  if ( $dirParts[count( $dirParts ) - 1] === 'src' )
  16  {
  17      $baseDir = join( DIRECTORY_SEPARATOR, array_slice( $dirParts, 0, -2 ) );
  18      require $baseDir . '/Base/src/base.php'; // svn, bundle
  19  }
  20  else if ( $dirParts[count( $dirParts ) - 2] === 'ezc' )
  21  {
  22      $baseDir = join( DIRECTORY_SEPARATOR, array_slice( $dirParts, 0, -2 ) );
  23      require $baseDir . '/ezc/Base/base.php'; // pear
  24  }
  25  else
  26  {
  27      die( "Your environment isn't properly set-up. Please refer to the eZ components documentation at http://components.ez.no/doc ." );
  28  }
  29  
  30  /**
  31   * Implements the __autoload mechanism for PHP - which can only be done once
  32   * per request.
  33   *
  34   * @param string $className  The name of the class that should be loaded.
  35   */
  36  function __autoload( $className )
  37  {
  38      ezcBase::autoload( $className );
  39  }
  40  ?>


Generated: Thu Jul 28 15:48:31 2011 Cross-referenced by PHPXref 0.7