本文整理汇总了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;
}