예제 #1
0
파일: start.php 프로젝트: ajb/rfpez
<?php

Autoloader::directories(array(Bundle::path('administrator') . 'Libraries'));
Autoloader::namespaces(array('Admin' => Bundle::path('administrator')));
//set the config items if a user has provided an application config
foreach (Config::get('administrator::administrator', array()) as $key => $option) {
    if (Config::has('administrator.' . $key)) {
        Config::set('administrator::administrator.' . $key, Config::get('administrator.' . $key));
    }
}
예제 #2
0
| 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') . 'entities', path('app') . 'services', path('app') . 'libraries'));
/*
|--------------------------------------------------------------------------
| Laravel View Loader
|--------------------------------------------------------------------------
|
| The Laravel view loader is responsible for returning the full file path
| for the given bundle and view. Of course, a default implementation is
| provided to load views according to typical Laravel conventions but
| you may change this to customize how your views are organized.
|
*/
Event::listen(View::loader, function ($bundle, $view) {
    return View::file($bundle, $view, Bundle::path($bundle) . 'views');
});
/*
예제 #3
0
 * @copyright 2012 CreativityKills, LLC
 * @link http://github.com/CreativityKills/placeholdr/
 * @version 1.0
 */
/**
 * Placeholdr bundle root path.
 *
 * Using this value instead of Bundle::path('placeholdr') gives the developer
 * more options, especially when trying to rename the bundle.
 */
define('PLACEHOLDR', __DIR__ . DIRECTORY_SEPARATOR);
/**
 * Add libraries folder to autoloader loading directories.
 *
 * This will tell Laravel where to look when attempting to autoload Placeholdr
 * classes.
 */
Autoloader::directories(array(PLACEHOLDR . 'libraries'));
/**
 * Register a HTML macro for use in views.
 *
 * The Placeholdr HTML macro makes using Placeholdr within the application
 * views a breeze. Simple and elegant, the Laravel way ;)
 *
 * <code>
 * 	{{ HTML::placeholdr('300x300') }}
 * </code>
 */
HTML::macro('placeholdr', function ($dimension, $text = '', $attributes = array()) {
    return '<img src="' . URL::to_route('placeholdr', array($dimension, $text)) . '"' . HTML::attributes($attributes) . ' />';
});
예제 #4
0
파일: start.php 프로젝트: SerdarSanri/loggy
<?php

Autoloader::directories(array(Bundle::path('loggy') . 'classes', Bundle::path('loggy') . 'config'));
/*
AutoLoader::map(array(
	'Remote_Logger'	=> Bundle::path('loggy').'classes/remote_logger.php',
));
*/
Loggy::init();
예제 #5
0
<?php

// Set hashids configuration
$config = array('salt' => 'KareLGrouP159753', 'length' => 6);
// Autoload libraries folder
Autoloader::directories(array(Bundle::path('hashids') . 'libraries'));
Autoloader::namespaces(array('Hashids\\Libraries' => Bundle::path('hashids') . 'libraries'));
// Register Hashids in the IoC container for DRY code
// and Dependency Injection
IoC::register('hashids', function () use($config) {
    return new Hashids\Libraries\hashids($config['salt'], $config['length']);
});
예제 #6
0
 /**
  * Test the Autoloader::directories method.
  *
  * @group laravel
  */
 public function testPsrDirectoriesCanBeRegistered()
 {
     Autoloader::directories(array(path('app') . 'foo' . DS . 'bar', path('app') . 'foo' . DS . 'baz' . DS . DS));
     $this->assertTrue(in_array(path('app') . 'foo' . DS . 'bar' . DS, Autoloader::$directories));
     $this->assertTrue(in_array(path('app') . 'foo' . DS . 'baz' . DS, Autoloader::$directories));
 }
예제 #7
0
<?php

Autoloader::directories(array(Bundle::path('openexchange') . 'classes'));
예제 #8
0
<?php

Autoloader::directories(array(path('bundle') . 'mockup/config', path('bundle') . 'mockup/libraries', path('bundle') . 'litmus/libraries/Api'));
Autoloader::map(array('Mockup\\Util' => path('bundle') . 'mockup/libraries/Util.php', 'Litmus\\Api\\Litmus' => path('bundle') . 'litmus/libraries/Litmus/Api/Litmus.php'));
// end bundle/mockup/start.php
예제 #9
0
<?php

Autoloader::directories(array(Bundle::path('social') . 'inc'));
예제 #10
0
<?php

/*
|--------------------------------------------------------------------------
| Admin Models
|--------------------------------------------------------------------------
|
| Map Models  using PSR-0 standard namespace. 
*/
Autoloader::directories(array(path('bundle') . 'lara_admin/libraries'));
Autoloader::namespaces(array('Admin' => Bundle::path('lara_admin') . 'models'));
Autoloader::map(array('Lara_admin_Controller' => path('bundle') . '/lara_admin/controllers/lara_admin.php', 'LaraAdmin' => path('bundle') . '/lara_admin/lara_admin.php'));
LaraAdmin::make();
예제 #11
0
<?php

Autoloader::directories(array(Bundle::path('bob') . 'classes'));
예제 #12
0
<?php

/**
 * 	Autoload Uploader namespace
 */
Autoloader::namespaces(array('Uploader' => Bundle::path('juploader') . 'src' . DS . 'Uploader'));
// Load Interface iUploadHandler
require dirname(__FILE__) . DS . 'src' . DS . 'Uploader' . DS . 'iUploadHandler.php';
Autoloader::directories(array(Bundle::path('juploader') . 'models', Bundle::path('juploader') . 'libraries'));
/**
* 	IoC Management
*
*   You can also change the $options here
*       $name = (Auth::user()) ? Auth::user()->name : 'Anonymous';
*       $options['upload_dir'] = path('public').'/pictures/'.$name.'/';
*       $options['upload_url'] = URL::base().'/pictures/'.$name.'/';
*
*   However it's better to change the options per controller, like this:
*       $uploader = IoC::resolve('Uploader');
*       $uploader
*           ->with_option('override_name' , 'MyFixedName')
*           ->with_option('script_url' , URL::to_route('dbupload'))
*       ->Start();
*/
Laravel\IoC::register('Uploader', function () {
    $options = Config::get('juploader::settings');
    $uploader = isset($options['UploaderClass']) ? $options['UploaderClass'] : 'Uploader\\FileUploadHandler';
    $arguments = isset($options['UploaderArguments']) ? $options['UploaderArguments'] : null;
    $server_options = $options['Server'];
    return new Uploader\UploadServer($uploader, $arguments, $server_options);
});
예제 #13
0
<?php

/**
 * Author: RaymondChou
 * Date: 12-10-6
 * File: start.php
 * Email: zhouyt.kai7@gmail.com
 */
//Turn off the profiler to prevent wrong output
Config::set('application.profiler', false);
Autoloader::directories(array(path('bundle') . 'rest_service_api/libraries'));
require_once __DIR__ . '/libraries/markdown.php';
require_once __DIR__ . '/libraries/utility.php';
Autoloader::map(array('Api_Controller' => path('bundle') . 'rest_service_api/libraries/api_controller.php', 'Api' => path('bundle') . 'rest_service_api/libraries/api.php'));
예제 #14
0
파일: start.php 프로젝트: robotamer/authvel
<?php

Autoloader::namespaces(array('Authvel' => Bundle::path('authvel') . 'models'));
Autoloader::directories(array(__DIR__ . '/models'));
<?php

Autoloader::directories(array(__DIR__ . DS . 'classes', __DIR__ . DS . 'tasks'));
예제 #16
0
<?php

Autoloader::directories(array(Bundle::path('clickatell') . 'libraries'));
예제 #17
0
<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
Autoloader::directories(array(Bundle::path('backbonemvc') . 'classes'));
예제 #18
0
<?php

Autoloader::directories(array(__DIR__ . DS . 'classes', __DIR__ . DS . 'classes' . DS . 'generators'));
예제 #19
0
|--------------------------------------------------------------------------
| Auto-Loader Mappings
|--------------------------------------------------------------------------
|
| Laravel uses a simple array of class to path mappings to drive the class
| auto-loader. This simple approach helps avoid the performance problems
| of searching through directories by convention.
|
| 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(
                'LaraChat\\Chat' => __DIR__.'/larachat/chat.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());
// Autoload classes
Autoloader::namespaces(array('Larachat' => __DIR__ . DS));
예제 #20
0
<?php

// map redbean
Autoloader::map(array('R' => Bundle::path('redbean') . 'redbean/rb.php'));
// now our connector
Autoloader::directories(array(Bundle::path('redbean') . 'connector'));
// and connect
Connector::setup();
예제 #21
0
<?php

Autoloader::directories(array(Bundle::path('laraveltwittersearch') . 'classes'));
예제 #22
0
<?php

// Autoloader::map(array(
//     'Thrift'          => Bundle::path('evernote').'src/Thrift.php',
//     'TTransport'      => Bundle::path('evernote').'src/transport/TTransport.php',
//     'THttpClient'     => Bundle::path('evernote').'src/transport/THttpClient.php',
//     'TProtocol'       => Bundle::path('evernote').'src/protocol/TProtocol.php',
//     'TBinaryProtocol' => Bundle::path('evernote').'src/protocol/TBinaryProtocol.php',
//     'Types_types'     => Bundle::path('evernote').'src/packages/Types/Types_types.php',
//     'UserStore'       => Bundle::path('evernote').'src/packages/UserStore/UserStore.php',
//     'NoteStore'       => Bundle::path('evernote').'src/packages/NoteStore/NoteStore.php'
// ));
require_once Bundle::path('evernote') . 'src' . DS . 'Thrift.php';
require_once Bundle::path('evernote') . 'src' . DS . 'transport/TTransport.php';
require_once Bundle::path('evernote') . 'src' . DS . 'transport/THttpClient.php';
require_once Bundle::path('evernote') . 'src' . DS . 'protocol/TProtocol.php';
require_once Bundle::path('evernote') . 'src' . DS . 'protocol/TBinaryProtocol.php';
require_once Bundle::path('evernote') . 'src' . DS . 'packages/Types/Types_types.php';
require_once Bundle::path('evernote') . 'src' . DS . 'packages/UserStore/UserStore.php';
require_once Bundle::path('evernote') . 'src' . DS . 'packages/NoteStore/NoteStore.php';
Autoloader::directories(array(Bundle::path('evernote') . 'libraries', Bundle::path('evernote') . 'models'));
if (!class_exists('OAuth')) {
    die("<span style=\"color:red\">The PHP OAuth Extension is not installed</span>");
}
예제 #23
0
| 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
|--------------------------------------------------------------------------
|
| The Laravel view loader is responsible for returning the full file path
| for the given bundle and view. Of course, a default implementation is
| provided to load views according to typical Laravel conventions but
| you may change this to customize how your views are organized.
|
*/
Event::listen(View::loader, function ($bundle, $view) {
    return View::file($bundle, $view, Bundle::path($bundle) . 'views');
});
/*
예제 #24
0
<?php

Autoloader::directories(array(Bundle::path('imagine') . 'src'));