当前位置: 首页>>代码示例>>PHP>>正文


PHP Autoloader::directories方法代码示例

本文整理汇总了PHP中Autoloader::directories方法的典型用法代码示例。如果您正苦于以下问题:PHP Autoloader::directories方法的具体用法?PHP Autoloader::directories怎么用?PHP Autoloader::directories使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Autoloader的用法示例。


在下文中一共展示了Autoloader::directories方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

<?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));
    }
}
开发者ID:ajb,项目名称:rfpez,代码行数:10,代码来源:start.php

示例2: path

| 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');
});
/*
开发者ID:e-gob,项目名称:api-feriados,代码行数:31,代码来源:start.php

示例3: define

 * @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) . ' />';
});
开发者ID:neoighodaro,项目名称:placeholdr,代码行数:31,代码来源:start.php

示例4:

<?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();
开发者ID:SerdarSanri,项目名称:loggy,代码行数:9,代码来源:start.php

示例5: array

<?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']);
});
开发者ID:TahsinGokalp,项目名称:L3-Eticaret,代码行数:12,代码来源:start.php

示例6: testPsrDirectoriesCanBeRegistered

 /**
  * 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));
 }
开发者ID:gilyaev,项目名称:framework-bench,代码行数:11,代码来源:autoloader.test.php

示例7:

<?php

Autoloader::directories(array(Bundle::path('openexchange') . 'classes'));
开发者ID:SerdarSanri,项目名称:openexchange,代码行数:3,代码来源:start.php

示例8: path

<?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
开发者ID:aaronbullard,项目名称:litmus,代码行数:5,代码来源:start.php

示例9: path

<?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();
开发者ID:robriggen,项目名称:lara_admin,代码行数:13,代码来源:start.php

示例10: dirname

<?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);
});
开发者ID:ajayvaineela,项目名称:laravel-juploader,代码行数:31,代码来源:start.php

示例11: path

<?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'));
开发者ID:SerdarSanri,项目名称:RestServiceApi,代码行数:14,代码来源:start.php

示例12:

<?php

Autoloader::namespaces(array('Authvel' => Bundle::path('authvel') . 'models'));
Autoloader::directories(array(__DIR__ . '/models'));
开发者ID:robotamer,项目名称:authvel,代码行数:4,代码来源:start.php

示例13:

<?php

Autoloader::directories(array(__DIR__ . DS . 'classes', __DIR__ . DS . 'tasks'));
开发者ID:aalluri-navaratan,项目名称:laravel-multi-tenant-old,代码行数:3,代码来源:start.php

示例14:

<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
Autoloader::directories(array(Bundle::path('backbonemvc') . 'classes'));
开发者ID:SerdarSanri,项目名称:BackboneMVC,代码行数:7,代码来源:start.php

示例15:

<?php

Autoloader::directories(array(__DIR__ . DS . 'classes', __DIR__ . DS . 'classes' . DS . 'generators'));
开发者ID:reith2004,项目名称:components,代码行数:3,代码来源:start.php


注:本文中的Autoloader::directories方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。