Beispiel #1
0
function sf2AutoLoad()
{
    $loader = new UniversalClassLoader();
    $loader->registerNamespaces(array('Sf2Plugins' => __DIR__ . '/src'));
    $loader->registerPrefixes(array('Twig_Extensions_' => __DIR__ . '/lib/Twig-extensions/lib', 'Twig_' => __DIR__ . '/lib/Twig/lib'));
    $loader->register();
}
 /**
  * @group legacy
  */
 public function testLegacyHandleClassNotFound()
 {
     $prefixes = array('Symfony\\Component\\Debug\\Exception\\' => realpath(__DIR__ . '/../../Exception'));
     $symfonyUniversalClassLoader = new SymfonyUniversalClassLoader();
     $symfonyUniversalClassLoader->registerPrefixes($prefixes);
     $this->testHandleClassNotFound(array('type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found'), "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\\Bar\".\nDid you forget a \"use\" statement for \"Symfony\\Component\\Debug\\Exception\\UndefinedFunctionException\"?", array($symfonyUniversalClassLoader, 'loadClass'));
 }
 /**
  * @dataProvider getLoadClassPrefixCollisionTests
  */
 public function testLoadClassPrefixCollision($prefixes, $className, $message)
 {
     $loader = new UniversalClassLoader();
     $loader->registerPrefixes($prefixes);
     $loader->loadClass($className);
     $this->assertTrue(class_exists($className), $message);
 }
 public function provideClassNotFoundData()
 {
     $prefixes = array('Symfony\\Component\\Debug\\Exception\\' => realpath(__DIR__ . '/../../Exception'));
     $symfonyAutoloader = new SymfonyClassLoader();
     $symfonyAutoloader->addPrefixes($prefixes);
     $symfonyUniversalClassLoader = new SymfonyUniversalClassLoader();
     $symfonyUniversalClassLoader->registerPrefixes($prefixes);
     return array(array(array('type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'WhizBangFactory\' not found'), 'Attempted to load class "WhizBangFactory" from the global namespace in foo.php line 12. Did you forget a use statement for this class?'), array(array('type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\WhizBangFactory\' not found'), 'Attempted to load class "WhizBangFactory" from namespace "Foo\\Bar" in foo.php line 12. Do you need to "use" it from another namespace?'), array(array('type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'UndefinedFunctionException\' not found'), 'Attempted to load class "UndefinedFunctionException" from the global namespace in foo.php line 12. Did you forget a use statement for this class? Perhaps you need to add a use statement for one of the following: Symfony\\Component\\Debug\\Exception\\UndefinedFunctionException.'), array(array('type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'PEARClass\' not found'), 'Attempted to load class "PEARClass" from the global namespace in foo.php line 12. Did you forget a use statement for this class? Perhaps you need to add a use statement for one of the following: Symfony_Component_Debug_Tests_Fixtures_PEARClass.'), array(array('type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found'), 'Attempted to load class "UndefinedFunctionException" from namespace "Foo\\Bar" in foo.php line 12. Do you need to "use" it from another namespace? Perhaps you need to add a use statement for one of the following: Symfony\\Component\\Debug\\Exception\\UndefinedFunctionException.'), array(array('type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found'), 'Attempted to load class "UndefinedFunctionException" from namespace "Foo\\Bar" in foo.php line 12. Do you need to "use" it from another namespace? Perhaps you need to add a use statement for one of the following: Symfony\\Component\\Debug\\Exception\\UndefinedFunctionException.', array($symfonyAutoloader, 'loadClass')), array(array('type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found'), 'Attempted to load class "UndefinedFunctionException" from namespace "Foo\\Bar" in foo.php line 12. Do you need to "use" it from another namespace? Perhaps you need to add a use statement for one of the following: Symfony\\Component\\Debug\\Exception\\UndefinedFunctionException.', array($symfonyUniversalClassLoader, 'loadClass')), array(array('type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found'), 'Attempted to load class "UndefinedFunctionException" from namespace "Foo\\Bar" in foo.php line 12. Do you need to "use" it from another namespace?', function ($className) {
         /* do nothing here */
     }));
 }
 public function provideLegacyClassNotFoundData()
 {
     $prefixes = array('Symfony\\Component\\Debug\\Exception\\' => realpath(__DIR__ . '/../../Exception'));
     $symfonyAutoloader = new SymfonyClassLoader();
     $symfonyAutoloader->addPrefixes($prefixes);
     $symfonyUniversalClassLoader = new SymfonyUniversalClassLoader();
     $symfonyUniversalClassLoader->registerPrefixes($prefixes);
     return array(array(array('type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found'), "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\\Bar\".\nDid you forget a \"use\" statement for \"Symfony\\Component\\Debug\\Exception\\UndefinedFunctionException\"?", array($symfonyAutoloader, 'loadClass')), array(array('type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found'), "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\\Bar\".\nDid you forget a \"use\" statement for \"Symfony\\Component\\Debug\\Exception\\UndefinedFunctionException\"?", array($symfonyUniversalClassLoader, 'loadClass')), array(array('type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found'), "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\\Bar\".\nDid you forget a \"use\" statement for another namespace?", function ($className) {
         /* do nothing here */
     }));
 }
<?php

require_once __DIR__ . '/../vendor/Symfony/Component/ClassLoader/UniversalClassLoader.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
// PSR-0
$loader->registerNamespaces(array('Codemotion' => __DIR__ . '/../src', 'Symfony' => __DIR__ . '/../vendor', 'Doctrine' => array(__DIR__ . '/../vendor/doctrine-common/lib', __DIR__ . '/../vendor/doctrine-dbal/lib', __DIR__ . '/../vendor/doctrine/lib')));
// PEAR
$loader->registerPrefixes(array('Twig_' => __DIR__ . '/../vendor/twig/lib'));
$loader->register();
Beispiel #7
0
<?php

require_once $_SERVER['VENDOR_LIB'] . '/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array('Symfony' => $_SERVER['VENDOR_LIB'] . '/symfony/src', 'AntiMattr' => __DIR__ . '/../../../../', 'Doctrine\\ODM\\MongoDB\\Symfony\\SoftDeleteBundle' => $_SERVER['VENDOR_LIB'] . '/doctrine-mongodb-odm-softdelete-bundle', 'Doctrine\\ODM\\MongoDB\\SoftDelete' => $_SERVER['VENDOR_LIB'] . '/doctrine-mongodb-odm-softdelete/lib', 'Doctrine\\Common\\DataFixtures' => $_SERVER['VENDOR_LIB'] . '/doctrine-data-fixtures/lib', 'Doctrine\\Common' => $_SERVER['VENDOR_LIB'] . '/doctrine-common/lib', 'Doctrine\\DBAL\\Migrations' => $_SERVER['VENDOR_LIB'] . '/doctrine-migrations/lib', 'Doctrine\\DBAL' => $_SERVER['VENDOR_LIB'] . '/doctrine-dbal/lib', 'Doctrine\\MongoDB' => $_SERVER['VENDOR_LIB'] . '/doctrine-mongodb/lib', 'Doctrine\\ODM\\MongoDB' => $_SERVER['VENDOR_LIB'] . '/doctrine-mongodb-odm/lib', 'Zend' => $_SERVER['VENDOR_LIB'] . '/zend/library'));
$loader->registerPrefixes(array('Swift_' => $_SERVER['VENDOR_LIB'] . '/swiftmailer/lib/classes', 'Twig_' => $_SERVER['VENDOR_LIB'] . '/twig/lib'));
$loader->registerNamespaceFallback(__DIR__);
$loader->register();
<?php

use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array('Symfony' => __DIR__ . '/../vendor/symfony/src', 'Knplabs' => array(__DIR__ . '/../src', __DIR__ . '/../vendor/bundles'), 'Bundle' => __DIR__ . '/../vendor/bundles', 'Doctrine\\DBAL\\Migrations' => __DIR__ . '/../vendor/doctrine-migrations/lib', 'Doctrine\\Common' => __DIR__ . '/../vendor/doctrine-common/lib', 'Doctrine\\Common\\DataFixtures' => __DIR__ . '/../vendor/doctrine-data-fixtures/lib', 'Doctrine\\DBAL' => __DIR__ . '/../vendor/doctrine-dbal/lib', 'Doctrine' => __DIR__ . '/../vendor/doctrine/lib', 'Zend' => __DIR__ . '/../vendor/zend/library', 'Monolog' => __DIR__ . '/../vendor/monolog/src', 'Goutte' => __DIR__ . '/../vendor/goutte/src'));
$loader->registerPrefixes(array('Twig_Extensions_' => __DIR__ . '/../vendor/twig-extensions/lib', 'Twig_' => __DIR__ . '/../vendor/twig/lib', 'Github_' => __DIR__ . '/../vendor/php-github-api/lib'));
$loader->register();
// Require php-git-repo
require_once __DIR__ . '/../vendor/php-git-repo/lib/phpGitRepo.php';
Beispiel #9
0
<?php

require_once __DIR__ . '/vendors/Symfony/Component/ClassLoader/UniversalClassLoader.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array('PhpDirect' => __DIR__ . '/src', 'Symfony' => __DIR__ . '/vendors'));
$loader->registerPrefixes(array('UniversalErrorCatcher_' => __DIR__ . '/vendors/UniversalErrorCatcher/src'));
$loader->register();
<?php

$vendorDir = __DIR__ . '/vendor';
require_once $vendorDir . '/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array('Symfony' => $vendorDir . '/symfony/src', 'Application' => __DIR__, 'Bundle' => __DIR__, 'Sonata' => __DIR__, 'Doctrine\\Common\\DataFixtures' => $vendorDir . '/doctrine-data-fixtures/lib', 'Doctrine\\Common' => $vendorDir . '/doctrine-common/lib', 'Doctrine\\DBAL\\Migrations' => $vendorDir . '/doctrine-migrations/lib', 'Doctrine\\ODM\\MongoDB' => $vendorDir . '/doctrine-mongodb/lib', 'Doctrine\\DBAL' => $vendorDir . '/doctrine-dbal/lib', 'Doctrine' => $vendorDir . '/doctrine/lib', 'Zend' => $vendorDir . '/zend/library'));
$loader->registerPrefixes(array('Swift_' => $vendorDir . '/swiftmailer/lib/classes', 'Twig_' => $vendorDir . '/twig/lib'));
$loader->register();
<?php

use Symfony\Component\ClassLoader\UniversalClassLoader;
// use Doctrine\Common\Annotations\AnnotationRegistry;

$loader = new UniversalClassLoader();
$loader->registerNamespaces(array(
    'Symfony'     => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'),
    'Knowledge'   => __DIR__.'/../src',
    'Propel'      => __DIR__.'/../vendor/bundles',
    'Assetic'     => __DIR__.'/../vendor/assetic/src',
    'Monolog'     => __DIR__.'/../vendor/monolog/src',
    'Metadata'    => __DIR__.'/../vendor/metadata/src',
));
$loader->registerPrefixes(array(
    
));

// intl
if (!function_exists('intl_get_error_code')) {
    require_once __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';

    $loader->registerPrefixFallbacks(array(__DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs'));
}

$loader->registerNamespaceFallbacks(array(
    __DIR__.'/../src',
));
$loader->register();

// AnnotationRegistry::registerLoader(function($class) use ($loader) {
<?php

if (!isset($GLOBALS['SYMFONY2_SRC'])) {
    throw new \RuntimeException("SYMFONY2_SRC Global variable not specified. Use the shipped phpunit.dist.xml");
}
if (!isset($GLOBALS['ZF1_LIB'])) {
    throw new \RuntimeException("ZF1_LIB Global variable not specified. Use the shipped phpunit.dist.xml");
}
$symfonySrc = $GLOBALS['SYMFONY2_SRC'];
require_once $symfonySrc . "/Symfony/Component/ClassLoader/UniversalClassLoader.php";
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array('Symfony' => $GLOBALS['SYMFONY2_SRC']));
$loader->registerPrefixes(array('Zend_' => $GLOBALS['ZF1_LIB']));
$loader->register();
$files = array("../View/CoreViewListener.php", "../View/ParameterBag.php", "../View/View1.php", "../View/ZendViewEngine.php", "../WhitewashingZFMvcCompatBundle.php", "../DependencyInjection/WhitewashingZFMvcCompatExtension.php", "../Router/Loader/ZFRouterLoader.php", "../Controller/ZendController.php", "../Controller/ZendRequest.php", "../Controller/ZendResponse.php", "../Controller/RouteNameParser.php", "../Controller/CatchAllRequestListener.php", "../Controller/Helpers/Helper.php", "../Controller/Helpers/HelperBroker.php", "../Controller/Helpers/Layout.php", "../Controller/Helpers/ContextSwitch.php", "../Controller/Helpers/Redirector.php", "../Controller/Helpers/UrlHelper.php", "../Controller/Helpers/ViewRenderer.php");
foreach ($files as $file) {
    require_once $file;
}
Beispiel #13
0
<?php

use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array('Assetic' => __DIR__ . '/../vendor/assetic/src', 'Doctrine\\Common' => __DIR__ . '/../vendor/doctrine/common/lib', 'Doctrine\\MongoDB' => __DIR__ . '/../vendor/doctrine/mongodb/lib', 'Doctrine\\ODM\\MongoDB' => __DIR__ . '/../vendor/doctrine/mongodb-odm/lib', 'FOS' => __DIR__ . '/../src', 'Application' => __DIR__ . '/../src', 'Vespolina' => __DIR__ . '/../src', 'Symfony' => __DIR__ . '/../vendor/symfony/src', 'vendor' => __DIR__ . '/../src', 'Zend\\Log' => __DIR__ . '/../vendor/zend-log'));
$loader->registerPrefixes(array('Twig_Extensions_' => __DIR__ . '/../vendor/twig-extensions/lib', 'Twig_' => __DIR__ . '/../vendor/twig/lib', 'Swift_' => __DIR__ . '/../vendor/swiftmailer/lib/classes'));
$loader->register();
<?php

require_once __DIR__ . '/vendors/Symfony/Component/ClassLoader/UniversalClassLoader.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array('Palleas' => __DIR__ . '/src', 'Monolog' => __DIR__ . '/vendors/monolog/src'));
$loader->registerPrefixes(array('HipChat' => __DIR__ . '/vendors/hipchat-php'));
$loader->register();
return $loader;
<?php

$vendorDir = '/usr/share/php';
$pearDir = '/usr/share/pear';
$baseDir = dirname(__DIR__);
require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php';
require_once $vendorDir . '/password_compat/password.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array('fkooman\\OAuth\\Server' => $baseDir . '/src', 'fkooman\\Rest' => $vendorDir, 'fkooman\\Json' => $vendorDir, 'fkooman\\Ini' => $vendorDir, 'fkooman\\Http' => $vendorDir, 'Symfony\\Component\\EventDispatcher' => $vendorDir, 'Guzzle' => $vendorDir));
$loader->registerPrefixes(array('Twig_' => array($pearDir, $vendorDir)));
$loader->register();
Beispiel #16
0
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */
// Load configuration and UniversalClassLoader
// Introduces $orchestraConfig into the global namespace
include_once __DIR__ . '/../config.php';
include_once $orchestraConfig['vendorDir'] . '/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
/**
* Create an instance of UniversalClassLoader and register
* all prefixes / namespaces which are part of Orchestra
*/
$orchestraClassLoader = new UniversalClassLoader();
$orchestraClassLoader->registerPrefixes(array('Twig_' => $orchestraConfig['vendorDir'] . '/twig/twig/lib'));
$orchestraClassLoader->registerNamespaces(array('Symfony\\Component\\Yaml' => $orchestraConfig['vendorDir'] . '/symfony/yaml/', 'Symfony\\Component\\Validator' => $orchestraConfig['vendorDir'] . '/symfony/validator/', 'Symfony\\Component\\Translation' => $orchestraConfig['vendorDir'] . '/symfony/translation/', 'Symfony\\Component\\OptionsResolver' => $orchestraConfig['vendorDir'] . '/symfony/options-resolver/', 'Symfony\\Component\\Locale' => $orchestraConfig['vendorDir'] . '/symfony/locale/', 'Symfony\\Component\\HttpKernel' => $orchestraConfig['vendorDir'] . '/symfony/http-kernel/', 'Symfony\\Component\\HttpFoundation' => $orchestraConfig['vendorDir'] . '/symfony/http-foundation/', 'Symfony\\Component\\Form' => $orchestraConfig['vendorDir'] . '/symfony/form/', 'Symfony\\Component\\EventDispatcher' => $orchestraConfig['vendorDir'] . '/symfony/event-dispatcher/', 'Symfony\\Component\\Console' => $orchestraConfig['vendorDir'] . '/symfony/console/', 'Symfony\\Component\\Config' => $orchestraConfig['vendorDir'] . '/symfony/config/', 'Symfony\\Component\\ClassLoader' => $orchestraConfig['vendorDir'] . '/symfony/class-loader/', 'Symfony\\Component\\Filesystem' => $orchestraConfig['vendorDir'] . '/symfony/filesystem/', 'Symfony\\Component\\PropertyAccess' => $orchestraConfig['vendorDir'] . '/symfony/property-access/', 'Symfony\\Bridge\\Twig' => $orchestraConfig['vendorDir'] . '/symfony/twig-bridge/', 'SessionHandlerInterface' => $orchestraConfig['vendorDir'] . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Resources/stubs', 'Doctrine\\ORM' => $orchestraConfig['vendorDir'] . '/doctrine/orm/lib/', 'Doctrine\\DBAL' => $orchestraConfig['vendorDir'] . '/doctrine/dbal/lib/', 'Doctrine\\Common' => $orchestraConfig['vendorDir'] . '/doctrine/common/lib/', 'Orchestra' => __DIR__ . '/../src/'));
$orchestraClassLoader->register();
Beispiel #17
0
<?php

require_once __DIR__ . '/../vendor/Symfony/Component/ClassLoader/UniversalClassLoader.php';
require_once __DIR__ . '/../vendor/yaml/lib/sfYaml.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array('Symfony' => __DIR__ . '/../vendor', 'Cazalla' => __DIR__ . '/../vendor/Cazalla/src', 'Knplabs\\Bundle\\MarkdownBundle' => __DIR__ . '/../vendor'));
$loader->registerPrefixes(array('Pimple' => __DIR__ . '/../vendor/pimple/lib', 'Twig' => __DIR__ . '/../vendor/Twig/lib'));
$loader->register();
Beispiel #18
0
<?php

use Symfony\Component\ClassLoader\UniversalClassLoader;
use Doctrine\Common\Annotations\AnnotationRegistry;
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array('Symfony' => array(__DIR__ . '/../vendor/symfony/src', __DIR__ . '/../vendor/bundles'), 'Sensio' => __DIR__ . '/../vendor/bundles', 'JMS' => __DIR__ . '/../vendor/bundles', 'Doctrine\\Common' => __DIR__ . '/../vendor/doctrine-common/lib', 'Doctrine\\DBAL' => __DIR__ . '/../vendor/doctrine-dbal/lib', 'Doctrine' => __DIR__ . '/../vendor/doctrine/lib', 'Monolog' => __DIR__ . '/../vendor/monolog/src', 'Assetic' => __DIR__ . '/../vendor/assetic/src', 'FOS' => __DIR__ . '/../vendor/bundles', 'FOS\\Rest' => __DIR__ . '/../vendor/fos', 'Pagerfanta' => __DIR__ . '/../vendor/pagerfanta/src', 'WhiteOctober' => __DIR__ . '/../vendor/bundles', 'Admingenerator' => array(__DIR__ . '/../src', __DIR__ . '/../vendor/bundles'), 'Sensio\\Bundle' => __DIR__ . '/../vendor/bundles', 'Knp\\Menu' => __DIR__ . '/../vendor/KnpMenu/src', 'Knp' => __DIR__ . '/../vendor/bundles', 'TwigGenerator' => __DIR__ . '/../vendor/twig-generator/src', 'Genemu' => __DIR__ . '/../vendor/bundles', 'JMS' => __DIR__ . '/../vendor/bundles', 'Metadata' => __DIR__ . '/../vendor/metadata/src', 'Exercise' => __DIR__ . '/../vendor/bundles'));
$loader->registerPrefixes(array('Twig_Extensions_' => __DIR__ . '/../vendor/twig-extensions/lib', 'Twig_' => __DIR__ . '/../vendor/twig/lib', 'HTMLPurifier' => __DIR__ . '/../vendor//htmlpurifier/library'));
// intl
if (!function_exists('intl_get_error_code')) {
    require_once __DIR__ . '/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
    $loader->registerPrefixFallbacks(array(__DIR__ . '/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs'));
}
$loader->registerNamespaceFallbacks(array(__DIR__ . '/../src'));
$loader->register();
AnnotationRegistry::registerLoader(function ($class) use($loader) {
    $loader->loadClass($class);
    return class_exists($class, false);
});
AnnotationRegistry::registerFile(__DIR__ . '/../vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php');
// Swiftmailer needs a special autoloader to allow
// the lazy loading of the init file (which is expensive)
require_once __DIR__ . '/../vendor/swiftmailer/lib/classes/Swift.php';
Swift::registerAutoload(__DIR__ . '/../vendor/swiftmailer/lib/swift_init.php');
Beispiel #19
0
<?php

require_once $_SERVER['SYMFONY'] . '/Symfony/Component/ClassLoader/UniversalClassLoader.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array('Exercise\\HTMLPurifierBundle' => realpath(__DIR__ . '/../../..'), 'Symfony' => $_SERVER['SYMFONY']));
$loader->registerPrefixes(array('HTMLPurifier' => $_SERVER['HTMLPURIFIER'], 'Twig_' => $_SERVER['TWIG']));
$loader->register();
Beispiel #20
0
<?php

use Symfony\Component\ClassLoader\UniversalClassLoader;
use Doctrine\Common\Annotations\AnnotationRegistry;
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array('Symfony' => array(__DIR__ . '/../vendor/symfony/src', __DIR__ . '/../vendor/bundles'), 'Sensio' => __DIR__ . '/../vendor/bundles', 'JMS' => __DIR__ . '/../vendor/bundles', 'Doctrine\\Common' => __DIR__ . '/../vendor/doctrine-common/lib', 'Doctrine\\DBAL' => __DIR__ . '/../vendor/doctrine-dbal/lib', 'Doctrine' => __DIR__ . '/../vendor/doctrine/lib', 'Monolog' => __DIR__ . '/../vendor/monolog/src', 'Assetic' => __DIR__ . '/../vendor/assetic/src', 'Metadata' => __DIR__ . '/../vendor/metadata/src', 'FOS' => __DIR__ . '/../vendor/bundles', 'Composer' => __DIR__ . '/../vendor/composer/src', 'Packagist' => __DIR__ . '/../src', 'WhiteOctober\\PagerfantaBundle' => __DIR__ . '/../vendor/bundles', 'Pagerfanta' => __DIR__ . '/../vendor/pagerfanta/src', 'Nelmio' => __DIR__ . '/../vendor/bundles'));
$loader->registerPrefixes(array('Twig_Extensions_' => __DIR__ . '/../vendor/twig-extensions/lib', 'Twig_' => __DIR__ . '/../vendor/twig/lib', 'Solarium_' => __DIR__ . '/../vendor/solarium/library'));
// intl
if (!function_exists('intl_get_error_code')) {
    require_once __DIR__ . '/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
    $loader->registerPrefixFallbacks(array(__DIR__ . '/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs'));
}
$loader->registerNamespaceFallbacks(array(__DIR__ . '/../src'));
$loader->register();
AnnotationRegistry::registerLoader(function ($class) use($loader) {
    $loader->loadClass($class);
    return class_exists($class, false);
});
AnnotationRegistry::registerFile(__DIR__ . '/../vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php');
// Swiftmailer needs a special autoloader to allow
// the lazy loading of the init file (which is expensive)
require_once __DIR__ . '/../vendor/swiftmailer/lib/classes/Swift.php';
Swift::registerAutoload(__DIR__ . '/../vendor/swiftmailer/lib/swift_init.php');
Beispiel #21
0
<?php

/*
 * This file is part of the FOSFacebookBundle 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 $_SERVER['SYMFONY'] . '/Symfony/Component/ClassLoader/UniversalClassLoader.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$loader->registerNamespace('Symfony', $_SERVER['SYMFONY']);
$loader->registerPrefixes(array('Twig_' => $_SERVER['TWIG']));
$loader->register();
spl_autoload_register(function ($class) {
    if (0 === strpos($class, 'FOS\\FacebookBundle\\')) {
        $path = implode('/', array_slice(explode('\\', $class), 2)) . '.php';
        require_once __DIR__ . '/../' . $path;
        return true;
    }
});
Beispiel #22
0
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * @package     iPMS
 * @subpackage  Core
 * @category    Kernel
 * @copyright   2011 by Laurent Declercq (nuxwin)
 * @author      Laurent Declercq <*****@*****.**>
 * @version     0.0.1
 * @link        http://www.i-pms.net i-PMS Home Site
 * @license     http://www.gnu.org/licenses/gpl-2.0.html GPL v2
 */
require_once 'Symfony/Component/ClassLoader/UniversalClassLoader.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array('iPMS' => __DIR__ . '/../library', 'Symfony' => __DIR__ . '/../library', 'Doctrine' => __DIR__ . '/../library', 'Core' => __DIR__ . '/modules', 'Blog' => __DIR__ . '/modules'));
$loader->registerPrefixes(array('Zend_' => '/var/www/imscp/library', 'iPMS_' => __DIR__ . '/../library', 'ZendX_' => '/var/www/imscp/library', 'ZFDebug_' => __DIR__ . '/../library'));
$loader->register();
use iPMS\Kernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
/**
 * Application Kernel
 *
 * Note: This class will be removed ASAP.
 * 
 * @package     iPMS
 * @subpackage  Core
 * @category    Kernel
 * @author      Laurent Declercq <*****@*****.**>
 * @version     0.0.1
 */
final class ApplicationKernel extends Kernel
Beispiel #23
0
<?php

/*
 * This file is part of the logspy package.
 *
 * (c) Joan Valduvieco <*****@*****.**>
 * (c) Jordi Llonch <*****@*****.**>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
require_once __DIR__ . '/vendor/Symfony/Component/ClassLoader/UniversalClassLoader.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
// register classes with namespaces
$loader->registerNamespaces(array('LogSpy' => __DIR__ . "/src/", 'Symfony' => __DIR__ . "/vendor/"));
$loader->registerPrefixes(array('Pimple' => __DIR__ . '/vendor/pimple/lib'));
$loader->register();
Beispiel #24
0
<?php

$vendorDir = __DIR__ . '/../vendor';
require_once $vendorDir . '/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array('Mandango' => __DIR__ . '/../src', 'Mandango\\Tests' => __DIR__, 'Mandango\\Mondator' => $vendorDir . '/mondator/src', 'Model' => __DIR__));
$loader->registerPrefixes(array('Twig_' => $vendorDir . '/twig/lib'));
$loader->register();
// mondator
$configClasses = (require __DIR__ . '/config_classes.php');
use Mandango\Mondator\Mondator;
$mondator = new Mondator();
$mondator->setConfigClasses($configClasses);
$mondator->setExtensions(array(new Mandango\Extension\Core(array('metadata_factory_class' => 'Model\\Mapping\\Metadata', 'metadata_factory_output' => __DIR__ . '/Model/Mapping', 'default_output' => __DIR__ . '/Model')), new Mandango\Extension\DocumentArrayAccess(), new Mandango\Extension\DocumentPropertyOverloading()));
$mondator->process();
Beispiel #25
0
    'Symfony'          => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'),
    'Sensio'           => __DIR__.'/../vendor/bundles',
    'JMS'              => __DIR__.'/../vendor/bundles',
    'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib',
    'Doctrine\\DBAL\\Migrations'         => __DIR__.'/../vendor/doctrine-migrations/lib',
    'Doctrine\\DBAL'   => __DIR__.'/../vendor/doctrine-dbal/lib',
    'Doctrine'         => __DIR__.'/../vendor/doctrine/lib',
    'Monolog'          => __DIR__.'/../vendor/monolog/src',
    'Assetic'          => __DIR__.'/../vendor/assetic/src',
    'Metadata'         => __DIR__.'/../vendor/metadata/src',
    'TaskBoxx'          => __DIR__.'/../src',
    'Bundle'           => __DIR__.'/../src',
    'Knplabs'           => __DIR__.'/../src/Bundle',
));
$loader->registerPrefixes(array(
    'Twig_Extensions_' => __DIR__.'/../vendor/twig-extensions/lib',
    'Twig_'            => __DIR__.'/../vendor/twig/lib',
));
$loader->registerPrefixFallbacks(array(
    __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs',
));
$loader->registerNamespaceFallbacks(array(
    __DIR__.'/../src',
));
$loader->register();

// Swiftmailer needs a special autoloader to allow
// the lazy loading of the init file (which is expensive)
require_once __DIR__.'/../vendor/swiftmailer/lib/classes/Swift.php';
Swift::registerAutoload(__DIR__.'/../vendor/swiftmailer/lib/swift_init.php');
Beispiel #26
0
<?php

require_once VENDOR_PATH . 'autoload.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$namespaces = array('Symfony\\Component' => VENDOR_PATH . 'symfony/class-loader', 'OperaCore' => VENDOR_PATH . 'natxet/OperaCore/src');
// this is for loading the namespace of every app we have in the apps directory
foreach (glob(APPS_PATH . '*', GLOB_ONLYDIR) as $namespace) {
    $namespaces[basename($namespace)] = APPS_PATH;
}
$loader->registerNamespaces($namespaces);
$prefixes = array('Pimple' => VENDOR_PATH . 'fabpot/pimple/lib', 'Twig' => VENDOR_PATH . 'fabpot/twig/lib', 'Twig_Extensions' => VENDOR_PATH . 'natxet/twig-extensions/lib');
$loader->registerPrefixes($prefixes);
$loader->register();