public function findFile($class)
 {
     if (false === ($file = apc_fetch($this->prefix . $class))) {
         apc_store($this->prefix . $class, $file = parent::findFile($class));
     }
     return $file;
 }
 /**
  * @static
  * @return \UniversalClassLoader
  */
 public static function getInstance ( )
 {
     if (! self::$instance )
     {
         self::$instance = new UniversalClassLoader();
     }
     return self::$instance;
 }
<?php

require_once dirname(__DIR__) . '/../vendor/autoload/UniversalClassLoader.class.php';
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array('AppFlower\\Studio' => dirname(__DIR__) . '/vendor'));
$loader->register();
use AppFlower\Studio\Filesystem\Permissions;
/**
 * Studio Widget Command Class
 *
 * @package appFlowerStudio
 * @author Sergey Startsev <*****@*****.**>
 */
class afStudioWidgetCommand extends afBaseStudioCommand
{
    /**
     * Current module
     */
    private $module;
    /**
     * Current action
     */
    private $action;
    /**
     * Get widget functionality
     *
     * @return afResponse
     * @author Sergey Startsev
     */
    protected function processGet()
    {
    /**
     * Finds a file by class name while caching lookups to APC.
     *
     * @param string $class A class name to resolve to file
     *
     * @return string|null The path, if found
     */
    public function findFile($class)
    {
        $file = apcu_fetch($this->prefix.$class, $success);

        if (!$success) {
            apcu_store($this->prefix.$class, $file = parent::findFile($class) ?: null);
        }

        return $file;
    }
 public function initialize()
 {
     $loader = new UniversalClassLoader();
     $loader->registerNamespace('Knp', __DIR__ . '/../../../vendor/knplabs/knp-snappy/src/');
     $loader->register();
 }
Example #6
0
#!/usr/bin/env php
<?php 
Phar::mapPhar();
require_once 'phar://codecept.phar/vendor/UniversalClassLoader.php';
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array('Codeception' => 'phar://codecept.phar/src/', 'Monolog' => 'phar://codecept.phar/vendor', 'Symfony\\Component' => 'phar://codecept.phar/vendor'));
$loader->register();
$loader->registerNamespaceFallbacks(array('phar://codecept.phar/vendor/Mink/vendor'));
// loading stub generators
require_once 'phar://codecept.phar/src/Codeception/Util/Stub/builders/phpunit/Stub.php';
@(include_once 'mink/autoload.php');
@(include_once 'PHPUnit/Autoload.php');
use Symfony\Component\Console\Application, Symfony\Component\Console\Input\InputInterface, Symfony\Component\Console\Input\InputDefinition, Symfony\Component\Console\Input\InputOption;
require_once 'phar://codecept.phar/codecept';
__halt_compiler();
Example #7
0
<?php

require_once 'vendor/UniversalClassLoader.php';
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array('Codeception' => __DIR__ . '/src', 'Monolog' => __DIR__ . '/vendor', 'Symfony\\Component' => __DIR__ . '/vendor'));
$loader->register(true);
if (stream_resolve_include_path('PHPUnit/Autoload.php')) {
    include_once 'PHPUnit/Autoload.php';
}
if (stream_resolve_include_path('mink/autoload.php')) {
    include_once 'mink/autoload.php';
} elseif (file_exists('vendor/.composer/autoload.php') && !class_exists('Composer\\Autoload\\ClassLoader')) {
    include_once 'vendor/.composer/autoload.php';
}
Example #8
0
<?php
/**
 * Created by IntelliJ IDEA.
 * User: zeflasher
 * Date: 11/03/13
 * Time: 10:14 AM
 * To change this template use File | Settings | File Templates.
 */

include_once('UniversalClassLoader.php');

$loader = new UniversalClassLoader();
//  register namespace
$loader->registerNamespace("Zeflasher", "../libs/vendors/");
// activate the autoloader
$loader->register();
Example #9
0
<?php

/**
 * Basic class loading to get the system going
 */
require_once 'Infrastructure/Symfony/src/Symfony/Component/UniversalClassLoader.php';
$oLoader = new UniversalClassLoader();
$oLoader->registerNamespaces(array('Application' => __DIR__ . 'Application', 'Domain' => __DIR__ . 'Domain', 'Symfony' => __DIR__ . 'Infrastructure/Symfony/src/Symfony', 'Doctrine\\Common' => __DIR__ . 'Infrastructure/Doctrine/Common/lib/Doctrine/Common', 'Doctrine\\DBAL' => __DIR__ . 'Infrastructure/Doctrine/DBAL/lib/Doctrine/DBAL', 'Doctrine\\ORM' => __DIR__ . 'Infrastructure/Doctrine/ORM/lib/Doctrine/ORM'));