-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBake.php
85 lines (72 loc) · 1.86 KB
/
Bake.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
/**
* Bread PHP Framework (http://github.com/saiv/Bread)
* Copyright 2010-2012, SAIV Development Team <[email protected]>
*
* Licensed under a Creative Commons Attribution 3.0 Unported License.
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2010-2012, SAIV Development Team <[email protected]>
* @link http://github.com/saiv/Bread Bread PHP Framework
* @package Bread
* @since Bread PHP Framework
* @license http://creativecommons.org/licenses/by/3.0/
*/
namespace Bread;
use Bread\Dough\ClassLoader;
require 'Dough' . DIRECTORY_SEPARATOR . 'ClassLoader.php';
/**
* Define a shortcut for DIRECTORY_SEPARATOR
*/
define('DS', DIRECTORY_SEPARATOR);
/**
* Define a namespace separator
*/
define('NAMESPACE_SEPARATOR', "\\");
/**
* Define a shortcut for NAMESPACE_SEPARATOR
*/
define('NS', NAMESPACE_SEPARATOR);
/**
* Define the framework's base directory
*/
if (!defined('BREAD_BASE')) {
define('BREAD_BASE', dirname(__DIR__));
}
/**
* Define the current webroot directory
*/
if (!defined('BREAD_ROOT')) {
define('BREAD_ROOT', getcwd());
}
/**
* Define the default application's directory
*/
if (!defined('BREAD_APPLICATION')) {
define('BREAD_APPLICATION', BREAD_ROOT . DS . "application");
}
/**
* Define the default configuration's directory
*/
if (!defined('BREAD_CONFIGURATION')) {
define('BREAD_CONFIGURATION', BREAD_ROOT . DS . "configuration");
}
/**
* Define the default private directory
*/
if (!defined('BREAD_PRIVATE')) {
define('BREAD_PRIVATE', BREAD_ROOT . DS . "private");
}
/**
* Define the default public directory
*/
if (!defined('BREAD_PUBLIC')) {
define('BREAD_PUBLIC', BREAD_ROOT . DS . "public");
}
foreach (array(
new ClassLoader(__NAMESPACE__, BREAD_BASE),
new ClassLoader(null, BREAD_APPLICATION),
new ClassLoader()
) as $cl) {
$cl->register();
}