-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlib.inc
109 lines (97 loc) · 2.56 KB
/
lib.inc
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?php
/*
* Created on July 8, 2009
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
// ***********************************************************
// Include this file in the app/config/bootstrap.php to enable
// the code library in your cake application.
// DO NOT EDIT ANYTHING IN THIS FILE.
// ***********************************************************
// Load plugin config files, if they exist:
if(is_dir(APP . 'config' . DS . 'plugins'))
{
$handler = opendir(APP . 'config' . DS . 'plugins');
while ($file = readdir($handler)) {
if ($file != '.' && $file != '..' && $file != 'CVS' && $file != '.svn')
require_once(APP.'config'.DS.'plugins'.DS .$file);
}
closedir($handler);
}
// Save path of libraries, for includes.
$LIBPATHS[] = dirname(__FILE__);
foreach($LIBPATHS as $libPath):
if (function_exists('ini_set')) {
ini_set('include_path', ini_get('include_path') . ";" . $libPath);
}
else {
//TODO: handle with ini_set not working
}
endforeach;
if(!isset($modelPaths))
{
$modelPaths = array(dirname(__FILE__) . DS .'app'.DS.'models'.DS);
}
else
{
array_push($modelPaths, dirname(__FILE__) . DS.'app'.DS.'models'.DS);
}
if(!isset($behaviorPaths))
{
$behaviorPaths = array(dirname(__FILE__) . DS .'app'.DS.'models'.DS.'behaviours'.DS);
}
else
{
array_push($behaviorPaths, dirname(__FILE__) . DS.'app'.DS.'models'.DS.'behaviours'.DS);
}
if(!isset($controllerPaths))
{
$controllerPaths = array(dirname(__FILE__) . DS .'app'.DS.'controllers'.DS);
}
else
{
array_push($controllerPaths, dirname(__FILE__) . DS.'app'.DS.'controllers'.DS);
}
if(!isset($componentPaths))
{
$componentPaths = array(dirname(__FILE__) . DS .'app'.DS.'controllers'.DS.'components'.DS);
}
else
{
array_push($componentPaths, dirname(__FILE__) . DS.'app'.DS.'controllers'.DS.'components'.DS);
}
if(!isset($viewPaths))
{
$viewPaths = array(dirname(__FILE__) . DS .'app'.DS.'views'.DS);
}
else
{
array_push($viewPaths, dirname(__FILE__) . DS.'app'.DS.'views'.DS);
}
if(!isset($helperPaths))
{
$helperPaths = array(dirname(__FILE__) . DS .'app'.DS.'views'.DS.'helpers'.DS);
}
else
{
array_push($helperPaths, dirname(__FILE__) . DS.'app'.DS.'views'.DS.'helpers'.DS);
}
if(!isset($pluginPaths))
{
$pluginPaths = array(dirname(__FILE__) . DS .'app'.DS.'plugins'.DS);
}
else
{
array_push($pluginPaths, dirname(__FILE__) . DS.'app'.DS.'plugins'.DS);
}
if(!isset($vendorPaths))
{
$vendorPaths = array(dirname(__FILE__) . DS .'app'.DS.'vendors'.DS);
}
else
{
array_push($vendorPaths, dirname(__FILE__) . DS.'app'.DS.'vendors'.DS);
}
?>