當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Fuel::add_package方法代碼示例

本文整理匯總了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();
     }
 }
開發者ID:netspencer,項目名稱:fuel,代碼行數:60,代碼來源:cli.php

示例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();
		}
	}
開發者ID:nasumi,項目名稱:fuel,代碼行數:69,代碼來源:cli.php

示例3: setup

 /**
  * Setup the test
  */
 public function setup()
 {
     \Fuel::add_package('hybrid');
 }
開發者ID:EdgeCommerce,項目名稱:edgecommerce,代碼行數:7,代碼來源:textile.php

示例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;
     }
 }
開發者ID:rob-mccann,項目名稱:fuel-unifiedlogin,代碼行數:26,代碼來源:unifiedlogin.php

示例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);
    /* ---------------------------------------------------------------------------
開發者ID:rob-mccann,項目名稱:fuel-nestedsets,代碼行數:31,代碼來源:model.php


注:本文中的Fuel::add_package方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。