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


PHP debug::show方法代码示例

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


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

示例1: get_page_specific_data

 public static function get_page_specific_data($title, $link, $description = '')
 {
     $originalArray = self::$page_specific_data ? self::$page_specific_data : self::get_all_options($title, $link, $description);
     $finalArray = array();
     $inc = Config::inst()->get("ShareThisSTE", "included_icons");
     $exc = Config::inst()->get("ShareThisSTE", "excluded_icons");
     if (count($inc)) {
         $new_array_of_icons_to_include = array();
         foreach ($inc as $key => $value) {
             $new_array_of_icons_to_include[$value] = $value;
             if (!isset($originalArray[$value])) {
                 debug::show("Error in ShareIcons::set_icons_to_include, {$key} does not exist in bookmark list");
             }
         }
         foreach ($originalArray as $key => $array) {
             if (!isset($new_array_of_icons_to_include[$key])) {
                 unset($originalArray[$key]);
             }
         }
     }
     //which ones do we exclude
     if (count($exc)) {
         foreach ($exc as $key) {
             if (!isset($originalArray[$key])) {
                 debug::show("Error in ShareIcons::set_icons_to_exclude, {$key} does not exist in bookmark list");
             } else {
                 unset($originalArray[$key]);
             }
         }
     }
     if (!$link) {
         self::$page_specific_data = null;
     }
     return $originalArray;
 }
开发者ID:helpfulrobot,项目名称:sunnysideup-sharethis,代码行数:35,代码来源:ShareThisOptions.php

示例2: clearfieldcache

 function clearfieldcache($showoutput = false)
 {
     $fieldsToClear = array();
     $fieldsForEach = Config::inst()->get("MenuCache", "fields");
     foreach ($fieldsForEach as $key => $field) {
         $fieldName = self::field_maker($key);
         $fieldsToClear[] = "\"" . $fieldName . "\" = ''";
     }
     if (count($fieldsToClear)) {
         $tablesForEach = Config::inst()->get("MenuCache", "tables_to_clear");
         foreach ($tablesForEach as $table) {
             $msg = '';
             $sql = "UPDATE \"" . $table . "\" SET " . implode(", ", $fieldsToClear);
             if (Controller::curr()->getRequest()->param("ID") == "days" && ($days = intval(Controller::curr()->getRequest()->param("OtherID")))) {
                 $sql .= ' WHERE \\"LastEdited\\" > ( NOW() - INTERVAL ' . $days . ' DAY )';
                 $msg .= ', created before the last ' . $days . ' days';
             } elseif (Controller::curr()->getRequest()->param("ID") == "thispage") {
                 $sql .= " WHERE  \"" . $table . "\".\"ID\" = " . $this->owner->ID;
                 $msg .= ', for page with ID = ' . $this->owner->ID;
             }
             if ($showoutput) {
                 DB::alteration_message("Deleting cached data from {$table}, " . $msg);
                 debug::show($sql);
             }
             DB::query($sql);
         }
     }
     return array();
 }
开发者ID:helpfulrobot,项目名称:sunnysideup-menucache,代码行数:29,代码来源:MenuCache.php

示例3: run

 /**
  * 入口方法
  * @param array $config 项目简单配置
  */
 public static function run($config)
 {
     //初始化设置
     self::init();
     //定义系统常量
     self::define($config);
     //包含框架中的函数库文件
     require FIREZP_PATH . 'common' . DIRECTORY_SEPARATOR . 'function.inc.php';
     //加载所有配置
     if (file_exists(APP_PATH . 'conf' . DIRECTORY_SEPARATOR . 'confing.inc.php')) {
         $appConfig = (require APP_PATH . 'conf' . DIRECTORY_SEPARATOR . 'confing.inc.php');
         $sysConfig = array('page' => 8);
         //系统配置
         $config = array_merge($sysConfig, $appConfig, $config);
     }
     C($config);
     //系统url
     self::initUrl();
     //设置自动加载类
     spl_autoload_register(array('self', 'autoload'));
     //设置包含目录(类所在的全部目录),  PATH_SEPARATOR 分隔符号 Linux(:) Windows(;)
     $include_path = get_include_path();
     //原基目录
     $include_path .= PATH_SEPARATOR . FIREZP_PATH . "base/";
     //框架中基类所在的目录
     set_include_path($include_path);
     //调试开始
     debug::debugbegin();
     //项目结构化
     appStruct::make();
     //url解析
     parseUrl::run();
     //安全过滤
     self::safe();
     //开始session
     session_start();
     //实例化控制器
     $controllerFile = APP_PATH . "controller" . DIRECTORY_SEPARATOR . strtolower($_GET["c"]) . "Controller.php";
     define('CONTROLLER', $_GET["c"]);
     define('ACTION', $_GET["a"]);
     if (file_exists($controllerFile)) {
         $controller = $_GET["c"] . "Controller";
         $controllerObj = new $controller();
         $action = $_GET["a"] . "Action";
         if (method_exists($controllerObj, $action)) {
             $controllerObj->{$action}();
         } else {
             debug::add($action . '方法不存在');
         }
     } else {
         debug::add('控制器不存在');
     }
     //输出调试信息
     if (DEBUG == 1) {
         debug::debugend();
         debug::show();
     }
 }
开发者ID:jeremywong1992,项目名称:companyBook,代码行数:62,代码来源:firezp.php

示例4: add_to_array_of_currencies_to_show

 static function add_to_array_of_currencies_to_show($arrayOfCodes)
 {
     if (is_array($arrayOfCodes)) {
         foreach ($arrayOfCodes as $code) {
             if (3 == strlen($code)) {
                 self::$array_of_currencies_to_show[] = $code;
             }
         }
     } elseif (3 == strlen($arrayOfCodes)) {
         self::$array_of_currencies_to_show[] = $arrayOfCodes;
     } else {
         debug::show("add_to_array_of_currencies_to_show is not provided with right argument");
     }
 }
开发者ID:helpfulrobot,项目名称:sunnysideup-widgets-currencyconverter,代码行数:14,代码来源:CurrencyConverterWidget.php

示例5: run

 /**
  * 运行项目
  */
 public static function run()
 {
     self::init();
     //初始化运行环境
     self::formatRequest();
     //如果开启自动转义,去除转义
     self::setAppGroupPath();
     //设置应用路径
     self::loadAppGroupConfig();
     //载入应用组配置
     self::setAppPath();
     //设置PATH_APP
     self::loadAppConfig();
     //加载应用配置文件
     self::loadUserFile();
     //加载系统类文件数据
     self::setPathConst();
     //设置缓存目录常量
     self::createDemoControl();
     //创建应用目录
     self::setTplConst();
     //设置模板常量
     self::language();
     //加载语言包
     self::ajaxCloseDebug();
     //ajax时关闭调试
     self::setCharset();
     //设置字符集
     self::createDir();
     //创建项目缓存目录结构
     self::session_set();
     self::compileAppGroupFile();
     //项目核心文件编译缓存
     self::compileAppFile();
     //模块核心文件编译缓存
     debug::start("app_start");
     //调试开启,需要打开配置文件调试开关
     self::apprun();
     //项目开始
     debug::show("app_start", "app_end");
     //显示调试结果
     log::save();
     //记录日志
 }
开发者ID:com-itzcy,项目名称:hdjob,代码行数:47,代码来源:application.php

示例6: CreateContinent

 /**
  * create a continent
  * @param array - $contentint, continent data
  * @param Object - $parent, a BrowseWorldPage object that will be the parent page of the Continent.
  **/
 public function CreateContinent(array $continent, BrowseWorldPage $parent)
 {
     $bt = defined('DB::USE_ANSI_SQL') ? "\"" : "`";
     if ($parent && isset($continent["Continent"])) {
         $name = htmlentities($continent["Continent"]);
         if ($name) {
             if (isset($_GET["geobuild"])) {
                 echo "<li>creating " . $name . "</li>";
             }
             $this->ParentID = $parent->ID;
             $this->Title = $name;
             $this->MetaTitle = $name;
             $this->MenuTitle = $name;
             $this->HiddenDataID = $continent["ContinentID"];
             $this->CreateChildren = $parent->CreateAllChildren;
             $this->CreateAllChildren = $parent->CreateAllChildren;
             $this->writeToStage('Stage');
             $this->publish('Stage', 'Live');
             $this->flushCache();
         } else {
             if (isset($_GET["geobuild"])) {
                 debug::show("name does not exist");
             }
         }
     } else {
         if (isset($_GET["geobuild"])) {
             debug::show("Parent does not exist");
         }
     }
 }
开发者ID:helpfulrobot,项目名称:sunnysideup-geobrowser,代码行数:35,代码来源:BrowseContinentsPage.php

示例7: __autoload

    deve::load(_FFPHP_ . 'source/core/view.class.php');
}
//加载核心文件
deve::load(array(_FFPHP_ . 'source/core/ffphp.class.php', _FFPHP_ . 'source/core/compile.class.php', _FFPHP_ . 'source/core/action.class.php'));
//检测数据连接类型
if (C('CONNECT_TYPE') == 1) {
    deve::load(_FFPHP_ . 'source/drive/mysqli.class.php');
} else {
    deve::load(_FFPHP_ . 'source/drive/pdo.class.php');
}
//URL路由
ffphp::pathUrl();
//类的自动加载
function __autoload($className)
{
    deve::load(_APP_ . 'behavior/' . $className . '.class.php');
}
//控制器的格式化创建
$actionfile = _APP_ . 'action/' . strtolower($_GET['m']) . '.class.php';
if (file_exists($actionfile)) {
    deve::buildAction($_GET['m']);
    $newAction = strtolower($_GET['m']) . 'Action';
    deve::load(_APP_ . 'core/action/' . $newAction . '.class.php');
    $action = new $newAction();
    $action->{$_GET}['a']();
} else {
    debug::error('控制器不存在!', 202102);
}
if (C('DEBUG')) {
    debug::$showed or debug::show();
}
开发者ID:laiello,项目名称:ffphp,代码行数:31,代码来源:deve.php

示例8: __construct

 public function __construct($pageLink, $name, $year = 0, $month = 0)
 {
     $this->pageLink = $pageLink;
     // Assign name to calendar
     if (strpos($name, ' ') || strpos($name, '_') || is_numeric(substr($name, 0, 1))) {
         debug::show($name);
         user_error('Calendar should have a valid CSS name in the ManyMonthsCalendar Class', E_USER_ERROR);
     }
     $this->calendarName = $name;
     // Set day, month and year of calendar
     $this->month = 0 == $month ? date('n') : $month;
     $this->year = 0 == $year ? date('Y') : $year;
     // Check for valid input
     if (!preg_match('~[0-9]{4}~', $this->year)) {
         debug::show($this->year);
         user_error('Year should be a valid number in the ManyMonthsCalendar Class', E_USER_ERROR);
     }
     if (!is_numeric($this->month) || $this->month < 0 || $this->month > 13) {
         debug::show($this->month);
         user_error('Month should be a valid number in the ManyMonthsCalendar Class', E_USER_ERROR);
     }
     // Set the current timestamp
     $this->timeStamp = mktime(1, 1, 1, $this->month, 1, $this->year);
     // Set the number of days in the current month
     $this->daysInMonth = date('t', $this->timeStamp);
 }
开发者ID:helpfulrobot,项目名称:sunnysideup-manymonthscalendar,代码行数:26,代码来源:ManyMonthsCalendar.php

示例9: error

/**
 * 输出错误信息
 * @param $msg		信息内容
 */
function error($error, $showFile = true)
{
    $exception = array();
    //错误内容
    $backtrace = debug_backtrace();
    $exception['message'] = "<b>[ERROR]</b> " . $error . "<br/>";
    if ($showFile) {
        $exception['message'] .= "\t<b>[FILE]</b> " . $backtrace[0]['file'] . "<br/>";
        $exception['message'] .= "\t<b>[LINE]</b> " . $backtrace[0]['line'] . "<br/>";
    }
    log::write(strip_tags($exception['message']));
    //写入日志
    if (!C("DEBUG")) {
        $e['message'] = C("ERROR_MESSAGE") . "\t\t <span style='color:#666; font-weight:normal;'>\n                    " . L("functions_error_debug") . "\n                    </span>";
        //查看详细错误信息方法有两种: ① 查看网站日志文件  ② 开启调试模式
        include C("LIBS_ERROR_TPL");
        exit;
    }
    $e['message'] = $exception['message'];
    include C("LIBS_ERROR_TPL");
    debug::show("app_start", "app_end");
    exit;
}
开发者ID:com-itzcy,项目名称:hdjob,代码行数:27,代码来源:functions.php

示例10: route

 public static function route($config, $re_route)
 {
     $router_vars = self::get_router_vars($config);
     if (count($router_vars) > 1) {
         if (utils::key_exists(array($router_vars['controller']), $re_route)) {
             if (in_array($router_vars['action'], $re_route[$router_vars['controller']])) {
                 $router_vars['controller'] = $router_vars['action'];
                 $router_vars['action'] = !empty($router_vars['fnc_args']) ? $router_vars['fnc_args'][0] : $config['action'];
                 if (count($router_vars['fnc_args']) > 1) {
                     array_shift($router_vars['fnc_args']);
                 } else {
                     $router_vars['fnc_args'] = array();
                 }
             }
         }
     }
     if ($router_vars['controller'] == "base") {
         $router_vars['controller'] = $config['class'];
     }
     if (!file_exists(APP . 'controllers' . DS . $router_vars['controller'] . '.php')) {
         throw new NotFoundException();
     }
     require_once APP . 'controllers' . DS . $router_vars['controller'] . '.php';
     if (!class_exists($router_vars['controller'])) {
         throw new NotFoundException();
     }
     $instance = new $router_vars['controller']();
     if (!method_exists($instance, $router_vars['action'])) {
         throw new NotFoundException();
     }
     $instance->{$router_vars}['action']($router_vars['fnc_args'], $router_vars['gets']);
     if (DEBUG) {
         debug::set("router", "router", $router_vars);
         debug::set("session", "session", session::get_all());
         debug::show();
     }
 }
开发者ID:rajuthapa8086,项目名称:SimpleMVC,代码行数:37,代码来源:router.php

示例11: CreateCountry

 /**
  * Create a country based on an array and a Continent Parent
  **/
 public function CreateCountry(array $country, BrowseContinentsPage $parent)
 {
     if ($parent && isset($country["Country"])) {
         $name = htmlentities($country["Country"]);
         if ($name) {
             if (isset($_GET["geobuild"])) {
                 echo "<li>creating " . $name . "</li>";
             }
             $this->ParentID = $parent->ID;
             $this->Title = $name;
             $this->MetaTitle = $name;
             $this->MenuTitle = $name;
             $this->HiddenDataID = $country["CountryID"];
             $this->ISO2 = $country["ISO2"];
             $this->Internet = $country["Internet"];
             $this->Capital = htmlentities($country["Capital"]);
             $this->NationalitySingular = htmlentities($country["NationalitySingular"]);
             $this->NationalityPlural = htmlentities($country["NationalityPlural"]);
             $this->Currency = $country["Currency"];
             $this->CurrencyCode = $country["CurrencyCode"];
             $this->Population = $country["Population"];
             $this->AdditionalTitle = htmlentities($country["Title"]);
             $this->CreateChildren = $parent->CreateAllChildren;
             $this->CreateAllChildren = $parent->CreateAllChildren;
             $this->writeToStage('Stage');
             $this->publish('Stage', 'Live');
             $this->flushCache();
         } else {
             if (isset($_GET["geobuild"])) {
                 debug::show("name does not exist");
             }
         }
     } else {
         if (isset($_GET["geobuild"])) {
             debug::show("Parent does not exist");
         }
     }
 }
开发者ID:helpfulrobot,项目名称:sunnysideup-geobrowser,代码行数:41,代码来源:BrowseCountriesPage.php

示例12: makeShareIcons

 /**
  * eturns array
  */
 protected function makeShareIcons($bookmarks)
 {
     $icons = array();
     if ($bookmarks) {
         $useFontAwesome = Config::inst()->get("ShareThisSTE", "use_font_awesome");
         Requirements::themedCSS('SocialNetworking', "sharethis");
         // ALSO  added in template
         if ($useFontAwesome) {
             Requirements::css("http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css");
         }
         Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js');
         Requirements::javascript(SS_SHARETHIS_DIR . '/javascript/shareThis.js');
         if (Config::inst()->get("ShareThisSTE", "use_bw_effect")) {
             Requirements::customScript('sharethis.set_use_BW(true);', 'ShareThisBWEffect');
         }
         foreach ($bookmarks as $key => $bookmark) {
             if (isset($bookmark['title']) && isset($bookmark['url'])) {
                 $icon = array('Title' => Convert::raw2att($bookmark['title']), 'URL' => $bookmark['url'], 'Key' => $key, 'ImageSource' => "sharethis/images/icons/{$key}.png", 'FAIcon' => $bookmark["faicon"], 'UseStandardImage' => true);
                 if (isset($bookmark['click'])) {
                     $icon['OnClick'] = $bookmark['click'];
                 }
                 if ($useFontAwesome) {
                     $icon['ImageSource'] = null;
                     $icon['UseStandardImage'] = false;
                     $icon['FAIcon'] = $bookmark["faicon"];
                 }
                 if (isset($bookmark['icon'])) {
                     $icon['ImageSource'] = $bookmark['icon'];
                     $icon['UseStandardImage'] = false;
                     $icon['FAIcon'] = null;
                 }
                 $icons[] = new ArrayData($icon);
             } else {
                 debug::show("Title of url not defined for {$key}");
             }
         }
     }
     return new ArrayList($icons);
 }
开发者ID:helpfulrobot,项目名称:sunnysideup-sharethis,代码行数:42,代码来源:ShareThisSTE.php

示例13: debug

 function debug()
 {
     debug::show("debugging DpsPxPayComs");
     echo $this->getDebugMessage();
 }
开发者ID:helpfulrobot,项目名称:sunnysideup-payment-dps,代码行数:5,代码来源:DpsPxPayComs.php

示例14: get_geocode_obj

 /**
  * Get geocode from google.
  *
  * @see http://code.google.com/apis/maps/documentation/services.html#Geocoding_Direct
  * @param string $q Place name (e.g. 'Portland' or '30th Avenue, New York")
  * @return Object Multiple Placemarks and status code
  */
 protected static function get_geocode_obj($q)
 {
     if (!Config::inst()->get("GoogleMap", "GoogleMapAPIKey")) {
         user_error('Please define a valid Google Maps API Key: GoogleMapAPIKey', E_USER_ERROR);
     }
     $q = trim($q);
     if (self::$debug) {
         var_dump($q);
     }
     if (empty($q)) {
         return false;
     }
     $url = sprintf(self::$geocode_url, urlencode($q));
     if (self::$debug) {
         debug::show(print_r($url, 1));
     }
     $curl = curl_init($url);
     curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
     curl_setopt($curl, CURLOPT_VERBOSE, true);
     $responseString = curl_exec($curl);
     if (!$responseString) {
         $responseString = file_get_contents($url);
         if (!$responseString) {
             return false;
         }
     }
     if (self::$debug) {
         debug::show(print_r($responseString, 1));
     }
     return self::json_decoder($responseString);
 }
开发者ID:helpfulrobot,项目名称:sunnysideup-googlemap,代码行数:38,代码来源:GetLatLngFromGoogleUsingAddress.php

示例15: CreateCity

 /**
  * Create a page
  * @param Array - $city: the data for the city
  * @param Object $parent: BrowseRegionsPage 
  **/
 public function CreateCity(array $city, BrowseRegionsPage $parent)
 {
     if ($parent && isset($city["City"])) {
         $name = htmlentities($city["City"]);
         if (isset($name)) {
             if (isset($_GET["geobuild"])) {
                 echo "<li>creating " . $name . "</li>";
             }
             $this->ParentID = $parent->ID;
             $this->Title = $name;
             $this->MetaTitle = $name;
             $this->MenuTitle = $name;
             $this->HiddenDataID = $city["CityID"];
             $this->Code = $city["Code"];
             $this->Latitude = $city["Latitude"];
             $this->Longitude = $city["Longitude"];
             $this->TimeZone = $city["TimeZone"];
             $this->County = htmlentities($city["County"]);
             $this->Code = $city["Code"];
             $this->CreateChildren = $parent->CreateAllChildren;
             $this->CreateAllChildren = $parent->CreateAllChildren;
             $this->URLSegment = $this->generateURLSegment($this->Title);
             $this->writeToStage('Stage');
             $this->publish('Stage', 'Live');
             $this->flushCache();
         } else {
             if (isset($_GET["geobuild"])) {
                 debug::show("No name can be found");
             }
         }
     } else {
         if (isset($_GET["geobuild"])) {
             debug::show("Parent does not exist");
         }
     }
 }
开发者ID:helpfulrobot,项目名称:sunnysideup-geobrowser,代码行数:41,代码来源:BrowseCitiesPage.php


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