當前位置: 首頁>>代碼示例>>PHP>>正文


PHP JError::handleEcho方法代碼示例

本文整理匯總了PHP中JError::handleEcho方法的典型用法代碼示例。如果您正苦於以下問題:PHP JError::handleEcho方法的具體用法?PHP JError::handleEcho怎麽用?PHP JError::handleEcho使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在JError的用法示例。


在下文中一共展示了JError::handleEcho方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getConnection

 /**
  * @since 3.0b
  * helper function get get a connection
  * @param mixed - a list table or connection id
  */
 public function getConnection($item = null)
 {
     $jform = JRequest::getVar('jform', array(), 'post');
     if (is_object($item)) {
         $item = is_null($item->connection_id) ? JArrayHelper::getValue($jform, 'connection_id', -1) : $item->connection_id;
     }
     $connId = (int) $item;
     $config = JFactory::getConfig();
     if (!self::$connection) {
         self::$connection = array();
     }
     if (!array_key_exists($connId, self::$connection)) {
         $connectionModel = JModel::getInstance('connection', 'FabrikFEModel');
         $connectionModel->setId($connId);
         if ($connId === -1) {
             //-1 for creating new table
             $connectionModel->loadDefaultConnection();
             $connectionModel->setId($connectionModel->getConnection()->id);
         }
         $connection = $connectionModel->getConnection();
         self::$connection[$connId] = $connectionModel;
         if (JError::isError(self::$connection[$connId])) {
             JError::handleEcho(self::$connection[$connId]);
         }
     }
     return self::$connection[$connId];
 }
開發者ID:romuland,項目名稱:khparts,代碼行數:32,代碼來源:parent.php

示例2: array

 /**
  * function get the tables connection object
  * sets $this->_oConn to the tables connection
  * @return object connection
  */
 function &getConnection()
 {
     $config = JFactory::getConfig();
     if (!isset($this->_oConn)) {
         $table =& $this->getTable();
         $connectionModel = JModel::getInstance('connection', 'FabrikFEModel');
         $jform = JRequest::getVar('jform', array(), 'post');
         $connId = is_null($table->connection_id) ? JArrayHelper::getValue($jform, 'connection_id', null) : $table->connection_id;
         $connectionModel->setId($connId);
         if ($connId == '' || is_null($connId) || $connId == '-1') {
             //-1 for creating new table
             $connectionModel->loadDefaultConnection();
             $connectionModel->setId($connectionModel->getConnection()->id);
         }
         $connection =& $connectionModel->getConnection();
         $this->_oConn =& $connectionModel;
         if (JError::isError($this->_oConn)) {
             JError::handleEcho($this->_oConn);
         }
     }
     return $this->_oConn;
 }
開發者ID:juliano-hallac,項目名稱:fabrik,代碼行數:27,代碼來源:list.php


注:本文中的JError::handleEcho方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。