當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。