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


PHP Fuel::is_cli方法代码示例

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


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

示例1: test_debug_dump_by_call_fuel_func_array

 public function test_debug_dump_by_call_fuel_func_array()
 {
     // Set to browser mode.
     \Fuel::$is_cli = false;
     $expected = '<div class="fuelphp-dump" style="font-size: 13px;background: #EEE !important; border:1px solid #666; color: #000 !important; padding:10px;"><h1 style="border-bottom: 1px solid #CCC; padding: 0 0 5px 0; margin: 0 0 5px 0; font: bold 120% sans-serif;">COREPATH/base.php @ line: 462</h1><pre style="overflow:auto;font-size:100%;"><strong>Variable #1:</strong>' . "\n" . '<i></i> <strong></strong> (Integer): 1' . "\n\n\n" . '<strong>Variable #2:</strong>' . "\n" . '<i></i> <strong></strong> (Integer): 2' . "\n\n\n" . '<strong>Variable #3:</strong>' . "\n" . '<i></i> <strong></strong> (Integer): 3' . "\n\n\n" . '</pre></div>';
     ob_start();
     call_fuel_func_array('\\Debug::dump', array(1, 2, 3));
     $output = ob_get_contents();
     ob_end_clean();
     $this->assertEquals($expected, $output);
 }
开发者ID:marietta-adachi,项目名称:website,代码行数:11,代码来源:debug.php

示例2: chr

 * @version    1.0
 * @author     Fuel Development Team
 * @license    MIT License
 * @copyright  2010 - 2011 Fuel Development Team
 * @link       http://fuelphp.com
 */
// Load the base functions
require COREPATH . 'base.php';
// Import the core Fuel class
import('fuel');
// If the app does not have a Fuel class, then we need to alias it.
!class_exists('Fuel') and class_alias('Fuel\\Core\\Fuel', 'Fuel');
define('DS', DIRECTORY_SEPARATOR);
define('CRLF', chr(13) . chr(10));
/**
 * Do we have access to mbstring?
 * We need this in order to work with UTF-8 strings
 */
define('MBSTRING', function_exists('mb_get_info'));
/**
 * Is mbstring enabled?
 * Set the encoding to use whatever Fuel is set to use.
 */
MBSTRING and mb_internal_encoding(Fuel::$encoding);
// Is Fuel running on the command line?
Fuel::$is_cli = (bool) defined('STDIN');
// Load in the Autoloader
require COREPATH . 'classes' . DS . 'autoloader.php';
Autoloader::add_namespace('Fuel\\Core', COREPATH . 'classes/');
Autoloader::add_classes(array('Fuel\\Core\\Agent' => COREPATH . 'classes/agent.php', 'Fuel\\Core\\Arr' => COREPATH . 'classes/arr.php', 'Fuel\\Core\\Asset' => COREPATH . 'classes/asset.php', 'Fuel\\Core\\Cache' => COREPATH . 'classes/cache.php', 'Fuel\\Core\\Cache_Exception' => COREPATH . 'classes/cache/exception.php', 'Fuel\\Core\\Cache_Handler_Driver' => COREPATH . 'classes/cache/handler/driver.php', 'Fuel\\Core\\Cache_Handler_Json' => COREPATH . 'classes/cache/handler/json.php', 'Fuel\\Core\\Cache_Handler_Serialized' => COREPATH . 'classes/cache/handler/serialized.php', 'Fuel\\Core\\Cache_Handler_String' => COREPATH . 'classes/cache/handler/string.php', 'Fuel\\Core\\Cache_Storage_Driver' => COREPATH . 'classes/cache/storage/driver.php', 'Fuel\\Core\\Cache_Storage_File' => COREPATH . 'classes/cache/storage/file.php', 'Fuel\\Core\\Cache_Storage_Memcached' => COREPATH . 'classes/cache/storage/memcached.php', 'Fuel\\Core\\Cache_Storage_Redis' => COREPATH . 'classes/cache/storage/redis.php', 'Fuel\\Core\\Config' => COREPATH . 'classes/config.php', 'Fuel\\Core\\Controller' => COREPATH . 'classes/controller.php', 'Fuel\\Core\\Controller_Rest' => COREPATH . 'classes/controller/rest.php', 'Fuel\\Core\\Controller_Template' => COREPATH . 'classes/controller/template.php', 'Fuel\\Core\\Cookie' => COREPATH . 'classes/cookie.php', 'Fuel\\Core\\DB' => COREPATH . 'classes/db.php', 'Fuel\\Core\\DBUtil' => COREPATH . 'classes/dbutil.php', 'Fuel\\Core\\Database_Connection' => COREPATH . 'classes/database/connection.php', 'Fuel\\Core\\Database_Exception' => COREPATH . 'classes/database/exception.php', 'Fuel\\Core\\Database_Expression' => COREPATH . 'classes/database/expression.php', 'Fuel\\Core\\Database_Pdo_Connection' => COREPATH . 'classes/database/pdo/connection.php', 'Fuel\\Core\\Database_Query' => COREPATH . 'classes/database/query.php', 'Fuel\\Core\\Database_Query_Builder' => COREPATH . 'classes/database/query/builder.php', 'Fuel\\Core\\Database_Query_Builder_Insert' => COREPATH . 'classes/database/query/builder/insert.php', 'Fuel\\Core\\Database_Query_Builder_Delete' => COREPATH . 'classes/database/query/builder/delete.php', 'Fuel\\Core\\Database_Query_Builder_Update' => COREPATH . 'classes/database/query/builder/update.php', 'Fuel\\Core\\Database_Query_Builder_Select' => COREPATH . 'classes/database/query/builder/select.php', 'Fuel\\Core\\Database_Query_Builder_Where' => COREPATH . 'classes/database/query/builder/where.php', 'Fuel\\Core\\Database_Query_Builder_Join' => COREPATH . 'classes/database/query/builder/join.php', 'Fuel\\Core\\Database_Result' => COREPATH . 'classes/database/result.php', 'Fuel\\Core\\Database_Result_Cached' => COREPATH . 'classes/database/result/cached.php', 'Fuel\\Core\\Database_Mysql_Connection' => COREPATH . 'classes/database/mysql/connection.php', 'Fuel\\Core\\Database_MySQL_Result' => COREPATH . 'classes/database/mysql/result.php', 'Fuel\\Core\\Database_Mysqli_Connection' => COREPATH . 'classes/database/mysqli/connection.php', 'Fuel\\Core\\Database_MySQLi_Result' => COREPATH . 'classes/database/mysqli/result.php', 'Fuel\\Core\\Email' => COREPATH . 'classes/email.php', 'Fuel\\Core\\Email_Driver' => COREPATH . 'classes/email/driver.php', 'Fuel\\Core\\Email_Mail' => COREPATH . 'classes/email/mail.php', 'Fuel\\Core\\Email_Sendmail' => COREPATH . 'classes/email/sendmail.php', 'Fuel\\Core\\Email_Smtp' => COREPATH . 'classes/email/smtp.php', 'Fuel\\Core\\Fuel_Exception' => COREPATH . 'classes/fuel/exception.php', 'Fuel\\Core\\Date' => COREPATH . 'classes/date.php', 'Fuel\\Core\\Debug' => COREPATH . 'classes/debug.php', 'Fuel\\Core\\Cli' => COREPATH . 'classes/cli.php', 'Fuel\\Core\\Crypt' => COREPATH . 'classes/crypt.php', 'Fuel\\Core\\Event' => COREPATH . 'classes/event.php', 'Fuel\\Core\\Error' => COREPATH . 'classes/error.php', 'Fuel\\Core\\Format' => COREPATH . 'classes/format.php', 'Fuel\\Core\\Fieldset' => COREPATH . 'classes/fieldset.php', 'Fuel\\Core\\Fieldset_Field' => COREPATH . 'classes/fieldset/field.php', 'Fuel\\Core\\File' => COREPATH . 'classes/file.php', 'Fuel\\Core\\File_Area' => COREPATH . 'classes/file/area.php', 'Fuel\\Core\\File_Exception' => COREPATH . 'classes/file/exception.php', 'Fuel\\Core\\File_Driver_File' => COREPATH . 'classes/file/driver/file.php', 'Fuel\\Core\\File_Driver_Directory' => COREPATH . 'classes/file/driver/directory.php', 'Fuel\\Core\\Form' => COREPATH . 'classes/form.php', 'Fuel\\Core\\Ftp' => COREPATH . 'classes/ftp.php', 'Fuel\\Core\\Html' => COREPATH . 'classes/html.php', 'Fuel\\Core\\Image' => COREPATH . 'classes/image.php', 'Fuel\\Core\\Image_Driver' => COREPATH . 'classes/image/driver.php', 'Fuel\\Core\\Image_Gd' => COREPATH . 'classes/image/gd.php', 'Fuel\\Core\\Image_Imagemagick' => COREPATH . 'classes/image/imagemagick.php', 'Fuel\\Core\\Inflector' => COREPATH . 'classes/inflector.php', 'Fuel\\Core\\Input' => COREPATH . 'classes/input.php', 'Fuel\\Core\\Lang' => COREPATH . 'classes/lang.php', 'Fuel\\Core\\Log' => COREPATH . 'classes/log.php', 'Fuel\\Core\\Migrate' => COREPATH . 'classes/migrate.php', 'Fuel\\Core\\Model' => COREPATH . 'classes/model.php', 'Fuel\\Core\\Mongo_DB' => COREPATH . 'classes/mongo/db.php', 'Fuel\\Core\\Mongo_Exception' => COREPATH . 'classes/mongo/exception.php', 'Fuel\\Core\\Output' => COREPATH . 'classes/output.php', 'Fuel\\Core\\Pagination' => COREPATH . 'classes/pagination.php', 'Fuel\\Core\\Profiler' => COREPATH . 'classes/profiler.php', 'Fuel\\Core\\Request' => COREPATH . 'classes/request.php', 'Fuel\\Core\\Redis' => COREPATH . 'classes/redis.php', 'Fuel\\Core\\Redis_Exception' => COREPATH . 'classes/redis/exception.php', 'Fuel\\Core\\Response' => COREPATH . 'classes/response.php', 'Fuel\\Core\\Route' => COREPATH . 'classes/route.php', 'Fuel\\Core\\Router' => COREPATH . 'classes/router.php', 'Fuel\\Core\\Security' => COREPATH . 'classes/security.php', 'Fuel\\Core\\Session' => COREPATH . 'classes/session.php', 'Fuel\\Core\\Session_Driver' => COREPATH . 'classes/session/driver.php', 'Fuel\\Core\\Session_Db' => COREPATH . 'classes/session/db.php', 'Fuel\\Core\\Session_Cookie' => COREPATH . 'classes/session/cookie.php', 'Fuel\\Core\\Session_File' => COREPATH . 'classes/session/file.php', 'Fuel\\Core\\Session_Memcached' => COREPATH . 'classes/session/memcached.php', 'Fuel\\Core\\Session_Redis' => COREPATH . 'classes/session/redis.php', 'Fuel\\Core\\Str' => COREPATH . 'classes/str.php', 'Fuel\\Core\\TestCase' => COREPATH . 'classes/testcase.php', 'Fuel\\Core\\Uri' => COREPATH . 'classes/uri.php', 'Fuel\\Core\\Unzip' => COREPATH . 'classes/unzip.php', 'Fuel\\Core\\Upload' => COREPATH . 'classes/upload.php', 'Fuel\\Core\\Validation' => COREPATH . 'classes/validation.php', 'Fuel\\Core\\Validation_Error' => COREPATH . 'classes/validation/error.php', 'Fuel\\Core\\View' => COREPATH . 'classes/view.php', 'Fuel\\Core\\View_Exception' => COREPATH . 'classes/view/exception.php', 'Fuel\\Core\\ViewModel' => COREPATH . 'classes/viewmodel.php'));
/* End of file bootstrap.php */
开发者ID:huzairy,项目名称:feedmalaya,代码行数:31,代码来源:bootstrap.php

示例3: tearDown

 public function tearDown()
 {
     // Restore original value
     \Fuel::$is_cli = $this->old_is_cli;
 }
开发者ID:socialskeptic,项目名称:sainsburys,代码行数:5,代码来源:debug.php


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