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


PHP moodle_exception::__construct方法代码示例

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


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

示例1: SAMoodleLibException

 /**
  *
  * @param mix $errorcode
  * @param object $a
  * @param string $debuginfo
  */
 public function SAMoodleLibException($errorcode, $a = NULL, $debuginfo = NULL)
 {
     if (is_a($errorcode, 'moodle_exception')) {
         //hack eclipse
         if (false) {
             $errorcode = new moodle_exception('');
         } else {
             $e = $errorcode;
             $errorcode = $e->errorcode;
             $a = $e->a;
             $debuginfo = $e->debuginfo;
         }
     } else {
         if (is_a($errorcode, 'Exception')) {
             //hack eclipse
             if (false) {
                 $errorcode = new moodle_exception('');
             } else {
                 $e = $errorcode;
                 $errorcode = $e->getMessage() . ', Código do Erro: ' . $e->getCode();
                 $debuginfo = $e->getCode();
             }
         }
     }
     /*$originalerrordocroot = $CFG->errordocroot;
     		 $CFG->errordocroot = '';
     		$CFG->errordocroot = $originaldocroot;
     		*/
     parent::__construct($errorcode, 'local_samoodlelib', '', $a, $debuginfo);
 }
开发者ID:LMSeXT,项目名称:local_samoodlelib,代码行数:36,代码来源:exceptions.php

示例2: __construct

 public function __construct($quizobj, $errorcode, $a = null, $link = '', $debuginfo = null)
 {
     if (!$link) {
         $link = $quizobj->view_url();
     }
     parent::__construct($errorcode, 'quiz', $link, $a, $debuginfo);
 }
开发者ID:elie89,项目名称:moodle,代码行数:7,代码来源:attemptlib.php

示例3: __construct

 /**
  * Constructor
  * @param int $instanceid the block instance id of the block that was looked for.
  * @param object $page the current page.
  */
 public function __construct($instanceid, $page)
 {
     $a = new stdClass();
     $a->instanceid = $instanceid;
     $a->url = $page->url->out();
     parent::__construct('blockdoesnotexistonpage', '', $page->url->out(), $a);
 }
开发者ID:Burick,项目名称:moodle,代码行数:12,代码来源:blocklib.php

示例4:

 function __construct($errorcode, $a = null, $link = '', $debuginfo = null)
 {
     global $CFG;
     if (empty($link)) {
         $link = "{$CFG->wwwroot}/{$CFG->admin}/";
     }
     parent::__construct($errorcode, 'dbtransfer', $link, $a, $debuginfo);
 }
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:8,代码来源:dtllib.php

示例5: __construct

 public function __construct(array $errors = array())
 {
     $debuginfo = array();
     foreach ($errors as $key => $message) {
         $debuginfo[] = "{$key}: {$message}";
     }
     parent::__construct('invalidpersistent', 'core_competency', null, null, implode(' - ', $debuginfo));
 }
开发者ID:evltuma,项目名称:moodle,代码行数:8,代码来源:invalid_persistent_exception.php

示例6: stdClass

 function __construct($errorstring, $line, $char, $link = '')
 {
     $this->errorstring = $errorstring;
     $this->line = $line;
     $this->char = $char;
     $a = new stdClass();
     $a->errorstring = $errorstring;
     $a->errorline = $line;
     $a->errorchar = $char;
     parent::__construct('errorparsingxml', 'error', $link, $a);
 }
开发者ID:evltuma,项目名称:moodle,代码行数:11,代码来源:xmlize.php

示例7: stdClass

 function __construct($component, $expected, $current)
 {
     global $CFG;
     $a = new stdClass();
     $a->component = $component;
     $a->expected = $expected;
     $a->current = $current;
     parent::__construct('detectedmisplacedplugin', 'core_plugin', "{$CFG->wwwroot}/{$CFG->admin}/index.php", $a);
 }
开发者ID:tyleung,项目名称:CMPUT401MoodleExams,代码行数:9,代码来源:upgradelib.php

示例8:

 /**
  * Constructor
  *
  * @param string $debuginfo the debug info
  */
 function __construct($debuginfo)
 {
     parent::__construct('accessexception', 'webservice', '', null, $debuginfo);
 }
开发者ID:rushi963,项目名称:moodle,代码行数:9,代码来源:lib.php

示例9: __construct

 public function __construct($qubaid, $slot, $postdata)
 {
     if ($postdata == null) {
         $postdata = data_submitted();
     }
     parent::__construct('submissionoutofsequence', 'question', '', null, "QUBAid: {$qubaid}, slot: {$slot}, post data: " . print_r($postdata, true));
 }
开发者ID:mongo0se,项目名称:moodle,代码行数:7,代码来源:lib.php

示例10:

 /**
  * Constructor
  * @param string $hint short description of problem
  * @param string $debuginfo optional more detailed information
  */
 function __construct($hint, $debuginfo = null)
 {
     parent::__construct('invalidstatedetected', 'debug', '', $hint, $debuginfo);
 }
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:9,代码来源:setuplib.php

示例11: __construct

 public function __construct($errorcode, $a = NULL, $debuginfo = null)
 {
     parent::__construct($errorcode, 'error', '', $a, $debuginfo);
 }
开发者ID:eamador,项目名称:moodle-course-custom-fields,代码行数:4,代码来源:backup.class.php

示例12: __construct

 /**
  * @param string $errorcode exception description identifier
  * @param mixed $debuginfo debugging data to display
  */
 public function __construct($errorcode, $debuginfo = null)
 {
     parent::__construct($errorcode, 'core_plugin', '', null, print_r($debuginfo, true));
 }
开发者ID:masaterutakeno,项目名称:MoodleMobile,代码行数:8,代码来源:pluginlib.php

示例13: __construct

 /**
  * Constructor.
  * @param string $component the component from version.php
  * @param string $expected expected directory, null means calculate
  * @param string $current plugin directory path
  */
 public function __construct($component, $expected, $current) {
     global $CFG;
     if (empty($expected)) {
         list($type, $plugin) = core_component::normalize_component($component);
         $plugintypes = core_component::get_plugin_types();
         if (isset($plugintypes[$type])) {
             $expected = $plugintypes[$type] . '/' . $plugin;
         }
     }
     if (strpos($expected, '$CFG->dirroot') !== 0) {
         $expected = str_replace($CFG->dirroot, '$CFG->dirroot', $expected);
     }
     if (strpos($current, '$CFG->dirroot') !== 0) {
         $current = str_replace($CFG->dirroot, '$CFG->dirroot', $current);
     }
     $a = new stdClass();
     $a->component = $component;
     $a->expected  = $expected;
     $a->current   = $current;
     parent::__construct('detectedmisplacedplugin', 'core_plugin', "$CFG->wwwroot/$CFG->admin/index.php", $a);
 }
开发者ID:jtibbetts,项目名称:moodle,代码行数:27,代码来源:upgradelib.php

示例14:

 /**
  * Constructor
  *
  * @param string $errorcode error code
  * @param stdClass $a Extra words and phrases that might be required in the error string
  * @param string $debuginfo optional debugging information
  */
 function __construct($errorcode, $a = NULL, $debuginfo = NULL)
 {
     parent::__construct($errorcode, '', '', $a, $debuginfo);
 }
开发者ID:numbas,项目名称:moodle,代码行数:11,代码来源:file_exceptions.php

示例15: __construct

 /**
  * Constructs a new exception
  *
  * @param string $errorcode
  * @param string $link
  * @param mixed $a
  * @param mixed $debuginfo
  */
 public function __construct($errorcode, $link = '', $a = null, $debuginfo = null)
 {
     parent::__construct($errorcode, 'antivirus', $link, $a, $debuginfo);
 }
开发者ID:evltuma,项目名称:moodle,代码行数:12,代码来源:scanner_exception.php


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