Example #1
1
File: Init.php Project: dxw/iguana
 public static function init($dir, $namespace)
 {
     $loader = new \Aura\Autoload\Loader();
     $loader->register();
     $loader->addPrefix($namespace, $dir);
     $registrar = \Dxw\Iguana\Registrar::getSingleton();
     $registrar->di($dir . '/di.php', $namespace);
     return $registrar;
 }
Example #2
0
<?php

error_reporting(0);
define("ABS_PATH", dirname(__FILE__) . DIRECTORY_SEPARATOR);
require_once 'vendor/autoload.php';
$loader = new \Aura\Autoload\Loader();
$loader->addPrefix('App', ABS_PATH . 'App' . DIRECTORY_SEPARATOR);
$loader->register(true);
Example #3
0
<?php

require 'vendor/autoload.php';
use vendor\Nemolf\GitLogUtils as utils;
// Aura.Autoloader
$loader = new \Aura\Autoload\Loader();
$loader->register();
$loader->addPrefix('vendor\\Nemolf\\GitLogUtils', 'vendor/nemolf/gitlogutils');
// settings to get log.
$git_path = "/PATH/TO/YOUR/REPOSITORY";
$after = '2015-06-30T00:00:00+0700';
$before = '2015-07-10T23:59:59+0700';
// create parser
$parser = new utils\GitLogUtils();
// get / parse log
$ret = $parser->git_log_parser($git_path, $after, $before);
// aggreate data by commetter
print_r(sortByCommitter($ret));
function sortByCommitter(array $gitLogData)
{
    $template = array('times' => null, 'max_lines' => null, 'max_length' => null, 'total_lines' => null, 'total_length' => null);
    $data = array();
    foreach ($gitLogData as $log) {
        if (!array_key_exists($log->committer, $data)) {
            $data[$log->committer] = $template;
        }
        $data[$log->committer]['times']++;
        if ($log->getCommentLines() > $data[$log->committer]['max_lines']) {
            $data[$log->committer]['max_lines'] = $log->getCommentLines();
        }
        if ($log->getCommentLength() > $data[$log->committer]['max_length']) {
Example #4
0
<?php

require __DIR__ . '/../vendor/autoload.php';
$loader = new \Aura\Autoload\Loader();
$loader->addPrefix('test\\jmversteeg\\contextual', __DIR__ . '/jmversteeg/contextual');
$loader->addPrefix('jmversteeg\\contextual', __DIR__ . '/../src/jmversteeg/contextual');
$loader->register();
Example #5
0
<?php

/**
 * This file is part of the Faviconr package.
 *
 * (c) Tony Bogdanov <*****@*****.**>
 *
 * For the full copyright and license information, please view the LICENSE.txt
 * file that was distributed with this source code.
 */
// Get the autoloader
if (is_file(dirname(__FILE__) . '/../bower_components/Aura.Autoload/src/Loader.php')) {
    require_once dirname(__FILE__) . '/../bower_components/Aura.Autoload/src/Loader.php';
    require_once dirname(__FILE__) . '/../bower_components/Aura.Autoload/autoload.php';
} else {
    if (is_file(dirname(__FILE__) . '/../../Aura.Autoload/src/Loader.php')) {
        require_once dirname(__FILE__) . '/../../Aura.Autoload/src/Loader.php';
        require_once dirname(__FILE__) . '/../../Aura.Autoload/autoload.php';
    } else {
        throw new \Exception('Could not locate auraphp/Aura.Autoload');
    }
}
$loader = new \Aura\Autoload\Loader();
$loader->addPrefix('Symfony\\Component\\Console', dirname(__FILE__) . '/../bower_components/console');
$loader->addPrefix('Symfony\\Component\\Console', dirname(__FILE__) . '/../../console');
$loader->addPrefix('ColorThief', dirname(__FILE__) . '/../bower_components/color-thief-php/lib/ColorThief');
$loader->addPrefix('ColorThief', dirname(__FILE__) . '/../../color-thief-php/lib/ColorThief');
$loader->addPrefix('Faviconr', dirname(__FILE__) . '/classes');
$loader->register();
Example #6
0
<?php

/**
 * This file is part of the Imager package.
 *
 * (c) Tony Bogdanov <*****@*****.**>
 *
 * For the full copyright and license information, please view the LICENSE.txt
 * file that was distributed with this source code.
 */
// Get the autoloader
if (is_file(dirname(__FILE__) . '/../bower_components/Aura.Autoload/src/Loader.php')) {
    require_once dirname(__FILE__) . '/../bower_components/Aura.Autoload/src/Loader.php';
    require_once dirname(__FILE__) . '/../bower_components/Aura.Autoload/autoload.php';
} else {
    if (is_file(dirname(__FILE__) . '/../../Aura.Autoload/src/Loader.php')) {
        require_once dirname(__FILE__) . '/../../Aura.Autoload/src/Loader.php';
        require_once dirname(__FILE__) . '/../../Aura.Autoload/autoload.php';
    } else {
        throw new \Exception('Could not locate auraphp/Aura.Autoload');
    }
}
$loader = new \Aura\Autoload\Loader();
$loader->addPrefix('Symfony\\Component\\Console', dirname(__FILE__) . '/../bower_components/console');
$loader->addPrefix('Symfony\\Component\\Console', dirname(__FILE__) . '/../../console');
$loader->addPrefix('Imager', dirname(__FILE__) . '/classes');
$loader->register();
Example #7
0
<?php

require_once 'vendor/autoload.php';
$baseDir = realpath(__DIR__);
$loader = new \Aura\Autoload\Loader();
$loader->addPrefix('Samsara\\Hermes', $baseDir . '/src/Samsara/Hermes');
$loader->register();
use Doctrine\ORM\Tools\Setup;
use Doctrine\ORM\EntityManager;
$paths = [$baseDir . '/src/Samsara/Hermes/Entity'];
$isDevMode = true;
// the connection configuration
$dbParams = array('driver' => 'pdo_mysql', 'user' => 'root', 'password' => '', 'dbname' => 'test1');
$config = Setup::createAnnotationMetadataConfiguration($paths, $isDevMode);
$entityManager = EntityManager::create($dbParams, $config);
Example #8
0
<?php

require __DIR__ . '/../vendor/autoload.php';
$loader = new \Aura\Autoload\Loader();
$loader->addPrefix('fieldwork\\tests', __DIR__ . '/fieldwork/tests');
$loader->addPrefix('fieldwork', __DIR__ . '/../src/fieldwork');
$loader->register();
Example #9
0
<?php

require_once 'vendor/autoload.php';
$basedir = realpath(__DIR__);
$loader = new \Aura\Autoload\Loader();
$loader->addPrefix('Samsara\\Eden', $basedir . '/src/Samsara/Eden');
$loader->register();
$envs = ['default', 'local', 'dev', 'qa', 'stage', 'prod'];
$config = new \Samsara\Eden\Kernel\Config($envs);
$config->setSys('basedir', $basedir);
$config->setSys('cfg.format', 'json');
// Supply the env that this bootstrapper executes
$kernel = new \Samsara\Eden\Kernel\Kernel('dev');
$kernel->setConfig($config);
$builder = new \Samsara\Eden\Kernel\AuraExtend\ContainerBuilder();
$services = $builder->newServices();
$container = $builder->newDI();
// Allow the kernel to set the services in the service container
$kernel->setServices($services);
// Allow the kernel to set the Dependency Injection params
$kernel->setDI($container, $services);
// Now it's time for routing. Grab the container.
$routerContainer = new \Aura\Router\RouterContainer();
// Use the map builder so that we can cache the routes.
$routerContainer->setMapBuilder(function ($map) use($config, $kernel) {
    /**
     * @var $map \Aura\Router\Map
     */
    $cache = $config->getSys('basedir') . '/cache/' . $config->get('cache.routes', 'routes.cache');
    if (file_exists($cache)) {
        // Routes are cached, use those
<?php

include '../vendor/aura/autoload/autoload.php';
include '../vendor/autoload.php';
$loader = new \Aura\Autoload\Loader();
$loader->register();
$loader->addPrefix('ShoppingCart\\Model', 'src/Model');
$loader->addPrefix('ShoppingCart', './');