Initial commit with Symfony 2.1+Vendors
Signed-off-by: Gergely POLONKAI (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
32
app/autoload.php
Normal file
32
app/autoload.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Doctrine\Common\Annotations\AnnotationRegistry;
|
||||
|
||||
if (!$loader = @include __DIR__.'/../vendor/autoload.php') {
|
||||
|
||||
$message = <<< EOF
|
||||
<p>You must set up the project dependencies by running the following commands:</p>
|
||||
<pre>
|
||||
curl -s http://getcomposer.org/installer | php
|
||||
php composer.phar install
|
||||
</pre>
|
||||
|
||||
EOF;
|
||||
|
||||
if (PHP_SAPI === 'cli') {
|
||||
$message = strip_tags($message);
|
||||
}
|
||||
|
||||
die($message);
|
||||
}
|
||||
|
||||
// intl
|
||||
if (!function_exists('intl_get_error_code')) {
|
||||
require_once __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
|
||||
|
||||
$loader->add('', __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs');
|
||||
}
|
||||
|
||||
AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
|
||||
|
||||
return $loader;
|
Reference in New Issue
Block a user