forked from iisisrael/FOSOAuthServerBundle
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbootstrap.php
32 lines (26 loc) · 1.14 KB
/
bootstrap.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
<?php
declare(strict_types=1);
/*
* This file is part of the FOSOAuthServerBundle package.
*
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
require_once __DIR__.'/../vendor/autoload.php';
// require Propel
if (file_exists($file = __DIR__.'/../vendor/propel/propel1/generator/lib/util/PropelQuickBuilder.php')) {
set_include_path(__DIR__.'/../vendor/phing/phing/classes'.PATH_SEPARATOR.get_include_path());
require_once $file;
}
\Doctrine\Common\Annotations\AnnotationRegistry::registerLoader('class_exists');
// Generate Propel base classes on the fly
if (class_exists('TypehintableBehavior')) {
$class = new \ReflectionClass('TypehintableBehavior');
$builder = new \PropelQuickBuilder();
$builder->getConfig()->setBuildProperty('behavior.typehintable.class', $class->getFileName());
$builder->setSchema(file_get_contents(__DIR__.'/../Resources/config/propel/schema.xml'));
$builder->setClassTargets(['tablemap', 'peer', 'object', 'query', 'peerstub']);
$builder->build();
}