annotate vendor/sabre/vobject/tests/bootstrap.php @ 7:430dbd5346f7

vendor sabre as distributed
author Charlie Root
date Sat, 13 Jan 2018 09:06:10 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
1 <?php
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
2
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
3 date_default_timezone_set('UTC');
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
4
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
5 $try = array(
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
6 __DIR__ . '/../vendor/autoload.php',
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
7 __DIR__ . '/../../../autoload.php',
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
8 );
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
9
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
10 foreach($try as $path) {
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
11 if (file_exists($path)) {
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
12 $autoLoader = include $path;
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
13 break;
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
14 }
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
15 }
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
16
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
17 $autoLoader->addPsr4('Sabre\\VObject\\',__DIR__ . '/VObject');
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
18
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
19 if (!defined('SABRE_TEMPDIR')) {
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
20 define('SABRE_TEMPDIR', __DIR__ . '/temp/');
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
21 }
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
22
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
23 if (!file_exists(SABRE_TEMPDIR)) {
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
24 mkdir(SABRE_TEMPDIR);
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
25 }