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


PHP Error::logException方法代码示例

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


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

示例1: generate_contact_form

 protected function generate_contact_form()
 {
     FB::log("Wrong class.");
     try {
         // Create a new form object and set submission properties
         $form = new Form();
         $form->page = $this->url0;
         $form->action = 'contact-form';
         $form->form_id = 'contact-form';
         $form->legend = 'Contact ' . SITE_NAME;
         // Set up input information
         $form->input_arr = array(array('name' => 'cf_n', 'class' => 'input-text', 'label' => 'Name'), array('name' => 'cf_e', 'class' => 'input-text', 'label' => 'Email'), array('name' => 'cf_p', 'class' => 'input-text', 'label' => 'Phone'), array('type' => 'textarea', 'name' => 'cf_m', 'class' => 'input-textarea', 'label' => 'Message'), array('type' => 'submit', 'class' => 'input-submit', 'name' => 'cf_s', 'value' => 'Send Message'));
         return $form;
     } catch (Exception $e) {
         Error::logException($e);
     }
 }
开发者ID:RobMacKay,项目名称:Helix,代码行数:17,代码来源:class.contact.inc.php

示例2: input

 public function input()
 {
     // Add the new input to the input array after sanitizing
     try {
         // Get the arguments passed to the method
         $args = func_get_args();
         // If the arguments were passed in an array, execute accordingly
         if (is_array($args[0])) {
             $this->_inputs[] = new Input($args[0]);
             return;
         } else {
             list($typ, $lab, $val, $nam, $id, $cls) = $args;
             $this->_inputs[] = new Input($typ, $lab, $val, $nam, $id, $cls);
         }
     } catch (Exception $e) {
         Error::logException($e);
     }
 }
开发者ID:RobMacKay,项目名称:Helix,代码行数:18,代码来源:class.form.inc.php

示例3: display_admin

 public function display_admin()
 {
     try {
         // Load form values
         $this->get_entry_by_id((int) $_POST['entry_id']);
         // Create a new form object and set submission properties
         $form = new Form();
         $form->form_id = 'ecms-edit-form';
         $form->page = $this->url0;
         $form->action = 'entry-write';
         $form->entry_id = (int) $_POST['entry_id'];
         // Make the entry values available to the form if they exist
         $form->entry = isset($this->entries[0]) ? $this->entries[0] : array();
         // Set up input information
         $form->input_arr = array(array('name' => 'title', 'class' => 'input-text', 'label' => 'Entry Title'), array('type' => 'file', 'name' => 'image', 'class' => 'input-text', 'label' => 'Main Image'), array('name' => 'caption', 'class' => 'input-text', 'label' => 'Main Image Caption'), array('type' => 'textarea', 'class' => 'input-textarea', 'name' => 'entry', 'label' => 'Entry Body'), array('name' => 'tags', 'class' => 'input-text', 'label' => 'Tags'), array('type' => 'textarea', 'class' => 'input-textarea', 'name' => 'excerpt', 'label' => 'Excerpt (Meta Description)'), array('name' => 'slug', 'class' => 'input-text', 'label' => 'URL Slug for This Entry'), array('type' => 'submit', 'class' => 'input-submit', 'name' => 'form-submit', 'value' => 'Save Entry'));
         return $form;
     } catch (Exception $e) {
         Error::logException($e);
     }
 }
开发者ID:RobMacKay,项目名称:Helix,代码行数:20,代码来源:class.blog.inc.php

示例4: _verify_user_form

 private function _verify_user_form()
 {
     // Load the account to be verified
     $sql = "SELECT\n                    `user_id`, `email`\n                FROM `" . DB_NAME . "`.`" . DB_PREFIX . "users`\n                WHERE `vcode`=:vcode\n                AND `active`=0\n                LIMIT 1";
     try {
         $stmt = $this->db->prepare($sql);
         $stmt->bindParam(':vcode', $this->url2, PDO::PARAM_INT);
         $stmt->execute();
         $result = $stmt->fetch(PDO::FETCH_OBJ);
         FB::log($result);
         $stmt->closeCursor();
     } catch (Exception $e) {
         ECMS_Error::log_exception($e);
     }
     if (isset($result->email)) {
         $this->_sdata->error = '0000';
     } else {
         $this->_sdata->error = '0005';
     }
     try {
         // Create a new form object and set submission properties
         $form = new Form();
         $form->legend = 'Activate Your Account';
         $form->page = $this->url0;
         $form->action = 'user-verify';
         // Load the error message if one exists
         if (isset($this->_sdata->error) && $this->_sdata->error !== '0000') {
             $form->notice = '<p class="form-error">' . $this->_get_error_message() . '</p>';
             // Load temporary form values
             $form->entry = isset($this->_sdata->temp) ? $this->_sdata->temp : new stdClass();
         } else {
             FB::log('Verifying the account for ' . $result->email);
         }
         // Set up input information
         $form->input_arr = array(array('name' => 'username', 'label' => 'Choose a Username (8-20 characters using ' . 'only a-z, 0-9, -, and _)', 'class' => 'input-text'), array('name' => 'display', 'label' => 'Choose a Display Name (the name shown on ' . 'entries posted by you, i.e. "John Doe")', 'class' => 'input-text'), array('name' => 'password', 'label' => 'Choose a Password', 'type' => 'password', 'id' => 'choose-password', 'class' => 'input-text'), array('name' => 'verify-password', 'label' => 'Verify Your Password', 'type' => 'password', 'id' => 'verify-password', 'class' => 'input-text'), array('name' => 'vcode', 'type' => 'hidden', 'value' => SIV::clean_output($this->url2, FALSE, FALSE)), array('type' => 'submit', 'name' => 'form-submit', 'value' => 'Activate', 'class' => 'input-submit'));
         return $form;
     } catch (Exception $e) {
         Error::logException($e);
     }
 }
开发者ID:RobMacKay,项目名称:Helix,代码行数:40,代码来源:class.admin.inc.php

示例5: display_menu_form

 public function display_menu_form($page_id = NULL)
 {
     try {
         // Create a new form object and set submission properties
         $form = new Form();
         $form->legend = empty($page_id) ? "Create a Menu Page" : "Edit a Menu Page";
         $form->page = 'menu';
         $form->action = 'menu-update';
         $form->entry_id = $page_id;
         // Load form values
         $form->entry = $this->get_page_data_by_id($page_id);
         $available_types = $this->_get_available_page_types();
         // Set up input information
         $form->input_arr = array(array('name' => 'page_name', 'label' => 'Display Name'), array('name' => 'page_slug', 'label' => 'Slug (Web Address)', 'tooltip' => 'This can be either relative (page-slug) or ' . 'absolute (http://example.com/)'), array('type' => 'select', 'name' => 'type', 'label' => 'Class Type', 'options' => $available_types), array('name' => 'menu_order', 'label' => 'Order'), array('name' => 'show_full', 'label' => 'Show Entry Full Page?'), array('name' => 'hide_in_menu', 'label' => 'Hide From the Menu?'), array('name' => 'parent_id', 'label' => 'Make this a submenu of what page?'), array('name' => 'extra', 'label' => 'Extra'), array('type' => 'submit', 'name' => 'form-submit', 'value' => 'Save Entry'), array('type' => 'hidden', 'name' => 'page_id', 'value' => $page_id));
         echo $form;
     } catch (Exception $e) {
         Error::logException($e);
     }
 }
开发者ID:RobMacKay,项目名称:Helix,代码行数:19,代码来源:class.menu.inc.php


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