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


PHP tx_rnbase::makeInstanceClassName方法代碼示例

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


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

示例1: queryDB

 /**
  * Make a query to database. You will receive an array with result rows. All
  * database resources are closed after each call.
  * A Hidden and Delete-Clause for FE-Requests is added for requested table.
  *
  * @param $what requested columns
  * @param $from either the name of on table or an array with index 0 the from clause
  *              and index 1 the requested tablename
  * @param $where
  * @param $groupby
  * @param $orderby
  * @param $wrapperClass Name einer WrapperKlasse für jeden Datensatz
  * @param $limit = '' Limits number of results
  * @param $debug = 0 Set to 1 to debug sql-String
  * @deprecated use tx_rnbase_util_DB::doSelect()
  */
 function queryDB($what, $from, $where, $groupBy = '', $orderBy = '', $wrapperClass = 0, $limit = '', $debug = 0)
 {
     $tableName = $from;
     $fromClause = $from;
     if (is_array($from)) {
         $tableName = $from[1];
         $fromClause = $from[0];
     }
     $limit = intval($limit) > 0 ? intval($limit) : '';
     // Zur Where-Clause noch die gültigen Felder hinzufügen
     $contentObjectRendererClass = tx_rnbase_util_Typo3Classes::getContentObjectRendererClass();
     $where .= $contentObjectRendererClass::enableFields($tableName);
     if ($debug) {
         $sql = $GLOBALS['TYPO3_DB']->SELECTquery($what, $fromClause, $where, $groupBy, $orderBy);
         tx_rnbase_util_Debug::debug($sql, 'SQL');
         tx_rnbase_util_Debug::debug(array($what, $from, $where));
     }
     $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($what, $fromClause, $where, $groupBy, $orderBy, $limit);
     $wrapper = is_string($wrapperClass) ? tx_rnbase::makeInstanceClassName($wrapperClass) : 0;
     $rows = array();
     while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
         $rows[] = $wrapper ? new $wrapper($row) : $row;
     }
     $GLOBALS['TYPO3_DB']->sql_free_result($res);
     if ($debug) {
         tx_rnbase_util_Debug::debug(count($rows), 'Rows retrieved');
     }
     return $rows;
 }
開發者ID:RocKordier,項目名稱:rn_base,代碼行數:45,代碼來源:Connection.php


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