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


PHP Bundle::path方法代码示例

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


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

示例1: __construct

 /**
  * Set up a mock environment to test iBundle.
  *
  * @return  null
  */
 public function __construct()
 {
     // Start the bundle
     Bundle::start('ibundle');
     // Set test ibundle cache file
     $this->cache_file = ibundle_config('file', Bundle::path('ibundle') . 'storage/test.cache');
 }
开发者ID:neoighodaro,项目名称:ibundle,代码行数:12,代码来源:ibundle.test.php

示例2: _getSeedFolders

 /**
  * @return array of paths that we can find seeds
  */
 protected function _getSeedFolders()
 {
     $bins = array(path('app') . 'seeds' . DIRECTORY_SEPARATOR);
     foreach (Bundle::$bundles as $bundle) {
         $bins[] = Bundle::path($bundle['location']) . 'seeds' . DIRECTORY_SEPARATOR;
     }
     return $bins;
 }
开发者ID:jvillasante,项目名称:cubanartjb,代码行数:11,代码来源:seed.php

示例3: path

 /**
  * Get the path to a view on disk.
  *
  * @param $view
  *
  * @return string
  * @throws \Exception
  */
 protected function path($view)
 {
     $root = \Bundle::path(\Bundle::name($view)) . 'views';
     $path = $root . DS . \Bundle::element($view);
     if (file_exists($path)) {
         return $path;
     }
     throw new \Exception("View [{$view}] does not exist.");
 }
开发者ID:SerdarSanri,项目名称:laravel-weed,代码行数:17,代码来源:filesystem.php

示例4: __construct

 /**
  * Start the generation process.
  *
  * @return void
  */
 public function __construct($args)
 {
     parent::__construct($args);
     // we need a controller name
     if ($this->lower == null) {
         Common::error('You must specify a bundle name.');
     }
     // add the directory copy to the writer
     $this->writer->copy_directory('Bundle', $this->lower, Bundle::path('bob') . 'templates/bundle', path('bundle') . $this->lower);
     $this->writer->write();
 }
开发者ID:gigikiri,项目名称:masjid-l3,代码行数:16,代码来源:bundle.php

示例5: refresh

 public static function refresh()
 {
     $default_data = array('service' => null, 'timestamp' => time(), 'ip' => self::ip(), 'city' => null, 'state' => null, 'state_code' => null, 'country' => null, 'country_code' => null, 'zipcode' => null, 'lat' => null, 'lng' => null);
     foreach (Config::get('locate::options.service_priority') as $service) {
         require_once Bundle::path('locate') . 'services/' . strtolower($service) . '.php';
         $data = $service::run();
         if ($data !== false) {
             $default_data['service'] = $service;
             break;
         }
     }
     Session::put('locate', isset($data) && is_array($data) ? array_merge($default_data, $data) : $default_data);
 }
开发者ID:SerdarSanri,项目名称:locate,代码行数:13,代码来源:locate.php

示例6: assetPath

function assetPath($url)
{
    $url = asset($url);
    $base = rtrim(\URL::to_asset(''), '/') . '/';
    if (S::unprefix($url, $base)) {
        if (strtok($url, '/') === 'bundles') {
            $bundle = strtok('/');
            $path = strtok(null);
            return \Bundle::path($bundle) . 'public' . DS . ltrim($path, '\\/');
        } else {
            return \path('public') . ltrim($url, '\\/');
        }
    }
}
开发者ID:SerdarSanri,项目名称:VaneMart,代码行数:14,代码来源:core.php

示例7: __callStatic

 /**
  * Creates a new instance for the specified Campaign Monitor API class
  *
  * @param	string		$class
  * @param	string		$arguments
  * @return 	CS_REST_$class Object
  */
 public static function __callStatic($class, $arguments)
 {
     // Reset any string formatting
     $class = strtolower($class);
     // Include the class file
     require_once Bundle::path('campaignmonitor') . 'vendor/csrest_' . $class . '.php';
     $options = array(Config::get('campaignmonitor.api_key'));
     if (isset($arguments[0])) {
         array_unshift($options, $arguments[0]);
     }
     // Load the class
     $class = 'CS_REST_' . ucfirst($class);
     $instance = new ReflectionClass($class);
     return $instance->newInstanceArgs($options);
 }
开发者ID:SerdarSanri,项目名称:laravel-campaignmonitor,代码行数:22,代码来源:campaignmonitor.php

示例8: configure

 static function configure(\ThumbGen $thumb, array $input, array $options = null)
 {
     $options === null and $options = \Config::get('vanemart::thumb');
     extract($options, EXTR_SKIP);
     $thumb->temp(\Bundle::path('vanemart') . 'public/thumbs')->type($type, $quality)->remoteCacheTTL($remoteCacheTTL)->size(array_get($input, 'width', 0), array_get($input, 'height', 0))->restrict('width', $widthMin, $widthMax)->restrict('height', $heightMin, $heightMax)->step($step, array_get($input, 'up'))->fill(array_get($input, 'fill'));
     if ($watermark) {
         if ($watermark['count'] == 1) {
             $thumb->watermark($watermark['file'], $watermark['y'], $watermark['x']);
         } else {
             $thumb->watermarks($watermark['count'], $watermark['file'], $watermark['x']);
         }
     }
     Event::fire('thumb.configure', array($thumb, compact('input', 'options')));
     return $thumb;
 }
开发者ID:SerdarSanri,项目名称:VaneMart,代码行数:15,代码来源:Thumb.php

示例9:

<?php

Autoloader::namespaces(array('Auth' => Bundle::path('auth') . 'libraries'));
开发者ID:juaniiie,项目名称:mwi,代码行数:3,代码来源:start.php

示例10:

<?php

Autoloader::namespaces(array('Multup' => Bundle::path('multup') . 'libraries'));
Autoloader::map(array('Multup' => __DIR__ . DS . 'multup.php'));
开发者ID:angmark0309,项目名称:remarket,代码行数:4,代码来源:start.php

示例11:

<?php

// map class name to file
Autoloader::map(array('Hijri' => Bundle::path('hijri') . '/library/Hijri.php'));
开发者ID:saeed2700,项目名称:Hijri-Laravel-Bundle,代码行数:4,代码来源:start.php

示例12:

<?php

$root = Bundle::path('mimeil');
Autoloader::map(array('MiMeil' => $root . 'mimeil.php', 'LaMeil' => $root . 'lameil.php'));
开发者ID:SerdarSanri,项目名称:MiMeil,代码行数:4,代码来源:start.php

示例13:

<?php

Autoloader::map(array('QR' => Bundle::path('qr') . 'qr.php'));
开发者ID:SerdarSanri,项目名称:qr,代码行数:3,代码来源:start.php

示例14:

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

示例15: path

|
*/
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');
});
/*
|--------------------------------------------------------------------------
| Laravel Language Loader
|--------------------------------------------------------------------------
|
| The Laravel language loader is responsible for returning the array of
| language lines for a given bundle, language, and "file". A default
| implementation has been provided which uses the default language
| directories included with Laravel.
|
*/
Event::listen(Lang::loader, function ($bundle, $language, $file) {
    return Lang::file($bundle, $language, $file);
});
开发者ID:bankorh,项目名称:ecom1_laravel,代码行数:31,代码来源:start.php


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