PHP Classes

File: tests/bootstrap.php

Recommend this page to a friend!
  Classes of Daniel Costa   Dreamhost   tests/bootstrap.php   Download  
File: tests/bootstrap.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Dreamhost
Manage Dreamhost hosting accounts using its API
Author: By
Last change: Update of tests/bootstrap.php
Date: 1 month ago
Size: 1,561 bytes


Class file image Download
<?php /** a Courtesy of Respect/Foundation */


$paths = explode(PATH_SEPARATOR,get_include_path());
$paths[] = trim(`pear config-get php_dir`);

// See if composer is present then it should be picked up too
if (file_exists(dirname(__DIR__).'/vendor/composer')) {
$map = require dirname(__DIR__).'/vendor/composer/autoload_namespaces.php';
    foreach (
$map as $path)
$paths[] = $path;

array_unshift($paths, dirname(__DIR__) .'/src');
set_include_path(implode(PATH_SEPARATOR, array_unique($paths)));

/** Autoloader that implements the PSR-0 spec for interoperability between PHP software. */
$className) {
        if (!isset(
$composerClassmap) && file_exists(dirname(__DIR__).'/vendor/composer'))
$composerClassmap = require dirname(__DIR__).'/vendor/composer/autoload_classmap.php';
// Also consider composer classMap of course
if (isset($composerClassmap[$className]))
            return require

$fileParts = explode('\\', ltrim($className, '\\'));

        if (
false !== strpos(end($fileParts), '_'))
array_splice($fileParts, -1, 1, explode('_', current($fileParts)));

$file = implode(DIRECTORY_SEPARATOR, $fileParts) . '.php';

        foreach (
explode(PATH_SEPARATOR, get_include_path()) as $path) {
            if (
file_exists($path = $path . DIRECTORY_SEPARATOR . $file))
                return require