Esempio n. 1
0
function aliasIn($ns)
{
    $overridenPlarx = \Bundle::option('vane', 'ignorePlarx');
    $ns = trim($ns, '\\');
    foreach ($overridenPlarx as $class) {
        \Autoloader::alias("Vane\\{$class}", "{$ns}\\{$class}");
    }
    Plarx::supersede($ns, $overridenPlarx);
}
Esempio n. 2
0
<?php

/**
 * Part of the Nesty bundle for Laravel.
 *
 * @package    Nesty
 * @version    1.0
 * @author     Cartalyst LLC
 * @license    MIT License
 * @copyright  (c) 2011 - 2012, Cartalyst LLC
 * @link       http://cartalyst.com
 */
// Autoload classes
Autoloader::namespaces(array('Nesty' => Bundle::path('nesty')));
// Set the global alias for Nesty
Autoloader::alias('Nesty\\Nesty', 'Nesty');
 /**
  * Test the Autoloader::alias method.
  *
  * @group laravel
  */
 public function testAliasesCanBeRegistered()
 {
     Autoloader::alias('Foo\\Bar', 'Foo');
     $this->assertEquals('Foo\\Bar', Autoloader::$aliases['Foo']);
 }
Esempio n. 4
0
    if (Auth::guest()) {
        return Redirect::make('', 401);
    }
});
// --------------------------------------------------------------
// Setting system tables
// --------------------------------------------------------------
DBManager::$hidden = Config::get('domain::dbmanager.hidden');
$api_version = Config::get('layla.domain.api.version');
// --------------------------------------------------------------
// Map the Base Controller
// --------------------------------------------------------------
Autoloader::map(array('Domain_Base_Controller' => __DIR__ . DS . 'controllers' . DS . 'base' . EXT));
Route::filter('api_auth', function () {
    if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])) {
        //return Response::json(array(), 401);
    }
    //Auth::attempt();
});
Bundle::start('thirdparty_bob');
// --------------------------------------------------------------
// Load the routes
// --------------------------------------------------------------
Route::group(array('before' => 'api_auth'), function () use($api_version) {
    Route::api(Config::get('routes'), 'domain', Config::get('layla.domain.url_prefix'));
});
// --------------------------------------------------------------
// Set aliases
// --------------------------------------------------------------
Autoloader::alias('Domain\\Libraries\\Response', 'Response');
Esempio n. 5
0
<?php

/**
 * /bundles/imwg/start.php
 * Imwg - Imagemanipulation with GD
 *
 * @package  Laravel-Imwg
 * @version  1.0.1
 * @author   Nico R <*****@*****.**>
 * @link     https://github.com/Sentences
 */
Autoloader::namespaces(array('ImageManipulationWithGd' => __DIR__ . DS . 'classes' . DS));
Autoloader::alias('ImageManipulationWithGd\\Imwg', 'Imwg');
// Merge user configuration files
ImageManipulationWithGd\Config::merge();
Esempio n. 6
0
|--------------------------------------------------------------------------
| Register PSR-0 Autoloading
|--------------------------------------------------------------------------
|
| Basset uses PSR-0 autoloading to lazily load the required files when
| requested. Here we'll provide the namespaces and their corrosponding
| locations.
|
*/
Autoloader::namespaces(array('Assetic' => __DIR__ . '/vendor/assetic/src/Assetic', 'Basset' => __DIR__ . '/classes'));
/*
|--------------------------------------------------------------------------
| Basset Facade Alias
|--------------------------------------------------------------------------
|
| Alias Basset to the Basset Facade so that we can use a terser static
| syntax to access methods. Lovely.
|
*/
Autoloader::alias('Basset\\Facades\\Basset', 'Basset');
/*
|--------------------------------------------------------------------------
| Register Basset with the IoC
|--------------------------------------------------------------------------
|
| Basset is registered within the IoC container so that everything is
| somewhat testable. We'll use a facade to provide a terser static
| interface.
|
*/
IoC::instance('basset', new Basset\Basset());
<?php

Autoloader::namespaces(array('Bouncer' => Bundle::path('bouncer') . 'src'));
Autoloader::alias('Bouncer\\Bouncer', 'Bouncer');
IoC::register('bouncer: roles_extractor', function () {
    return function ($user) {
        return array_map(function ($r) {
            return $r->name;
        }, $user->roles);
    };
});
Esempio n. 8
0
<?php

Autoloader::map(array('Laravel\\Asset_Container' => path('sys') . 'asset.php'));
Autoloader::namespaces(array('AssetCompressor' => __DIR__));
Autoloader::alias('AssetCompressor\\Asset', 'Asset');
Esempio n. 9
0
<?php

Autoloader::namespaces(array('Layla' => __DIR__));
// --------------------------------------------------------------
// Set Aliases
// --------------------------------------------------------------
Autoloader::alias('Layla\\Notification', 'Notification');
Autoloader::alias('Layla\\HTML', 'HTML');
Autoloader::alias('Layla\\Module', 'Module');
Autoloader::alias('Layla\\Route', 'Route');
Esempio n. 10
0
<?php

/**
 * --------------------------------------------------------------------------
 * DomainTools
 * --------------------------------------------------------------------------
 *
 * Domain Tools, a bundle for use with the Laravel Framework.
 *
 * @package  Domain Tools
 * @version  2.0.0
 * @author   Bruno Gaspar <*****@*****.**>
 * @link     https://github.com/bruno-g/domaintools
 */
/*
 * --------------------------------------------------------------------------
 * Register some namespaces.
 * --------------------------------------------------------------------------
 */
Autoloader::namespaces(array('DomainTools\\Libraries' => __DIR__ . DS . 'libraries', 'DomainTools' => __DIR__ . DS));
/*
 * --------------------------------------------------------------------------
 * Set the global alias.
 * --------------------------------------------------------------------------
 */
Autoloader::alias('DomainTools\\DomainTools', 'DomainTools');
Esempio n. 11
0
/**
 * --------------------------------------------------------------------------
 * Cartify
 * --------------------------------------------------------------------------
 *
 * Cartify, a shopping cart bundle for use with the Laravel Framework.
 *
 * @package  Cartify
 * @version  2.1.1
 * @author   Bruno Gaspar <*****@*****.**>
 * @link     https://github.com/bruno-g/cartify
 */
/*
 * --------------------------------------------------------------------------
 * Register the namespaces.
 * --------------------------------------------------------------------------
 */
Autoloader::namespaces(array('Cartify' => __DIR__ . DS));
/*
 * --------------------------------------------------------------------------
 * Set the global alias.
 * --------------------------------------------------------------------------
 */
Autoloader::alias('Cartify\\Cartify', 'Cartify');
Autoloader::alias('Cartify\\CartifyException', 'CartifyException');
/*
 * --------------------------------------------------------------------------
 * Include our helpers file.
 * --------------------------------------------------------------------------
 */
require_once __DIR__ . DS . 'helpers.php';
Esempio n. 12
0
<?php

/**
* Part of the LinxFix bundle for Laravel.
*
* NOTICE OF LICENSE
*
* Licensed under the 3-clause BSD License.
*
* This source file is subject to the 3-clause BSD License that is
* bundled with this package in the LICENSE file. It is also available at
* the following URL: http://www.opensource.org/licenses/BSD-3-Clause
*
* @package LinxFix
* @version 1.0
* @author Squegg Ltd
* @license BSD License (3-clause)
* @copyright (c) 2012 - 2013, Squegg Ltd
* @link http://www.squegg.com
*/
// Autoload classes
Autoloader::namespaces(array('LinxFix' => Bundle::path('linxfix')));
// Set the global alias
Autoloader::alias('LinxFix\\LinxFix', 'LinxFix');
// Overriding the regular app 404 with LinxFix.
Event::override('404', function () {
    return LinxFix::correct();
});
Esempio n. 13
0
<?php

Autoloader::map(array('Slugger\\Slugger' => Bundle::path('slugger') . 'slugger.php'));
Autoloader::alias('Slugger\\Slugger', 'Slugger');
Esempio n. 14
0
<?php

/**
 * Part of the Sentry bundle for Laravel.
 *
 * NOTICE OF LICENSE
 *
 * Licensed under the 3-clause BSD License.
 *
 * This source file is subject to the 3-clause BSD License that is
 * bundled with this package in the LICENSE file.  It is also available at
 * the following URL: http://www.opensource.org/licenses/BSD-3-Clause
 *
 * @package    Sentry
 * @version    1.0
 * @author     Cartalyst LLC
 * @license    BSD License (3-clause)
 * @copyright  (c) 2011 - 2012, Cartalyst LLC
 * @link       http://cartalyst.com
 */
// Autoload classes
Autoloader::namespaces(array('Sentry' => Bundle::path('sentry')));
// Set the global alias for Sentry
Autoloader::alias('Sentry\\Sentry', 'Sentry');
Autoloader::alias('Sentry\\SentryException', 'SentryException');
Sentry::_init();
Esempio n. 15
0
<?php

/**
 * Twitter's Bootstrap for Laravel
 * 
 * @package     Bundles
 * @subpackage  Twitter
 * @author      Phill Sparks <*****@*****.**>
 * 
 * @see  http://github.com/sparksp/laravel-twitter
 * @see  http://twitter.github.com/bootstrap/
 */
Autoloader::map(array('Bootsparks\\Form' => __DIR__ . DS . 'form' . EXT, 'Bootsparks\\HTML' => __DIR__ . DS . 'html' . EXT));
Autoloader::alias('Bootsparks\\Form', 'Form');
Autoloader::alias('Bootsparks\\HTML', 'HTML');