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


PHP add::handle_shutdown方法代码示例

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


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

示例1: execute

 /**
  * Must echo the page response
  *
  * @since ADD MVC 0.6
  */
 public function execute()
 {
     # ADD MVC 0.5 backward support
     if (method_exists($this, 'page')) {
         return $this->page();
     }
     # Set Content Type
     $this->content_type($this->content_type);
     $this->mode = isset($_REQUEST['mode']) ? "{$_REQUEST['mode']}" : '';
     add::$handle_shutdown = false;
     $this->process_data(isset($this->common_gpc) ? ctrl_tpl_page::recursive_compact($this->common_gpc) : array());
     $this->print_response($this->data);
 }
开发者ID:google-code-backups,项目名称:add-mvc-framework,代码行数:18,代码来源:ctrl_tpl_ajax.class.php

示例2: environment_status

 /**
  * Sets and return or return an environment status
  *
  * @since ADD MVC 0.8
  */
 public static function environment_status($new_status = null)
 {
     if ($new_status) {
         if (is_string($new_status)) {
             if ($new_status === 'development') {
                 if (add::is_developer()) {
                     add::$environment_status = $new_status;
                 } else {
                     add::$environment_status = "live";
                 }
             } else {
                 if ($new_status === 'live') {
                     add::$environment_status = 'live';
                 } else {
                     throw new e_developer("Invalid environment_status: {$new_status}");
                 }
             }
         }
         /**
          * No errors if live
          *
          * @since ADD MVC 0.7.2
          */
         if (add::is_live()) {
             error_reporting(0);
             add::$handle_shutdown = false;
         } else {
             error_reporting(E_ALL);
             /**
              * When development, record the time spent on script execution
              *
              * @since ADD MVC 0.7.2
              */
             if (add::is_development()) {
                 add::$handle_shutdown = true;
                 if (!isset($GLOBALS['add_mvc_root_timer'])) {
                     $GLOBALS['add_mvc_root_timer'] = add_development_timer::start("Framework Configuration");
                 }
                 add::config()->root_timer = $GLOBALS['add_mvc_root_timer'];
             }
         }
     }
     return add::$environment_status;
 }
开发者ID:google-code-backups,项目名称:add-mvc-framework,代码行数:49,代码来源:add.class.php

示例3: environment_status

 /**
  * Sets and return or return an environment status
  *
  * @since ADD MVC 0.8
  */
 public static function environment_status($new_status = null)
 {
     /**
      *
      * @see http://code.google.com/p/add-mvc-framework/issues/detail?id=33
      */
     if (!add::is_developer()) {
         if (add::$environment_status != 'live' || isset($new_status) && $new_status != 'live') {
             $new_status = 'live';
         }
     }
     if ($new_status) {
         if (is_string($new_status)) {
             if ($new_status === 'development') {
                 if (add::is_developer()) {
                     add::$environment_status = $new_status;
                 } else {
                     add::$environment_status = "live";
                 }
             } else {
                 if ($new_status === 'live') {
                     add::$environment_status = 'live';
                 } else {
                     throw new e_developer("Invalid environment_status: {$new_status}");
                 }
             }
         } else {
             if ($new_status !== true) {
                 throw new e_developer("Invalid new environment status", $new_status);
             }
         }
         /**
          * No errors if live
          *
          * @since ADD MVC 0.7.2
          */
         if (add::is_live()) {
             error_reporting(0);
             ini_set('display_errors', 0);
             add::$handle_shutdown = false;
         } else {
             error_reporting(E_ALL);
             ini_set('display_errors', 1);
             /**
              * When development, record the time spent on script execution
              *
              * @since ADD MVC 0.7.2
              */
             if (add::is_development()) {
                 add::$handle_shutdown = true;
                 if (!isset($GLOBALS['add_mvc_root_timer'])) {
                     $GLOBALS['add_mvc_root_timer'] = add_development_timer::start("Framework Configuration");
                 }
                 add::config()->root_timer = $GLOBALS['add_mvc_root_timer'];
             }
         }
     }
     return add::$environment_status;
 }
开发者ID:google-code-backups,项目名称:add-mvc-framework,代码行数:64,代码来源:add.class.php

示例4: environment_status

 /**
  * Sets and return or return an environment status
  *
  * @since ADD MVC 0.8
  */
 public static function environment_status($new_status = null)
 {
     if ($new_status) {
         add::config()->environment_status = $new_status;
     }
     /**
      * No errors if live
      *
      * @since ADD MVC 0.7.2
      */
     if (add::is_live()) {
         error_reporting(0);
     } else {
         error_reporting(E_ALL);
         /**
          * When development, record the time spent on script execution
          *
          * @since ADD MVC 0.7.2
          */
         if (add::is_development()) {
             add::$handle_shutdown = true;
             $GLOBALS['add_mvc_root_timer'] = add_development_timer::start("Framework Configuration");
             add::config()->root_timer = $GLOBALS['add_mvc_root_timer'];
         }
     }
     return add::config()->environment_status;
 }
开发者ID:google-code-backups,项目名称:add-mvc-framework,代码行数:32,代码来源:add.class.php

示例5: handle_shutdown

/**
 * Handle shutdown
 */
function handle_shutdown()
{
    trigger_error("Deprecated handle_shutdown function", E_USER_DEPRECATED);
    add::handle_shutdown();
}
开发者ID:google-code-backups,项目名称:add-mvc-framework,代码行数:8,代码来源:common.functions.php

示例6: shutdown

 /**
  * Custom die() function
  *
  * @since ADD MVC 0.7.2
  */
 static function shutdown($handle_shutdown = true)
 {
     self::$handle_shutdown = $handle_shutdown;
     die;
 }
开发者ID:google-code-backups,项目名称:add-mvc-framework,代码行数:10,代码来源:add.class.php


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