本文整理汇总了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');
}
示例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;
}
示例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.");
}
示例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();
}
示例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);
}
示例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, '\\/');
}
}
}
示例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);
}
示例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;
}
示例9:
<?php
Autoloader::namespaces(array('Auth' => Bundle::path('auth') . 'libraries'));
示例10:
<?php
Autoloader::namespaces(array('Multup' => Bundle::path('multup') . 'libraries'));
Autoloader::map(array('Multup' => __DIR__ . DS . 'multup.php'));
示例11:
<?php
// map class name to file
Autoloader::map(array('Hijri' => Bundle::path('hijri') . '/library/Hijri.php'));
示例12:
<?php
$root = Bundle::path('mimeil');
Autoloader::map(array('MiMeil' => $root . 'mimeil.php', 'LaMeil' => $root . 'lameil.php'));
示例13:
<?php
Autoloader::map(array('QR' => Bundle::path('qr') . 'qr.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');
示例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);
});