-
Notifications
You must be signed in to change notification settings - Fork 0
/
autoload.php
43 lines (42 loc) · 1.1 KB
/
autoload.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
<?php
/**
* Register CakePHP and Application classes to Sledgehammer's AutoLoader.
*/
use Sledgehammer\Framework;
if (!defined('Sledgehammer\STARTED')) {
define('Sledgehammer\VENDOR_DIR', dirname(__DIR__).'/../Vendor/');
include_once (Sledgehammer\VENDOR_DIR.'autoload.php');
}
$app = realpath(dirname(__DIR__ ).'/../').'/';
$root = dirname($app);
$cake = $root.'/lib/Cake/';
Framework::$autoloader->importFolder($cake, array(
'mandatory_superclass' => false,
'ignore_folders' => array(
$cake.'Console',
$cake.'Test',
$cake.'TestSuite',
$cake.'Config'
),
'ignore_files' => array(
$cake.'basics.php',
$cake.'bootstrap.php',
),
// CakePHP doesnt follow it's own standards...
'matching_filename' => false,
'one_definition_per_file' => false
));
Framework::$autoloader->importFolder($app, array(
'mandatory_definition' => false,
'ignore_folders' => array(
$app.'Vendor', // Already imported
$app.'tmp',
$app.'webroot',
// $app.'Config',
),
// Disable additional checks for Plugin scripts
'detect_accidental_output' => false,
'matching_filename' => false,
'mandatory_superclass' => false,
));
?>