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


PHP Debug::error方法代码示例

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


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

示例1: error

 static function error($errorNumber, $message = null, $pos = null)
 {
     $GLOBALS['%s']->push("PHP::error");
     $__hx__spos = $GLOBALS['%s']->length;
     Debug::error($errorNumber, $message, $pos->fileName, $pos->lineNumber);
     $GLOBALS['%s']->pop();
 }
开发者ID:ConfidantCommunications,项目名称:JoomlaHaxe,代码行数:7,代码来源:PHP.class.php

示例2: getOpt

 public function getOpt($section = 'options', $opt)
 {
     if (!empty($this->aConfig[$section][$opt])) {
         return $this->aConfig[$section][$opt];
     } else {
         Debug::error("Config option not found: " . $section . "->" . $opt);
     }
 }
开发者ID:jorgefuertes,项目名称:qPlanet,代码行数:8,代码来源:Config.class.php

示例3: Read

 /**
  *
  * Reads a file and returns it as a string.
  * @param string $file Filename
  */
 public static function Read($file)
 {
     if (!file_exists($file)) {
         Debug::error("File '{$file}' not found.");
     }
     Debug::say("Including '{$file}'");
     return file_get_contents($file, 1024);
 }
开发者ID:jorgefuertes,项目名称:qPlanet,代码行数:13,代码来源:File.class.php

示例4: _connect

 private function _connect($config)
 {
     $this->_mysql = new mysqli($config['database.host'], $config['database.user'], $config['database.password'], $config['database.name']);
     if (!$this->_mysql || mysqli_connect_errno()) {
         Debug::error("No Connection. " . mysqli_connect_error());
         return false;
     }
     return true;
 }
开发者ID:nickbreslin,项目名称:Assembler,代码行数:9,代码来源:database.php

示例5: setParams

function setParams($newParams)
{
    if (is_array($newParams)) {
        global $params;
        $params = array_merge($params, $newParams);
    } else {
        Debug::error("No params.");
    }
}
开发者ID:nickbreslin,项目名称:Google-Spreadsheet-to-CSV,代码行数:9,代码来源:bootstrap.php

示例6: _execute

 protected function _execute($queries)
 {
     $result = true;
     foreach ($queries as $query) {
         if ($response = $this->_db->query($query)) {
             Debug::info("Applied: " . get_class($this));
         } else {
             Debug::error("Error: " . get_class($this));
             $result = false;
         }
     }
     return $result;
 }
开发者ID:nickbreslin,项目名称:Assembler,代码行数:13,代码来源:dbchange.php

示例7: setCode

 public function setCode($code)
 {
     $code = intval($code);
     if (!in_array($code, $this->_validCodes)) {
         Debug::error("Invalid Code Value: " . $code);
         return false;
     }
     if ($this->_code == 0) {
         Debug::warning("Response has already failed. Ignore new code: " . $code);
         return false;
     }
     $this->_code = $code;
     return true;
 }
开发者ID:nickbreslin,项目名称:Assembler,代码行数:14,代码来源:response.php

示例8: fetch

 public static function fetch($url, $xml = false, $fields = false)
 {
     if (empty($url)) {
         Debug::error("Missing Url for Curl");
         return false;
     }
     if (!self::$instance) {
         self::$instance = new self();
     }
     if ($xml) {
         $results = self::$instance->xml($url, $fields);
     } else {
         $results = self::$instance->curl($url, $fields);
     }
     return $results;
 }
开发者ID:nickbreslin,项目名称:Assembler,代码行数:16,代码来源:curl.php

示例9: getCategories

 public function getCategories()
 {
     if ($result = SQL::query("\r\nSELECT\r\n\t[blog_categories]p.[category_id] AS [category_id],\r\n\t[blog_categories]p.[category_header] AS [category_header],\r\n\t[blog_categories]p.[category_slug] AS [category_slug],\r\n\tcount([blog_posts]p.[post_id]) AS [posts_count]\r\nFROM [blog_categories]p\r\nLEFT JOIN [blog_posts]p\r\n\tON ([blog_categories]p.[category_id] == [blog_posts]p.[category_id] AND [blog_posts]p.[post_published] == 1)\r\nGROUP BY [blog_posts]p.[category_id]\r\nORDER BY [blog_categories]p.[category_header] ASC")) {
         $loop = new TPLLoop(TPL_LOOP_BLOG_CATEGORIES);
         foreach ($result->fetch() as $category) {
             $item = new TPLLoopItem();
             $item->add('CATEGORY_LINK', str_replace(array('%slug', '%id'), array($category->category_slug, $category->category_id), CFG_URL_BLOG_CATEGORY));
             $item->add('CATEGORY_ID', $category->category_id);
             $item->add('CATEGORY_SLUG', $category->category_slug);
             $item->add('CATEGORY_HEADER', $category->category_header);
             $item->add('POSTS_COUNT', $category->posts_count);
             $loop->append($item);
         }
         $loop->pack();
     } else {
         Debug::error('The blog categories could not be loaded.');
     }
 }
开发者ID:jankuca,项目名称:escms,代码行数:18,代码来源:blog.mod.php

示例10: fetchXML

 public function fetchXML($url, $token)
 {
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_URL, $url);
     // URL to Scrape
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     // Return string from curl_exec
     curl_setopt($ch, CURLOPT_HEADER, false);
     // Include the header info
     curl_setopt($ch, CURLOPT_HTTPHEADER, array("GData-Version: 2.0", "Authorization: AuthSub token=\"{$token}\""));
     $results = curl_exec($ch);
     curl_close($ch);
     $string = simplexml_load_string($results);
     if ($string === FALSE) {
         Debug::error("Not XML");
         return false;
     } else {
         $oXML = new SimpleXMLElement($results);
         return $oXML;
     }
 }
开发者ID:nickbreslin,项目名称:Google-Spreadsheet-to-CSV,代码行数:21,代码来源:googledocs.php

示例11: loadModules

 public static function loadModules()
 {
     //Debug::dump(self::$cfg);
     //SQL::exec("INSERT INTO [modules]p ([codename],[core],[active],[order]) VALUES ('blog',0,1,1)");
     if ($result = SQL::query("SELECT [codename],[core] FROM [modules]p WHERE ([active] == 1) ORDER BY [core] DESC, [order] ASC")) {
         foreach ($result->fetch() as $module) {
             if (defined('IN_ACP')) {
                 $ext = '.acp';
             } elseif (defined('IN_ACTION')) {
                 $ext = '.action';
             } else {
                 $ext = '.sys';
             }
             if ((bool) $module->core) {
                 $path = './app/modules/' . $module->codename . '.mod.php';
             } else {
                 $path = './modules/' . $module->codename . '.mod.php';
             }
             if (file_exists($path)) {
                 if (!(include_once $path)) {
                     Debug::error('The module <strong>' . $module->codename . '</strong> could not be loaded.');
                 }
             }
             if ((bool) $module->core) {
                 $path = './app/modules/' . $module->codename . $ext . '.mod.php';
             } else {
                 $path = './modules/' . $module->codename . $ext . '.mod.php';
             }
             if (file_exists($path)) {
                 if (!(include_once $path)) {
                     Debug::error('The module <strong>' . $module->codename . '</strong> could not be loaded.');
                 }
             }
         }
     } else {
         throw new Exception('The system modules could not be loaded.');
     }
 }
开发者ID:jankuca,项目名称:escms,代码行数:38,代码来源:core.layer.php

示例12: postprocText

 /**
  * Переписанный подписывальщик форм.
  */
 function postprocText($text)
 {
     // Split text by forms.
     $formChunks = preg_split('/(' . $this->_mf_hash . 'form\\d+\\|)/s', $text, 0, PREG_SPLIT_DELIM_CAPTURE);
     $text = $formChunks[0];
     // Remove hashes from text outside all the forms.
     $this->_getMetasInText($text);
     // Now process each form separately.
     for ($i = 1, $n = count($formChunks); $i < $n; $i += 2) {
         $hash = $formChunks[$i];
         $content = $formChunks[$i + 1];
         // This form tag.
         $formTag = $this->_mf_collectForms[$hash];
         // Extract stored hashes for form fields & clean hashes from text.
         $metas = $this->_getMetasInText($content);
         /// Step 0. Check whether the "name" attribute within <form> container is provided
         if (empty($formTag['name'])) {
             Core::Error('Container &lt;form&gt; should have a "name" attribute ' . 'with the unique identifier that is registered in global form pool ' . '(Form_Observer)');
         }
         $form = FormObserver::getForm($formTag['name']);
         if ($formTag['action'] != $form->getAction()) {
             Debug::error('Invalid form action is specified: %s found, but %s is expected', $formTag['action'], $form->getAction());
         }
         /// Step 2. We sign the form name to invoke an appropriate form object
         $metas['items'][self::ID_ELT] = array("type" => "text", "original" => $formTag['name'], "name" => self::ID_ELT);
         /// Step 3. Ok, now we compare the form object and the elements found in the container
         $components = array();
         foreach ($metas['items'] as $meta) {
             $components[$meta['name']] = $meta;
         }
         $hiddenComponents = $form->compare($components);
         // Process only POST forms!
         if (strtoupper(@$formTag['method']) == 'POST') {
             // Generate hidden tag.
             $packed = $this->_packMeta($metas);
             if ($this->MF_USE_SESSION) {
                 // If session is used, store data in session.
                 $contentHash = $this->_getHashcode($packed);
                 $_SESSION[$this->MF_META_ELT][$contentHash] = $packed;
                 $packed = $contentHash;
             }
             // Add suffix (e.g. - current timestamp) to metadata as comment. This
             // should help debugging: we always know when form metadata was generated
             // and detect stupid proxy requests when page is cached for weeks. This
             // date must NOT be included in digital signature!
             if ($this->MF_SIGN_SUFFIX !== null) {
                 $packed .= " " . $this->MF_SIGN_SUFFIX;
             }
             $hidden = array('_tagName' => 'input', 'type' => 'hidden', 'name' => $this->MF_META_ELT, 'value' => $packed, '_text' => null);
             $text .= $this->makeTag($hidden);
             /// So right now we add the signed element containing the ID of a form
             $hidden = array('_tagName' => 'input', 'type' => 'hidden', 'name' => self::ID_ELT, 'value' => $formTag['name'], '_text' => null);
             $text .= $this->makeTag($hidden);
             foreach ((array) $hiddenComponents as $component) {
                 $defVal = $component->getDefaultValue();
                 $tag = array('_tagName' => 'input', 'type' => 'hidden', 'name' => $component->getName(), 'value' => is_null($defVal) ? @$_POST[$component->getName()] : $defVal, '_text' => null);
                 $text .= $this->makeTag($tag);
             }
         }
         $text .= $content;
     }
     return $text;
 }
开发者ID:phoebius,项目名称:proof-of-concept,代码行数:66,代码来源:FormSigner.class.php

示例13: getComponent

 /**
  * Gets the form component
  *
  * @param string $componentName
  * @return FormComponent
  */
 function getComponent($componentName)
 {
     if (isset($this->components[$componentName])) {
         return $this->components[$componentName];
     } else {
         Debug::error('unknown compoentn %s', $componentName);
     }
 }
开发者ID:phoebius,项目名称:proof-of-concept,代码行数:14,代码来源:Form.class.php

示例14: _query

 private function _query($query)
 {
     if (!$this->_connected) {
         return false;
     }
     $result = $this->_mysql->query($query);
     //print_r($result->fetch_object());
     //exit();
     if ($result) {
         return $result;
     } else {
         Debug::error($this->_mysql->error);
         return false;
     }
 }
开发者ID:nickbreslin,项目名称:Google-Spreadsheet-to-CSV,代码行数:15,代码来源:database.php

示例15: execute


//.........这里部分代码省略.........
                     break;
                 case "~":
                     $output .= $this->b_complement($r[1]);
                     break;
                 case "<<":
                     $output .= $this->leftShift($r[1], $r[2]);
                     break;
                 case ">>":
                     $output .= $this->rightShift($r[1], $r[2]);
                     break;
                 case "<":
                     $output .= $this->f_less($r[1], $r[2]);
                     break;
                 case ">":
                     $output .= $this->f_greater($r[1], $r[2]);
                     break;
                 case "<=":
                     $output .= $this->f_less_or_equal($r[1], $r[2]);
                     break;
                 case ">=":
                     $output .= $this->f_greater_or_equal($r[1], $r[2]);
                     break;
                 case "==":
                     $output .= $this->f_equal($r[1], $r[2]);
                     break;
                 case "!=":
                     $output .= $this->f_notEqual($r[1], $r[2]);
                     break;
                 case "!":
                     $output .= $this->f_not($r[1]);
                     break;
                 case "..":
                     if (isset($r[3])) {
                         $output .= $this->createRange($r[1], $r[2], $r[3]);
                     } else {
                         if (isset($r[2])) {
                             $output .= $this->createRange($r[1], $r[2], 1);
                         } else {
                             $output .= $this->createRange(0, $r[1], 1);
                         }
                     }
                     break;
                 case "@&":
                     $output .= $this->listLen($r[1]);
                     break;
                 case "@#":
                     $output .= $this->listItem($r[1], $r[2]);
                     break;
                 default:
                     DEBUG::log("Recursing :" . htmlentities($rvalue));
                     $output .= $this->execute($rvalue);
                     break;
             }
         }
         if ($foundRawSig) {
             break;
         }
     }
     if (!$foundRawSig) {
         if (strpos($code, "(") !== False) {
             $newcode = $code;
             while (strpos($newcode, "(") != False) {
                 DEBUG::log("Processing Complex : {$safe_code}");
                 $newcode = $this->processComplex($newcode);
             }
             if (sizeof(explode(" ", $newcode)) > 1) {
                 $output .= $this->execute($newcode);
             }
         } else {
             if (strpos($code, '[') !== False) {
                 list($lvalue, $rvalue) = explode('[', $code);
                 $lvalue = trim($lvalue);
                 $rvalue = substr($rvalue, 0, strpos($rvalue, ']'));
                 $listVal = explode(",", $rvalue);
                 if (strlen($lvalue) != 0) {
                     $output .= " [ ";
                     $size = sizeof($listVal);
                     for ($i = 0; $i < $size; $i++) {
                         $newCode = trim($lvalue . " " . trim($listVal[$i]));
                         $output .= trim($this->execute($newCode));
                         if ($i != $size - 1) {
                             $output .= ", ";
                         }
                     }
                     $output .= " ] ";
                 } else {
                     $output .= " [" . $rvalue . "] ";
                 }
             } else {
                 if (preg_match("/^[-+]?[0-9]*[.]?[0-9]+[eE]?[0-9]*\$/", trim($code)) != False) {
                     $output .= $safe_code;
                 } else {
                     Debug::error("Error: No match found for symbol `{$safe_code}'");
                 }
             }
         }
     }
     Debug::log("Output : " . $output);
     return $output;
 }
开发者ID:xk0der,项目名称:AFL,代码行数:101,代码来源:interpreter.php


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