本文整理汇总了PHP中Fuel::add_package方法的典型用法代码示例。如果您正苦于以下问题:PHP Fuel::add_package方法的具体用法?PHP Fuel::add_package怎么用?PHP Fuel::add_package使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fuel
的用法示例。
在下文中一共展示了Fuel::add_package方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
public static function init($args)
{
try {
if (!isset($args[1])) {
static::help();
return;
}
switch ($args[1]) {
case 'g':
case 'generate':
switch ($args[2]) {
case 'controller':
case 'model':
case 'view':
case 'views':
case 'migration':
call_user_func('Oil\\Generate::' . $args[2], array_slice($args, 3));
break;
case 'scaffold':
call_user_func('Oil\\Scaffold::generate', array_slice($args, 3));
break;
default:
Generate::help();
}
break;
case 'c':
case 'console':
new Console();
case 'r':
case 'refine':
$task = isset($args[2]) ? $args[2] : null;
call_user_func('Oil\\Refine::run', $task, array_slice($args, 3));
break;
case 'p':
case 'package':
switch ($args[2]) {
case 'install':
case 'uninstall':
call_user_func_array('Oil\\Package::' . $args[2], array_slice($args, 3));
break;
default:
Package::help();
}
break;
case '-v':
case '--version':
\Cli::write('Fuel: ' . \Fuel::VERSION);
break;
case 'test':
\Fuel::add_package('octane');
call_user_func('\\Fuel\\Octane\\Tests::run_' . $args[2], array_slice($args, 3));
break;
default:
static::help();
}
} catch (Exception $e) {
\Cli::write(\Cli::color('Error: ' . $e->getMessage(), 'light_red'));
\Cli::beep();
}
}
示例2: init
public static function init($args)
{
if ( ! isset($args[1]))
{
static::help();
return;
}
switch ($args[1])
{
case 'g':
case 'generate':
switch ($args[2])
{
case 'controller':
case 'model':
case 'view':
case 'views':
case 'migration':
call_user_func('Oil\Generate::'.$args[2], array_slice($args, 3));
break;
case 'scaffold':
call_user_func('Oil\Scaffold::generate', array_slice($args, 3));
break;
default:
Generate::help();
}
break;
case 'c':
case 'console':
new Console;
case 'r':
case 'refine':
if ( ! isset($args[2]) OR $args[2] == 'help')
{
Refine::help();
return;
}
call_user_func('Oil\Refine::run', $args[2], array_slice($args, 3));
break;
case 'install':
case 'uninstall':
call_user_func('Oil\Package::'.$args[1], $args[2]);
break;
case '-v':
case '--version':
\Cli::write('Fuel: ' . \Fuel::VERSION);
break;
case 'test':
\Fuel::add_package('octane');
call_user_func('\\Fuel\\Octane\\Tests::run_'.$args[2], array_slice($args, 3));
break;
default:
static::help();
}
}
示例3: setup
/**
* Setup the test
*/
public function setup()
{
\Fuel::add_package('hybrid');
}
示例4: finalise
public function finalise($type, $email)
{
switch (strtolower($type)) {
case 'facebook':
break;
case 'twitter':
\Fuel::add_package('twitter');
$twtr = \Session::get('twitter_user_finalise');
\Session::delete('twitter_user_finalise');
$name = explode(' ', $twtr['name']);
$fname = $name[0] ? $name[0] : '';
$lname = $name[sizeof($name) - 1] ? $name[sizeof($name) - 1] : '';
$user = \Auth::instance()->create_user($email, md5(rand()), $email, 1, array('fname' => $fname, 'lname' => $lname));
$user = \Users\Model_User::find($user);
$this->_linktwitter($user, $twtr);
$this->forced_login($user);
break;
case 'google':
break;
case 'openid':
break;
case 'auth':
return parent::login($username, $password);
break;
}
}
示例5: array
* ExiteCMS is a web application framework,
* based on the Fuel PHP development framework
*
* @package Themes
* @version 1.0
* @author ExiteCMS Development Team
* @license Creative Commons BY-NC-ND-3.0
* @copyright 2011 ExiteCMS Development Team
* @link http://www.exitecms.org
*/
namespace Nestedsets;
/*
* Make sure the ORM package is loaded
*/
\Fuel::add_package('orm');
/**
* Model class.
*
* @package nestedsets
*/
class Model extends \Orm\Model
{
/* ---------------------------------------------------------------------------
* Static usage
* --------------------------------------------------------------------------- */
/*
* @var default nestedset tree configuration
*/
protected static $defaults = array('left_field' => 'left_id', 'right_field' => 'right_id', 'tree_field' => null, 'tree_value' => null, 'title_field' => null, 'symlink_field' => 'symlink_id', 'use_symlinks' => false);
/* ---------------------------------------------------------------------------