示例#1
0
<?php

Autoloader::map(array('Akismet' => Bundle::path('akismet') . 'Akismet.php'));
示例#2
0
<?php

Autoloader::map(array('Flyswatter_Base_Controller' => Bundle::path('flyswatter') . 'controllers/base.php'));
Autoloader::namespaces(array('Flyswatter\\Models' => Bundle::path('flyswatter') . 'models'));
示例#3
0
<?php

/**
 * Bootstrapper for creating Twitter Bootstrap markup.
 *
 * @package     Bundles
 * @subpackage  Twitter
 * @author      Patrick Talmadge - Follow @patricktalmadge
 *
 * @see http://twitter.github.com/bootstrap/
 */
Autoloader::map(array('Bootstrapper\\Alert' => __DIR__ . '/alert.php', 'Bootstrapper\\Badges' => __DIR__ . '/badges.php', 'Bootstrapper\\Breadcrumbs' => __DIR__ . '/breadcrumbs.php', 'Bootstrapper\\ButtonGroup' => __DIR__ . '/buttongroup.php', 'Bootstrapper\\Buttons' => __DIR__ . '/buttons.php', 'Bootstrapper\\ButtonToolbar' => __DIR__ . '/buttontoolbar.php', 'Bootstrapper\\Carousel' => __DIR__ . '/carousel.php', 'Bootstrapper\\DropdownButton' => __DIR__ . '/dropdownbutton.php', 'Bootstrapper\\Form' => __DIR__ . '/form.php', 'Bootstrapper\\Helpers' => __DIR__ . '/helpers.php', 'Bootstrapper\\Icons' => __DIR__ . '/icons.php', 'Bootstrapper\\Labels' => __DIR__ . '/labels.php', 'Bootstrapper\\Navbar' => __DIR__ . '/navbar.php', 'Bootstrapper\\Navigation' => __DIR__ . '/navigation.php', 'Bootstrapper\\Paginator' => __DIR__ . '/paginator.php', 'Bootstrapper\\Progress' => __DIR__ . '/progress.php', 'Bootstrapper\\SplitDropdownButton' => __DIR__ . '/splitdropdownbutton.php', 'Bootstrapper\\Tabbable' => __DIR__ . '/tabbable.php', 'Bootstrapper\\Tables' => __DIR__ . '/tables.php', 'Bootstrapper\\Typeahead' => __DIR__ . '/typeahead.php'));
Asset::container('bootstrapper')->bundle('bootstrapper');
//Asset::container('bootstrapper')->add('jquery',  'js/jquery-1.8.1.js');
Asset::container('bootstrapper')->add('jquery', 'js/jquery-1.8.1.min.js');
//Asset::container('bootstrapper')->add('bootstrap',  'css/bootstrap.css');
Asset::container('bootstrapper')->add('bootstrap', 'css/bootstrap.min.css');
//Not Needed if you don't have the top nav bar
Asset::container('bootstrapper')->add('nav-fix', 'css/nav-fix.css');
//Asset::container('bootstrapper')->add('bootstrap-responsive',  'css/bootstrap-responsive.css');
Asset::container('bootstrapper')->add('bootstrap-responsive', 'css/bootstrap-responsive.min.css');
//Asset::container('bootstrapper')->add('bootstrap-js',  'js/bootstrap.js');
Asset::container('bootstrapper')->add('bootstrap-js', 'js/bootstrap.min.js');
示例#4
0
<?php

Autoloader::namespaces(array('Multup' => Bundle::path('multup') . 'libraries'));
Autoloader::map(array('Multup' => __DIR__ . DS . 'multup.php'));
示例#5
0
<?php

Autoloader::map(array('SFTP' => __DIR__ . DS . 'classes/SFTP.php'));
示例#6
0
<?php

// --------------------------------------------------------------
// Set constants
// --------------------------------------------------------------
define('MUSTACHE_EXT', '.mustache');
// --------------------------------------------------------------
// Register classes
// --------------------------------------------------------------
Autoloader::map(array('Mustache' => __DIR__ . DS . 'mustache' . EXT, 'LaylaMustache' => __DIR__ . DS . 'laylamustache' . EXT));
// --------------------------------------------------------------
// Add event listeners
// --------------------------------------------------------------
Event::listen(View::loader, function ($bundle, $view) {
    return LaylaMustache::file($bundle, $view, Bundle::path($bundle) . 'views');
});
Event::listen(View::engine, function ($view) {
    // The Blade view engine should only handle the rendering of views which
    // end with the Blade extension. If the given view does not, we will
    // return false so the View can be rendered as normal.
    if (!str_contains($view->path, MUSTACHE_EXT)) {
        return;
    }
    if (count($view->data) > 1) {
        $mustache = new LaylaMustache();
        return $mustache->render(File::get($view->path), $view->data());
    }
    return File::get($view->path);
});
示例#7
0
文件: start.php 项目: SerdarSanri/qr
<?php

Autoloader::map(array('QR' => Bundle::path('qr') . 'qr.php'));
| simply register the configured class aliases.
|
*/
$aliases = Laravel\Config::get('application.aliases');
Laravel\Autoloader::$aliases = $aliases;
/*
|--------------------------------------------------------------------------
| Auto-Loader Mappings
|--------------------------------------------------------------------------
|
| Registering a mapping couldn't be easier. Just pass an array of class
| to path maps into the "map" function of Autoloader. Then, when you
| want to use that class, just use it. It's simple!
|
*/
Autoloader::map(array('Base_Controller' => path('app') . 'controllers/base.php', 'Referral' => path('app') . 'models/referrals.php', 'Revenue' => path('app') . 'models/revenues.php', 'User' => path('app') . 'models/users.php', 'Option' => path('app') . 'models/options.php', 'RawNotification' => path('app') . 'models/raw_notifications.php', 'SubscriptionHistory' => path('app') . 'models/subscription_history.php', 'Notification' => path('app') . 'models/notifications.php'));
/*
|--------------------------------------------------------------------------
| Auto-Loader Directories
|--------------------------------------------------------------------------
|
| The Laravel auto-loader can search directories for files using the PSR-0
| naming convention. This convention basically organizes classes by using
| the class namespace to indicate the directory structure.
|
*/
Autoloader::directories(array(path('app') . 'models', path('app') . 'libraries'));
/*
|--------------------------------------------------------------------------
| Laravel View Loader
|--------------------------------------------------------------------------
示例#9
0
<?php

Autoloader::namespaces(array('extjs' => Bundle::path('extjs') . 'models'));
Autoloader::map(array('lext' => Bundle::path('extjs') . 'libraries/lext.php'));
示例#10
0
| conventions throughout the "laravel" directory since all core classes
| are namespaced into the "Laravel" namespace.
|
*/
Autoloader::namespaces(array('Laravel' => path('sys')));
/*
|--------------------------------------------------------------------------
| Register Eloquent Mappings
|--------------------------------------------------------------------------
|
| A few of the Eloquent ORM classes use a non PSR-0 naming standard so
| we will just map them with hard-coded paths here since PSR-0 uses
| underscores as directory hierarchy indicators.
|
*/
Autoloader::map(array('Laravel\\Database\\Eloquent\\Relationships\\Belongs_To' => path('sys') . 'database/eloquent/relationships/belongs_to' . EXT, 'Laravel\\Database\\Eloquent\\Relationships\\Has_Many' => path('sys') . 'database/eloquent/relationships/has_many' . EXT, 'Laravel\\Database\\Eloquent\\Relationships\\Has_Many_And_Belongs_To' => path('sys') . 'database/eloquent/relationships/has_many_and_belongs_to' . EXT, 'Laravel\\Database\\Eloquent\\Relationships\\Has_One' => path('sys') . 'database/eloquent/relationships/has_one' . EXT, 'Laravel\\Database\\Eloquent\\Relationships\\Has_One_Or_Many' => path('sys') . 'database/eloquent/relationships/has_one_or_many' . EXT));
/*
|--------------------------------------------------------------------------
| Register The Symfony Components
|--------------------------------------------------------------------------
|
| Laravel makes use of the Symfony components where the situation is
| applicable and it is possible to do so. This allows us to focus
| on the parts of the framework that are unique and not re-do
| plumbing code that others have written.
|
*/
Autoloader::namespaces(array('Symfony\\Component\\Console' => path('sys') . 'vendor/Symfony/Component/Console', 'Symfony\\Component\\HttpFoundation' => path('sys') . 'vendor/Symfony/Component/HttpFoundation'));
/*
|--------------------------------------------------------------------------
| Magic Quotes Strip Slashes
示例#11
0
<?php

Autoloader::map(array('Datatables' => Bundle::path('datatables') . 'Datatables.php'));
<?php

/**
 * Easily slugify all your Eloquent models
 *
 * @package Sluggable
 * @version 1.0
 * @author  Colin Viebrock <*****@*****.**>
 * @author  Bryan te Beek <*****@*****.**>
 * @link    http://github.com/bryantebeek/laravel-bundle-sluggable
 */
Autoloader::map(array('Sluggable' => __DIR__ . DS . 'sluggable.php'));
// Listen to the Eloquent save event so we can sluggify on the fly
Event::listen('eloquent.saving', array('Sluggable', 'make'));
示例#13
0
<?php

Autoloader::map(array('MenuHTML' => __DIR__ . DS . 'menuhtml' . EXT, 'Menu' => __DIR__ . DS . 'menu' . EXT, 'MenuItems' => __DIR__ . DS . 'menu' . EXT));
示例#14
0
<?php

use PHPImageWorkshop\ImageWorkshop;
//require_once(__DIR__.DS.'PHPImageWorkshop'.DS.'ImageWorkshop.php');
Autoloader::map(array('PHPImageWorkshop\\ImageWorkshop' => __DIR__ . DS . 'PHPImageWorkshop' . DS . 'ImageWorkshop.php'));
示例#15
0
<?php

/**
 * Authorized for Laravel
 * 
 * @package     Bundles
 * @subpackage  Zend_Acl
 * @author      Teepluss <*****@*****.**>
 * 
 * @see  http://framework.zend.com/manual/1.12/en/zend.acl.html
 */
/**
 * Check zend acl component.
 */
if (!class_exists('Zend_Acl')) {
    throw new Exception('This bundle required Zend installed.');
}
/**
 * Autoload Authorized.
 */
Autoloader::map(array('Authorized' => __DIR__ . DS . 'authorized' . EXT));
/**
 * Start using Authorized with authenticated user.
 */
Authorized::initialize(Auth::user());
/**
 * Auto route example to url /acl_examples.
 */
Route::any('acl_examples/(:any?)', array('as' => 'acl_examples', 'uses' => 'authorized::examples@(:1)', 'defaults' => 'index'));
| simply register the configured class aliases.
|
*/
$aliases = Laravel\Config::get('application.aliases');
Laravel\Autoloader::$aliases = $aliases;
/*
|--------------------------------------------------------------------------
| Auto-Loader Mappings
|--------------------------------------------------------------------------
|
| Registering a mapping couldn't be easier. Just pass an array of class
| to path maps into the "map" function of Autoloader. Then, when you
| want to use that class, just use it. It's simple!
|
*/
Autoloader::map(array('Admin_Controller' => path('app') . 'controllers/admin.php', 'Base_Controller' => path('app') . 'controllers/base.php', 'WideImage' => path('app') . 'libraries/wideimage/WideImage.php'));
/*
|--------------------------------------------------------------------------
| Auto-Loader Directories
|--------------------------------------------------------------------------
|
| The Laravel auto-loader can search directories for files using the PSR-0
| naming convention. This convention basically organizes classes by using
| the class namespace to indicate the directory structure.
|
*/
Autoloader::directories(array(path('app') . 'models', path('app') . 'libraries'));
/*
|--------------------------------------------------------------------------
| Laravel View Loader
|--------------------------------------------------------------------------
示例#17
0
<?php

/**
 * @author Matthew Muscat < http://www.mamis.com.au/ >
 * @copyright 2013 www.mamis.com.au
 * @license http://creativecommons.org/licenses/by-sa/3.0/
 * @package Facebook (Laravel Bundle)
 * @version 1.0 - 2013-02-11
 */
Autoloader::map(array('Facebook' => __DIR__ . '/facebook.php', 'Facebook\\Facebook' => __DIR__ . '/vendor/Facebook.php'));
示例#18
0
<?php

// map class name to file
Autoloader::map(array('HOTPass' => Bundle::path('otpass') . '/library/HOTPass.class.php'));
示例#19
0
<?php

Autoloader::map(array('Recaptcha\\Recaptcha' => __DIR__ . DS . 'recaptcha' . EXT));
Laravel\Validator::register('recaptcha', function ($attribute, $value, $parameters) {
    $recaptcha = Recaptcha\Recaptcha::recaptcha_check_answer($parameters[0], Laravel\Request::ip(), Laravel\Input::get('recaptcha_challenge_field'), $value);
    return $recaptcha->is_valid;
});
示例#20
0
<?php

$root = Bundle::path('mimeil');
Autoloader::map(array('MiMeil' => $root . 'mimeil.php', 'LaMeil' => $root . 'lameil.php'));
示例#21
0
<?php

Autoloader::map(array('CoolCaptcha\\Captcha' => __DIR__ . DS . 'classes' . DS . 'captcha.php'));
Laravel\Validator::register('coolcaptcha', function ($attribute, $value, $parameters) {
    return CoolCaptcha\Captcha::check($value);
});
示例#22
0
    }
});
Route::filter('auth', function () {
    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
示例#23
0
<?php

// map class name to file
Autoloader::map(array('Hijri' => Bundle::path('hijri') . '/library/Hijri.php'));
示例#24
0
<?php

// register the class
Autoloader::namespaces(array('FormBaseModel' => __DIR__));
// register the example code
// you may remove or comment out the following lines to disable example routing
Autoloader::map(array('ExampleForm' => __DIR__ . '/models/exampleform.php'));
Route::any('form_examples/(:any?)/(:any?)/(:any?)/(:any?)/(:any?)', array('as' => 'form_examples', 'uses' => 'form-base-model::examples@(:1)', 'defaults' => array('index')));
示例#25
0
function random($length = 16)
{
    $pool = str_split('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', 1);
    $value = '';
    for ($i = 0; $i < $length; $i++) {
        $value .= $pool[mt_rand(0, 61)];
    }
    return $value;
}
/*
	Include some files.
*/
require PATH . 'system/classes/autoload.php';
require PATH . 'system/classes/helpers.php';
// map classes
Autoloader::map(array('Schema' => PATH . 'upgrade/classes/schema.php', 'Migrations' => PATH . 'upgrade/classes/migrations.php'));
// tell the autoloader where to find classes
Autoloader::directory(array(PATH . 'system/classes/'));
// register the auto loader
Autoloader::register();
/**
	Report all errors let our error class decide which to display
*/
error_reporting(-1);
/**
	Error display will be handled by our error class
*/
ini_safe_set('display_errors', false);
// Register the default timezone for the application.
date_default_timezone_set(Config::get('application.timezone'));
// Register the PHP exception handler.
示例#26
0
 /**
  * Test the loading of hard-coded classes.
  *
  * @group laravel
  */
 public function testHardcodedClassesCanBeLoaded()
 {
     Autoloader::map(array('Autoloader_HardCoded' => path('app') . 'models' . DS . 'autoloader.php'));
     $this->assertInstanceOf('Autoloader_HardCoded', new Autoloader_HardCoded());
 }
示例#27
0
| simply register the configured class aliases.
|
*/
$aliases = Laravel\Config::get('application.aliases');
Laravel\Autoloader::$aliases = $aliases;
/*
|--------------------------------------------------------------------------
| Auto-Loader Mappings
|--------------------------------------------------------------------------
|
| Registering a mapping couldn't be easier. Just pass an array of class
| to path maps into the "map" function of Autoloader. Then, when you
| want to use that class, just use it. It's simple!
|
*/
Autoloader::map(array('Base_Controller' => path('app') . 'controllers/base.php'));
/*
|--------------------------------------------------------------------------
| Auto-Loader Directories
|--------------------------------------------------------------------------
|
| The Laravel auto-loader can search directories for files using the PSR-0
| naming convention. This convention basically organizes classes by using
| the class namespace to indicate the directory structure.
|
*/
Autoloader::directories(array(path('app') . 'models', path('app') . 'libraries'));
/*
|--------------------------------------------------------------------------
| Laravel View Loader
|--------------------------------------------------------------------------
示例#28
0
<?php

/**
 * Easy thumbnailing for your Eloquent models.
 *
 * @package Thumbnailable
 * @version 1.7.1
 * @author  Colin Viebrock <*****@*****.**>
 * @link    http://github.com/cviebrock/thumbnailable
 */
Autoloader::map(array('Thumbnailable' => __DIR__ . DS . 'thumbnailable.php', 'Thumbnailer' => __DIR__ . DS . 'thumbnailer.php'));
// Listen to the Eloquent save/delete events so we can do our thing:
Event::listen('eloquent.saving', array('Thumbnailer', 'saving'));
Event::listen('eloquent.updated', array('Thumbnailer', 'updated'));
Event::listen('eloquent.deleted', array('Thumbnailer', 'deleted'));
示例#29
0
<?php

Autoloader::map(array('XMLRPC\\XML_RPC' => __DIR__ . DS . 'xmlrpc' . EXT));
示例#30
0
文件: start.php 项目: robmeijer/seer
| simply register the configured class aliases.
|
*/
$aliases = Laravel\Config::get('application.aliases');
Laravel\Autoloader::$aliases = $aliases;
/*
|--------------------------------------------------------------------------
| Auto-Loader Mappings
|--------------------------------------------------------------------------
|
| Registering a mapping couldn't be easier. Just pass an array of class
| to path maps into the "map" function of Autoloader. Then, when you
| want to use that class, just use it. It's simple!
|
*/
Autoloader::map(array('Frontend_Controller' => path('app') . 'controllers/frontend.php', 'Admin_Controller' => path('app') . 'controllers/admin.php'));
/*
|--------------------------------------------------------------------------
| Auto-Loader Directories
|--------------------------------------------------------------------------
|
| The Laravel auto-loader can search directories for files using the PSR-0
| naming convention. This convention basically organizes classes by using
| the class namespace to indicate the directory structure.
|
*/
Autoloader::directories(array(path('app') . 'models', path('app') . 'libraries'));
/*
|--------------------------------------------------------------------------
| Laravel View Loader
|--------------------------------------------------------------------------