Blame view

Slim/tests/bootstrap.php 530 Bytes
219b8036   luigser   DEEP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  <?php
  set_include_path(dirname(__FILE__) . '/../' . PATH_SEPARATOR . get_include_path());
  
  // Set default timezone
  date_default_timezone_set('America/New_York');
  
  require_once 'Slim/Slim.php';
  
  // Register Slim's autoloader
  \Slim\Slim::registerAutoloader();
  
  //Register non-Slim autoloader
  function customAutoLoader( $class )
  {
      $file = rtrim(dirname(__FILE__), '/') . '/' . $class . '.php';
      if ( file_exists($file) ) {
          require $file;
      } else {
          return;
      }
  }
  spl_autoload_register('customAutoLoader');