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


PHP t3lib_div::debug方法代码示例

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


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

示例1: editAction

 /**
  * list action
  * @var Tx_KiddogNews_Domain_Model_Category $category
  * @return string The rendered list action
  */
 public function editAction(Tx_KiddogNews_Domain_Model_Category $category = NULL)
 {
     $this->view->assign('category', $category);
     t3lib_div::debug($this->settings['category']['root']);
     $this->view->assign('allCategories', $this->categoryRepository->findAll());
     $this->view->assign('rootCategorie', $this->settings['category']['root']);
 }
开发者ID:preinboth,项目名称:kiddog_news,代码行数:12,代码来源:CategoryController.php

示例2: render

 /**
  * Wrapper for TYPO3s famous debug() function
  *
  * @param string $title
  * @return string the altered string.
  * @author Bastian Waidelich <bastian@typo3.org>
  */
 public function render($title = NULL)
 {
     ob_start();
     t3lib_div::debug($this->renderChildren(), $title);
     $output = ob_get_contents();
     ob_end_clean();
     return $output;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:15,代码来源:DebugViewHelper.php

示例3: render

 /**
  * Wrapper for tx_apimacmade::debug() or t3lib_dib::debug() if
  * EXT:api_macmade is not loaded.
  *
  * @param string $header The debug output header.
  * @return string The debug output.
  */
 public function render($header = 'DEBUG')
 {
     ob_start();
     if (class_exists('tx_apimacmade')) {
         tx_apimacmade::debug($this->renderChildren(), $header);
     } else {
         t3lib_div::debug($this->renderChildren(), $header);
     }
     $output = ob_get_contents();
     ob_end_clean();
     return $output;
 }
开发者ID:romac,项目名称:Powered,代码行数:19,代码来源:DebugViewHelper.php

示例4: user_keepRolloverAtOnClick

/**
 * Example can be found in the testsite package at the page-path "/Intro/TypoScript examples/Menu object examples/Loading multiple.../"
 *
 * @param	array		The menu item array, $this->I (in the parent object)
 * @param	array		TypoScript configuration for the function. Notice that the property "parentObj" is a reference to the parent (calling) object (the tslib_Xmenu class instantiated)
 * @return	array		The processed $I array returned (and stored in $this->I of the parent object again)
 * @see tslib_menu::userProcess(), tslib_tmenu::writeMenu(), tslib_gmenu::writeMenu()
 */
function user_keepRolloverAtOnClick($I, $conf)
{
    $itemRow = $conf['parentObj']->menuArr[$I['key']];
    // Setting the document status content to the value of the page title on mouse over
    if (!$I['linkHREF']['TARGET']) {
        $I['linkHREF']['HREF'] = '#';
        $I['linkHREF']['onClick'] .= 'ARO_setLocation' . $conf['setLocation'] . '(' . $itemRow['uid'] . ',\'' . $I['theName'] . '\'); return false;';
    } else {
        $I['linkHREF']['onClick'] .= 'ARO_setActiveImg' . '(\'' . $I['theName'] . '\');';
    }
    if ($I['linkHREF']['onMouseover']) {
        $I['linkHREF']['onMouseover'] = 'ARO_' . $I['linkHREF']['onMouseover'];
    }
    if ($I['linkHREF']['onMouseout']) {
        $I['linkHREF']['onMouseout'] = 'ARO_' . $I['linkHREF']['onMouseout'];
    }
    if ($conf['parentObj']->isActive($itemRow['uid'])) {
        $conf['parentObj']->WMextraScript .= '
<script type="text/javascript">
	/*<![CDATA[*/
 ARO_Image = "' . $I['theName'] . '";
 ' . $I['linkHREF']['onMouseover'] . '
	/*]]>*/
</script>
		';
    }
    // Update the link in the parent object:
    $conf['parentObj']->I = $I;
    // setting internal $I - needed by setATagParts() function!
    $conf['parentObj']->setATagParts();
    // Setting the A1 and A2 of the internal $I
    $I = $conf['parentObj']->I;
    // retrieving internal $I
    $I['parts']['ATag_begin'] = $I['A1'];
    // Setting the ATag_begin to the value of this $I
    // Debug:
    if ($conf['debug']) {
        // Outputting for debug example:
        echo 'ITEM: <h2>' . htmlspecialchars($itemRow['uid'] . ': ' . $itemRow['title']) . '</h2>';
        t3lib_div::debug($itemRow);
        t3lib_div::debug($I);
        echo '<hr />';
    }
    // Returns $I:
    return $I;
}
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:54,代码来源:example_keepRollover.php

示例5: sec

 function sec($piVars)
 {
     // config
     $this->confArr = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['wt_doorman']);
     // Get backandconfig
     $this->removeXSS = t3lib_div::makeInstance('tx_wtdoorman_RemoveXSS');
     // Create new instance for removeXSS class
     // let's go
     if ($this->confArr['debug'] == 1) {
         t3lib_div::debug($piVars, 'wt_doorman input values - ' . $this->debugMessage);
     }
     if (count($piVars) > 0) {
         // if piVars are set
         foreach ($piVars as $key => $value) {
             // one loop for every var
             if (array_key_exists($key, $this->secParams) || array_key_exists('*', $this->secParams)) {
                 // if current key is an allowed parameter OR there is a wildcard in first level
                 if (!is_array($piVars[$key])) {
                     // first level
                     if (!array_key_exists('*', $this->secParams)) {
                         // if wildcard should NOT be used
                         $piVars[$key] = $this->filter($piVars[$key], $this->secParams[$key]);
                         // clean current string with his method
                     } else {
                         // use wildcard (all keys will be handled in the same way
                         $piVars[$key] = $this->filter($piVars[$key], $this->secParams['*']);
                         // clean all this strings with method from *
                     }
                 } else {
                     // second level
                     if (count($piVars[$key]) > 0) {
                         // only if exists
                         foreach ($piVars[$key] as $key2 => $value2) {
                             // one row for every key in second level
                             if (!is_array($value2)) {
                                 // only on second level
                                 if (!array_key_exists('*', $this->secParams[$key])) {
                                     // if wildcard should NOT be used
                                     $piVars[$key][$key2] = $this->filter($piVars[$key][$key2], $this->secParams[$key][$key2]);
                                     // clean current string with his method
                                 } else {
                                     // use wildcard (all keys will be handled in the same way
                                     $piVars[$key][$key2] = $this->filter($piVars[$key][$key2], $this->secParams[$key]['*']);
                                     // clean all this strings with method from *
                                 }
                             } else {
                                 unset($piVars[$key][$key2]);
                             }
                             // delete
                         }
                     } else {
                         unset($piVars[$key]);
                     }
                     // delete
                 }
             } else {
                 // curent key exists not in allowed array
                 if ($this->delNotSetVars == 1) {
                     unset($piVars[$key]);
                 }
                 // delete
             }
         }
         if ($this->allow_removeXSS) {
             $piVars = array_map(array($this->removeXSS, 'RemoveXSS'), $piVars);
         }
         // removeXSS recursive for all piVars
         if ($this->confArr['debug'] == 1) {
             t3lib_div::debug($piVars, 'wt_doorman output values - ' . $this->debugMessage);
         }
         return $piVars;
         // return cleaned piVars
     }
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:74,代码来源:class.tx_wtdoorman_security.php

示例6: listView

 /**
  * List view, listing the records from the table.
  * Does also provide the single view if the "showUid" piVar is set.
  *
  * @param	string		HTML input content - not used, ignore.
  * @param	array		TypoScript configuration array
  * @return	string		HTML content for the listing.
  */
 function listView($content, $conf)
 {
     // Init:
     $this->conf = $conf;
     // Setting the TypoScript passed to this function in $this->conf
     $this->pi_setPiVarDefaults();
     $this->pi_loadLL();
     // Loading the LOCAL_LANG values
     $this->pi_USER_INT_obj = 1;
     // Configuring so caching is not expected. This value means that no cHash params are ever set. We do this, because it's a USER_INT object!
     $this->lConf = $lConf = $this->conf['listView.'];
     // Local settings for the listView function
     $this->pi_alwaysPrev = $this->lConf['alwaysPrev'];
     $this->viewMode = 'listView';
     // Select either single view or list view:
     if ($this->piVars['showUid']) {
         // If a single element should be displayed:
         $this->internal['currentTable'] = 'fe_users';
         $this->internal['currentRow'] = $this->pi_getRecord('fe_users', $this->piVars['showUid']);
         $content = $this->singleView($content, $conf);
         return $content;
     } else {
         if (!isset($this->piVars['pointer'])) {
             $this->piVars['pointer'] = 0;
         }
         // Initializing the query parameters:
         list($this->internal['orderBy'], $this->internal['descFlag']) = explode(':', $this->piVars['sort']);
         $this->internal['results_at_a_time'] = t3lib_div::intInRange($lConf['results_at_a_time'], 0, 1000, 3);
         // Number of results to show in a listing.
         $this->internal['maxPages'] = t3lib_div::intInRange($lConf['maxPages'], 0, 1000, 2);
         // The maximum number of "pages" in the browse-box: "Page 1", 'Page 2', etc.
         $this->internal['searchFieldList'] = 'username,name,email,country,city,zip,telephone,address,title';
         $this->internal['orderByList'] = 'username,name,email,country,city,zip';
         // selectable fe-group, contributed by Stefan Padberg <post@webskriptorium.com>, modified by Stefan Strasser
         // calculate where-clause:
         if ($this->config['groupSelectmode'] != 0) {
             $where = 'AND ( ';
             if ($this->config['groupSelectmode'] == -1) {
                 $whereConn = 'AND';
                 $whereLike = 'NOT LIKE';
             } else {
                 $whereConn = 'OR';
                 $whereLike = 'LIKE';
             }
             for ($i = 0; $i < count($this->groupSelectArray); $i++) {
                 if ($i != 0) {
                     $where .= $whereConn;
                 }
                 $where .= ' usergroup ' . $whereLike . ' "' . $this->groupSelectArray[$i] . '" ' . $whereConn . ' usergroup ' . $whereLike . ' "%,' . $this->groupSelectArray[$i] . '" ' . $whereConn . ' usergroup ' . $whereLike . ' "' . $this->groupSelectArray[$i] . ',%" ' . $whereConn . ' usergroup ' . $whereLike . ' "%,' . $this->groupSelectArray[$i] . ',%" ';
             }
             $where .= ')';
         }
         // end of selectable fe-group modification, adding $where to the query below
         // Get number of records:
         $query = $this->pi_list_query('fe_users', 1, $where);
         $res = $GLOBALS['TYPO3_DB']->sql_query($query);
         if ($GLOBALS['TYPO3_DB']->sql_error()) {
             t3lib_div::debug(array($GLOBALS['TYPO3_DB']->sql_error(), $query));
         }
         list($this->internal['res_count']) = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);
         // Make listing query, pass query to MySQL:
         $query = $this->pi_list_query('fe_users', 0, $where);
         $res = $GLOBALS['TYPO3_DB']->sql_query($query);
         if ($GLOBALS['TYPO3_DB']->sql_error()) {
             t3lib_div::debug(array($GLOBALS['TYPO3_DB']->sql_error(), $query));
         }
         $this->internal['currentTable'] = 'fe_users';
         // Put the whole list together:
         $fullTable = '';
         // Clear var;
         // Adds the whole list table
         $fullTable .= $this->pi_list_makelist($res, $this->conf['listView.']['tableParams_list']);
         // Adds the result browser:
         $fullTable .= '<p>' . $this->pi_list_browseresults() . '</p>';
         // Adds the search box:
         $fullTable .= $this->pi_list_searchBox();
         // Returns the content from the plugin.
         return $fullTable;
     }
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:88,代码来源:class.tx_newloginbox_pi3.php

示例7: debugQuery

 /**
  * Debugs a SQL query from a QueryResult
  *
  * @param $queryResult
  * @param boolean $explainOutput
  * @return void
  */
 public function debugQuery($queryResult, $explainOutput = FALSE)
 {
     $GLOBALS['TYPO3_DB']->debugOutput = 2;
     if ($explainOutput) {
         $GLOBALS['TYPO3_DB']->explainOutput = true;
     }
     $GLOBALS['TYPO3_DB']->store_lastBuiltQuery = true;
     $queryResult->toArray();
     t3lib_div::debug($GLOBALS['TYPO3_DB']->debug_lastBuiltQuery);
     $GLOBALS['TYPO3_DB']->store_lastBuiltQuery = false;
     $GLOBALS['TYPO3_DB']->explainOutput = false;
     $GLOBALS['TYPO3_DB']->debugOutput = false;
 }
开发者ID:TYPO3-typo3org,项目名称:typo3_agencies,代码行数:20,代码来源:AgencyRepository.php

示例8: main


//.........这里部分代码省略.........
         $this->gpvar['puid'] = $this->pi_getFFvalue($flexformData, 'puid', 'sDEF');
         $this->gpvar['title'] = $this->pi_getFFvalue($flexformData, 'title', 'sDEF');
         $this->gpvar['sku'] = $this->pi_getFFvalue($flexformData, 'sku', 'sDEF');
         $this->gpvar['price'] = $this->pi_getFFvalue($flexformData, 'price', 'sDEF');
         $this->gpvar['tax'] = $this->pi_getFFvalue($flexformData, 'tax', 'sDEF');
         $attributes = split("\n", $this->pi_getFFvalue($flexformData, 'attributes', 'sDEF'));
         foreach ($attributes as $line) {
             list($key, $value) = explode("==", $line, 2);
             switch ($key) {
                 case 'service_attribute_1':
                     $this->gpvar['service_attribute_1'] = floatval($value);
                     break;
                 case 'service_attribute_2':
                     $this->gpvar['service_attribute_2'] = floatval($value);
                     break;
                 case 'service_attribute_3':
                     $this->gpvar['service_attribute_3'] = floatval($value);
                     break;
                 case 'min':
                     $this->gpvar['min'] = intval($value);
                     break;
                 case 'max':
                     $this->gpvar['max'] = intval($value);
                     break;
             }
         }
     }
     if ($this->gpvar['qty'] === 0) {
         // if no qty given
         $this->gpvar['qty'] = 1;
         // set to 1
     }
     // debug output
     if ($this->conf['debug']) {
         t3lib_div::debug($this->div->getProductsFromSession(), $this->extKey . ': ' . 'Values in session at the beginning');
         t3lib_div::debug($this->gpvar, $this->extKey . ': ' . 'Given params');
         t3lib_div::debug($this->conf, $this->extKey . ': ' . 'Typoscript configuration');
         t3lib_div::debug($_POST, $this->extKey . ': ' . 'All POST variables');
     }
     // remove product from session
     if (isset($this->piVars['del'])) {
         $this->div->removeProductFromSession($this);
         // remove product
     }
     // change qty
     if (isset($this->piVars['qty']) && is_array($this->piVars['qty'])) {
         $this->div->changeQtyInSession($this);
         // change qty
     }
     // change shipping
     if (isset($this->piVars['shipping'])) {
         $this->div->changeShippingInSession($this->piVars['shipping']);
         // change shipping
     }
     // change payment
     if (isset($this->piVars['payment'])) {
         $this->div->changePaymentInSession($this->piVars['payment']);
         // change payment
     }
     // change special
     if (isset($this->piVars['special'])) {
         $this->div->changeSpecialInSession($this->piVars['special']);
         // change payment
     }
     // add further product to session
     $this->newProduct = $this->div->getProductDetails($this->gpvar, $this);
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:67,代码来源:class.tx_wtcart_pi1.php

示例9: findLatest

 /**
  * Finds all posts for the Latest-View
  * @param var $time
  * @return array The posts
  */
 public function findLatest($time)
 {
     t3lib_div::debug($time);
     $query = $this->createQuery();
     return $query->matching($query->greaterThan('date', time() - $time))->setOrderings(array('date' => Tx_Extbase_Persistence_QueryInterface::ORDER_DESCENDING))->execute();
 }
开发者ID:preinboth,项目名称:kiddog_news,代码行数:11,代码来源:PostRepository.php

示例10: debug

 public static function debug($var = '', $header = '', $group = 'Debug')
 {
     $callingClassName = '\\TYPO3\\CMS\\Core\\Utility\\DebugUtility';
     if (class_exists($callingClassName) && method_exists($callingClassName, 'debug')) {
         call_user_func($callingClassName . '::debug', $var, $header, $group);
     } else {
         if (class_exists('t3lib_utility_Debug') && method_exists('t3lib_utility_Debug', 'debug')) {
             t3lib_utility_Debug::debug($var, $header, $group);
         } else {
             if (class_exists('t3lib_div') && method_exists('t3lib_div', 'debug')) {
                 t3lib_div::debug($var, $header, $group);
             }
         }
     }
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:15,代码来源:class.tx_div2007_core.php

示例11: debug

function debug($variable = '', $name = '*variable*', $line = '*line*', $file = '*file*', $recursiveDepth = 3, $debugLevel = E_DEBUG)
{
    // If you wish to use the debug()-function, and it does not output something, please edit the IP mask in TYPO3_CONF_VARS
    if (!t3lib_div::cmpIP(t3lib_div::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask'])) {
        return;
    }
    if (is_object($GLOBALS['error']) && @is_callable(array($GLOBALS['error'], 'debug'))) {
        $GLOBALS['error']->debug($variable, $name, $line, $file, $recursiveDepth, $debugLevel);
    } else {
        $title = $name === '*variable*' ? '' : $name;
        $group = $line === '*line*' ? NULL : $line;
        t3lib_div::debug($variable, $title, $group);
    }
}
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:14,代码来源:config_default.php

示例12: debug

/**
 * Debug function. Substitute since no config_default.php file is included anywhere
 *
 * @param	mixed		Debug var
 * @param	string		Header string
 * @return	void
 */
function debug($p1, $p2 = '')
{
    t3lib_div::debug($p1, $p2);
}
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:11,代码来源:class.t3lib_superadmin.php

示例13: main

    /**
     * Main function, returning the HTML content of the module
     *
     * @return string  HTML
     */
    function main()
    {
        $query = $this->query('*');
        $res = $GLOBALS['TYPO3_DB']->sql_query($query);
        if ($GLOBALS['TYPO3_DB']->sql_error()) {
            t3lib_div::debug(array('SQL error:', $GLOBALS['TYPO3_DB']->sql_error()));
        }
        $count = $GLOBALS['TYPO3_DB']->sql_num_rows($res);
        if (!t3lib_div::GPvar('do_update')) {
            $onClick = "document.location='" . t3lib_div::linkThisScript(array('do_update' => 1)) . "'; return false;";
            return 'There are ' . $count . ' rows in "tt_content" to update. Do you want to perform the action now?

					<form action=""><input type="submit" value="DO IT" onclick="' . htmlspecialchars($onClick) . '"></form>
					';
        } else {
            while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                $xml = trim('
<T3FlexForms>
	<meta>
		<dataStructureUid></dataStructureUid>
		<currentSheetId>s_logout</currentSheetId>
	</meta>
	<data>
		<sDEF>
			<lDEF>
				<show_forgot_password>
					<vDEF>' . $row['tx_newloginbox_show_forgot_password'] . '</vDEF>
				</show_forgot_password>
			</lDEF>
		</sDEF>
		<s_welcome>
			<lDEF>
				<header>
					<vDEF>' . $row['tx_newloginbox_header_welcome'] . '</vDEF>
				</header>
				<message>
					<vDEF>' . $row['tx_newloginbox_msg_welcome'] . '</vDEF>
				</message>
			</lDEF>
		</s_welcome>
		<s_success>
			<lDEF>
				<header>
					<vDEF>' . $row['tx_newloginbox_header_success'] . '</vDEF>
				</header>
				<message>
					<vDEF>' . $row['tx_newloginbox_msg_success'] . '</vDEF>
				</message>
			</lDEF>
		</s_success>
		<s_error>
			<lDEF>
				<header>
					<vDEF>' . $row['tx_newloginbox_header_error'] . '</vDEF>
				</header>
				<message>
					<vDEF>' . $row['tx_newloginbox_msg_error'] . '</vDEF>
				</message>
			</lDEF>
		</s_error>
		<s_status>
			<lDEF>
				<header>
					<vDEF>' . $row['tx_newloginbox_header_status'] . '</vDEF>
				</header>
				<message>
					<vDEF>' . $row['tx_newloginbox_msg_status'] . '</vDEF>
				</message>
			</lDEF>
		</s_status>
		<s_logout>
			<lDEF>
				<header>
					<vDEF>' . $row['tx_newloginbox_header_logout'] . '</vDEF>
				</header>
				<message>
					<vDEF>' . $row['tx_newloginbox_msg_logout'] . '</vDEF>
				</message>
			</lDEF>
		</s_logout>
	</data>
</T3FlexForms>
						');
                $updateRecord = array();
                $updateRecord['tx_newloginbox_show_forgot_password'] = 0;
                $updateRecord['tx_newloginbox_header_welcome'] = '';
                $updateRecord['tx_newloginbox_msg_welcome'] = '';
                $updateRecord['tx_newloginbox_header_success'] = '';
                $updateRecord['tx_newloginbox_msg_success'] = '';
                $updateRecord['tx_newloginbox_header_error'] = '';
                $updateRecord['tx_newloginbox_msg_error'] = '';
                $updateRecord['tx_newloginbox_header_status'] = '';
                $updateRecord['tx_newloginbox_msg_status'] = '';
                $updateRecord['tx_newloginbox_header_logout'] = '';
                $updateRecord['tx_newloginbox_msg_logout'] = '';
//.........这里部分代码省略.........
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:101,代码来源:class.ext_update.php

示例14: explain

 /**
  * Explain select queries
  * If $this->explainOutput is set, SELECT queries will be explained here. Only queries with more than one possible result row will be displayed.
  * The output is either printed as raw HTML output or embedded into the TS admin panel (checkbox must be enabled!)
  *
  * TODO: Feature is not DBAL-compliant
  *
  * @param	string		SQL query
  * @param	string		Table(s) from which to select. This is what comes right after "FROM ...". Required value.
  * @param	integer		Number of resulting rows
  * @return	boolean		True if explain was run, false otherwise
  */
 protected function explain($query, $from_table, $row_count)
 {
     if ((int) $this->explainOutput == 1 || (int) $this->explainOutput == 2 && t3lib_div::cmpIP(t3lib_div::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask'])) {
         // raw HTML output
         $explainMode = 1;
     } elseif ((int) $this->explainOutput == 3 && is_object($GLOBALS['TT'])) {
         // embed the output into the TS admin panel
         $explainMode = 2;
     } else {
         return false;
     }
     $error = $this->sql_error();
     $trail = t3lib_div::debug_trail();
     $explain_tables = array();
     $explain_output = array();
     $res = $this->sql_query('EXPLAIN ' . $query, $this->link);
     if (is_resource($res)) {
         while ($tempRow = $this->sql_fetch_assoc($res)) {
             $explain_output[] = $tempRow;
             $explain_tables[] = $tempRow['table'];
         }
         $this->sql_free_result($res);
     }
     $indices_output = array();
     // Notice: Rows are skipped if there is only one result, or if no conditions are set
     if ($explain_output[0]['rows'] > 1 || t3lib_div::inList('ALL', $explain_output[0]['type'])) {
         // only enable output if it's really useful
         $debug = true;
         foreach ($explain_tables as $table) {
             $tableRes = $this->sql_query('SHOW TABLE STATUS LIKE \'' . $table . '\'');
             $isTable = $this->sql_num_rows($tableRes);
             if ($isTable) {
                 $res = $this->sql_query('SHOW INDEX FROM ' . $table, $this->link);
                 if (is_resource($res)) {
                     while ($tempRow = $this->sql_fetch_assoc($res)) {
                         $indices_output[] = $tempRow;
                     }
                     $this->sql_free_result($res);
                 }
             }
             $this->sql_free_result($tableRes);
         }
     } else {
         $debug = false;
     }
     if ($debug) {
         if ($explainMode) {
             $data = array();
             $data['query'] = $query;
             $data['trail'] = $trail;
             $data['row_count'] = $row_count;
             if ($error) {
                 $data['error'] = $error;
             }
             if (count($explain_output)) {
                 $data['explain'] = $explain_output;
             }
             if (count($indices_output)) {
                 $data['indices'] = $indices_output;
             }
             if ($explainMode == 1) {
                 t3lib_div::debug($data, 'Tables: ' . $from_table, 'DB SQL EXPLAIN');
             } elseif ($explainMode == 2) {
                 $GLOBALS['TT']->setTSselectQuery($data);
             }
         }
         return true;
     }
     return false;
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:82,代码来源:class.t3lib_db.php

示例15: user_IProcFuncTest

/**
 * Used in the menu item state example of the "testsite" package at page-path "/Intro/TypoScript examples/Menu object examples/Menu state test/"
 *
 * @param	array		The menu item array, $this->I (in the parent object)
 * @param	array		TypoScript configuration for the function. Notice that the property "parentObj" is a reference to the parent (calling) object (the tslib_Xmenu class instantiated)
 * @return	array		The processed $I array returned (and stored in $this->I of the parent object again)
 * @see tslib_menu::userProcess(), tslib_tmenu::writeMenu(), tslib_gmenu::writeMenu()
 */
function user_IProcFuncTest($I, $conf)
{
    $itemRow = $conf['parentObj']->menuArr[$I['key']];
    // Setting the document status content to the value of the page title on mouse over
    $I['linkHREF']['onMouseover'] .= 'extraRollover(\'' . rawurlencode($itemRow['title']) . '\');';
    $conf['parentObj']->I = $I;
    $conf['parentObj']->setATagParts();
    $I = $conf['parentObj']->I;
    if ($I['parts']['ATag_begin']) {
        $I['parts']['ATag_begin'] = $I['A1'];
    }
    if ($conf['debug']) {
        // Outputting for debug example:
        echo 'ITEM: <h2>' . htmlspecialchars($itemRow['uid'] . ': ' . $itemRow['title']) . '</h2>';
        t3lib_div::debug($itemRow);
        t3lib_div::debug($I);
        echo '<hr />';
    }
    // Returns:
    return $I;
}
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:29,代码来源:example_itemArrayProcFunc.php


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