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


PHP DebugUtility::viewArray方法代码示例

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


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

示例1: viewArray

 /**
  * Returns HTML-code, which is a visual representation of a multidimensional array
  * use t3lib_div::print_array() in order to print an array
  * Returns false if $array_in is not an array
  *
  * @param	mixed		Array to view
  * @return	string		HTML output
  */
 public static function viewArray($array_in)
 {
     if (tx_rnbase_util_TYPO3::isTYPO62OrHigher()) {
         return \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($array_in);
     } else {
         return t3lib_utility_Debug::viewArray($array_in);
     }
 }
开发者ID:RocKordier,项目名称:rn_base,代码行数:16,代码来源:class.tx_rnbase_util_Debug.php

示例2: toString

 /**
  * Returns the internal debug messages as a string.
  *
  * @return string
  */
 public function toString()
 {
     $messagesAsString = '';
     if (!empty($this->debugMessages)) {
         $messagesAsString = \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($this->debugMessages);
     }
     return $messagesAsString;
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:13,代码来源:ExtDirectDebug.php

示例3: getParams

    public function getParams($PA, $fobj)
    {
        $params = unserialize($PA['itemFormElValue']);
        $output = '<input
			readonly="readonly" style="display:none"
			name="' . $PA['itemFormElName'] . '"
			value="' . htmlspecialchars($PA['itemFormElValue']) . '"
			onchange="' . htmlspecialchars(implode('', $PA['fieldChangeFunc'])) . '"
			' . $PA['onFocus'] . '/>
		';
        $output .= \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($params);
        return $output;
    }
开发者ID:reinhardfuehricht,项目名称:typo3-formhandler,代码行数:13,代码来源:TcaUtility.php

示例4: outputDebugLog

 /**
  * Prints the messages to the screen
  *
  * @return void
  */
 public function outputDebugLog()
 {
     $out = '';
     foreach ($this->debugLog as $section => $logData) {
         $out .= $this->globals->getCObj()->wrap($section, $this->utilityFuncs->getSingle($this->settings, 'sectionHeaderWrap'));
         $sectionContent = '';
         foreach ($logData as $messageData) {
             $message = str_replace("\n", '<br />', $messageData['message']);
             $message = $this->globals->getCObj()->wrap($message, $this->utilityFuncs->getSingle($this->settings['severityWrap.'], $messageData['severity']));
             $sectionContent .= $this->globals->getCObj()->wrap($message, $this->settings['messageWrap']);
             if ($messageData['data']) {
                 $sectionContent .= \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($messageData['data']);
                 $sectionContent .= '<br />';
             }
         }
         $out .= $this->globals->getCObj()->wrap($sectionContent, $this->utilityFuncs->getSingle($this->settings, 'sectionWrap'));
     }
     print $out;
 }
开发者ID:woehrlag,项目名称:new.woehrl.de,代码行数:24,代码来源:Tx_Formhandler_Debugger_Print.php

示例5: printErrorLog

 /**
  * Returns a table with the error-messages.
  *
  * @return string HTML print of error log
  * @todo Define visibility
  */
 public function printErrorLog()
 {
     return count($this->errorLog) ? \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($this->errorLog) : '';
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:10,代码来源:ImportExport.php

示例6: makeInstanceService

 /**
  * Find the best service and check if it works.
  * Returns object of the service class.
  *
  * @param string $serviceType Type of service (service key).
  * @param string $serviceSubType Sub type like file extensions or similar. Defined by the service.
  * @param mixed $excludeServiceKeys List of service keys which should be excluded in the search for a service. Array or comma list.
  * @return object The service object or an array with error info's.
  */
 public static function makeInstanceService($serviceType, $serviceSubType = '', $excludeServiceKeys = array())
 {
     $error = FALSE;
     if (!is_array($excludeServiceKeys)) {
         $excludeServiceKeys = self::trimExplode(',', $excludeServiceKeys, 1);
     }
     $requestInfo = array('requestedServiceType' => $serviceType, 'requestedServiceSubType' => $serviceSubType, 'requestedExcludeServiceKeys' => $excludeServiceKeys);
     while ($info = \TYPO3\CMS\Core\Extension\ExtensionManager::findService($serviceType, $serviceSubType, $excludeServiceKeys)) {
         // provide information about requested service to service object
         $info = array_merge($info, $requestInfo);
         // Check persistent object and if found, call directly and exit.
         if (is_object($GLOBALS['T3_VAR']['makeInstanceService'][$info['className']])) {
             // update request info in persistent object
             $GLOBALS['T3_VAR']['makeInstanceService'][$info['className']]->info = $info;
             // reset service and return object
             $GLOBALS['T3_VAR']['makeInstanceService'][$info['className']]->reset();
             return $GLOBALS['T3_VAR']['makeInstanceService'][$info['className']];
         } else {
             $requireFile = self::getFileAbsFileName($info['classFile']);
             if (@is_file($requireFile)) {
                 self::requireOnce($requireFile);
                 $obj = self::makeInstance($info['className']);
                 if (is_object($obj)) {
                     if (!@is_callable(array($obj, 'init'))) {
                         // use silent logging??? I don't think so.
                         die('Broken service:' . \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($info));
                     }
                     $obj->info = $info;
                     // service available?
                     if ($obj->init()) {
                         // create persistent object
                         $GLOBALS['T3_VAR']['makeInstanceService'][$info['className']] = $obj;
                         // needed to delete temp files
                         register_shutdown_function(array(&$obj, '__destruct'));
                         return $obj;
                     }
                     $error = $obj->getLastErrorArray();
                     unset($obj);
                 }
             }
         }
         // deactivate the service
         \TYPO3\CMS\Core\Extension\ExtensionManager::deactivateService($info['serviceType'], $info['serviceKey']);
     }
     return $error;
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:55,代码来源:GeneralUtility.php

示例7: saveMail

 /**
  * Save mail on submit
  *
  * @param \In2code\Powermail\Domain\Model\Mail $mail
  * @return void
  */
 protected function saveMail(Mail &$mail = NULL)
 {
     $marketingInfos = Div::getMarketingInfos();
     $mail->setPid(Div::getStoragePage($this->settings['main']['pid']));
     $mail->setSenderMail($this->div->getSenderMailFromArguments($mail));
     $mail->setSenderName($this->div->getSenderNameFromArguments($mail));
     $mail->setSubject($this->settings['receiver']['subject']);
     $mail->setReceiverMail($this->settings['receiver']['email']);
     $mail->setBody(\TYPO3\CMS\Core\Utility\DebugUtility::viewArray($this->div->getVariablesWithLabels($mail)));
     $mail->setSpamFactor($GLOBALS['TSFE']->fe_user->getKey('ses', 'powermail_spamfactor'));
     $mail->setTime(time() - Div::getFormStartFromSession($mail->getForm()->getUid()));
     $mail->setUserAgent(GeneralUtility::getIndpEnv('HTTP_USER_AGENT'));
     $mail->setMarketingRefererDomain($marketingInfos['refererDomain']);
     $mail->setMarketingReferer($marketingInfos['referer']);
     $mail->setMarketingCountry($marketingInfos['country']);
     $mail->setMarketingMobileDevice($marketingInfos['mobileDevice']);
     $mail->setMarketingFrontendLanguage($marketingInfos['frontendLanguage']);
     $mail->setMarketingBrowserLanguage($marketingInfos['browserLanguage']);
     $mail->setMarketingPageFunnel($marketingInfos['pageFunnel']);
     if (intval($GLOBALS['TSFE']->fe_user->user['uid']) > 0) {
         $mail->setFeuser($this->userRepository->findByUid(Div::getPropertyFromLoggedInFeUser('uid')));
     }
     if (empty($this->settings['global']['disableIpLog'])) {
         $mail->setSenderIp(GeneralUtility::getIndpEnv('REMOTE_ADDR'));
     }
     if ($this->settings['main']['optin'] || $this->settings['db']['hidden']) {
         $mail->setHidden(TRUE);
     }
     foreach ($mail->getAnswers() as $answer) {
         $answer->setPid(Div::getStoragePage($this->settings['main']['pid']));
     }
     $this->mailRepository->add($mail);
     $this->persistenceManager->persistAll();
 }
开发者ID:advOpk,项目名称:pwm,代码行数:40,代码来源:FormController.php

示例8: getQueryResultCode

 /**
  * Get query result code
  *
  * @param string $mQ
  * @param bool|\mysqli_result|object $res MySQLi result object / DBAL object
  * @param string $table
  * @return string
  */
 public function getQueryResultCode($mQ, $res, $table)
 {
     $out = '';
     $cPR = array();
     switch ($mQ) {
         case 'count':
             $row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);
             $cPR['header'] = 'Count';
             $cPR['content'] = '<BR><strong>' . $row[0] . '</strong> records selected.';
             break;
         case 'all':
             $rowArr = array();
             while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                 $rowArr[] = $this->resultRowDisplay($row, $GLOBALS['TCA'][$table], $table);
                 $lrow = $row;
             }
             if (is_array($this->hookArray['beforeResultTable'])) {
                 foreach ($this->hookArray['beforeResultTable'] as $_funcRef) {
                     $out .= GeneralUtility::callUserFunction($_funcRef, $GLOBALS['SOBE']->MOD_SETTINGS, $this);
                 }
             }
             if (!empty($rowArr)) {
                 $out .= '<table class="table table-striped table-hover">' . $this->resultRowTitles($lrow, $GLOBALS['TCA'][$table], $table) . implode(LF, $rowArr) . '</table>';
             }
             if (!$out) {
                 $out = '<div class="alert-info">No rows selected!</div>';
             }
             $cPR['header'] = 'Result';
             $cPR['content'] = $out;
             break;
         case 'csv':
             $rowArr = array();
             $first = 1;
             while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                 if ($first) {
                     $rowArr[] = $this->csvValues(array_keys($row), ',', '');
                     $first = 0;
                 }
                 $rowArr[] = $this->csvValues($row, ',', '"', $GLOBALS['TCA'][$table], $table);
             }
             if (!empty($rowArr)) {
                 $out .= '<textarea name="whatever" rows="20" wrap="off"' . $GLOBALS['SOBE']->getModuleTemplate()->formWidth($this->formW) . ' class="text-monospace">' . htmlspecialchars(implode(LF, $rowArr)) . '</textarea>';
                 if (!$this->noDownloadB) {
                     $out .= '<br><input class="btn btn-default" type="submit" name="download_file" value="Click to download file" onClick="window.location.href=\'' . $this->downloadScript . '\';">';
                 }
                 // Downloads file:
                 if (GeneralUtility::_GP('download_file')) {
                     $filename = 'TYPO3_' . $table . '_export_' . date('dmy-Hi') . '.csv';
                     $mimeType = 'application/octet-stream';
                     header('Content-Type: ' . $mimeType);
                     header('Content-Disposition: attachment; filename=' . $filename);
                     echo implode(CRLF, $rowArr);
                     die;
                 }
             }
             if (!$out) {
                 $out = '<em>No rows selected!</em>';
             }
             $cPR['header'] = 'Result';
             $cPR['content'] = $out;
             break;
         case 'explain':
         default:
             while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                 $out .= '<br />' . \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($row);
             }
             $cPR['header'] = 'Explain SQL query';
             $cPR['content'] = $out;
     }
     return $cPR;
 }
开发者ID:vip3out,项目名称:TYPO3.CMS,代码行数:79,代码来源:QueryView.php

示例9: getData


//.........这里部分代码省略.........
                     $retVal = $fieldArray[$key];
                     break;
                 case 'file':
                     $retVal = $this->getFileDataKey($key);
                     break;
                 case 'parameters':
                     $retVal = $this->parameters[$key];
                     break;
                 case 'register':
                     $retVal = $GLOBALS['TSFE']->register[$key];
                     break;
                 case 'global':
                     $retVal = $this->getGlobal($key);
                     break;
                 case 'leveltitle':
                     $nkey = $this->getKey($key, $GLOBALS['TSFE']->tmpl->rootLine);
                     $retVal = $this->rootLineValue($nkey, 'title', stristr($key, 'slide'));
                     break;
                 case 'levelmedia':
                     $nkey = $this->getKey($key, $GLOBALS['TSFE']->tmpl->rootLine);
                     $retVal = $this->rootLineValue($nkey, 'media', stristr($key, 'slide'));
                     break;
                 case 'leveluid':
                     $nkey = $this->getKey($key, $GLOBALS['TSFE']->tmpl->rootLine);
                     $retVal = $this->rootLineValue($nkey, 'uid', stristr($key, 'slide'));
                     break;
                 case 'levelfield':
                     $keyP = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $key);
                     $nkey = $this->getKey($keyP[0], $GLOBALS['TSFE']->tmpl->rootLine);
                     $retVal = $this->rootLineValue($nkey, $keyP[1], strtolower($keyP[2]) == 'slide');
                     break;
                 case 'fullrootline':
                     $keyP = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $key);
                     $fullKey = intval($keyP[0]) - count($GLOBALS['TSFE']->tmpl->rootLine) + count($GLOBALS['TSFE']->rootLine);
                     if ($fullKey >= 0) {
                         $retVal = $this->rootLineValue($fullKey, $keyP[1], stristr($keyP[2], 'slide'), $GLOBALS['TSFE']->rootLine);
                     }
                     break;
                 case 'date':
                     if (!$key) {
                         $key = 'd/m Y';
                     }
                     $retVal = date($key, $GLOBALS['EXEC_TIME']);
                     break;
                 case 'page':
                     $retVal = $GLOBALS['TSFE']->page[$key];
                     break;
                 case 'current':
                     $retVal = $this->data[$this->currentValKey];
                     break;
                 case 'level':
                     $retVal = count($GLOBALS['TSFE']->tmpl->rootLine) - 1;
                     break;
                 case 'db':
                     $selectParts = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(':', $key);
                     $db_rec = $GLOBALS['TSFE']->sys_page->getRawRecord($selectParts[0], $selectParts[1]);
                     if (is_array($db_rec) && $selectParts[2]) {
                         $retVal = $db_rec[$selectParts[2]];
                     }
                     break;
                 case 'lll':
                     $retVal = $GLOBALS['TSFE']->sL('LLL:' . $key);
                     break;
                 case 'path':
                     $retVal = $GLOBALS['TSFE']->tmpl->getFileName($key);
                     break;
                 case 'cobj':
                     switch ((string) $key) {
                         case 'parentRecordNumber':
                             $retVal = $this->parentRecordNumber;
                             break;
                     }
                     break;
                 case 'debug':
                     switch ((string) $key) {
                         case 'rootLine':
                             $retVal = \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($GLOBALS['TSFE']->tmpl->rootLine);
                             break;
                         case 'fullRootLine':
                             $retVal = \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($GLOBALS['TSFE']->rootLine);
                             break;
                         case 'data':
                             $retVal = \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($this->data);
                             break;
                     }
                     break;
             }
         }
         if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_content.php']['getData'])) {
             foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_content.php']['getData'] as $classData) {
                 $hookObject = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classData);
                 if (!$hookObject instanceof \TYPO3\CMS\Frontend\ContentObject\ContentObjectGetDataHookInterface) {
                     throw new \UnexpectedValueException('$hookObject must implement interface TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectGetDataHookInterface', 1195044480);
                 }
                 $retVal = $hookObject->getDataExtension($string, $fieldArray, $secVal, $retVal, $this);
             }
         }
     }
     return $retVal;
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:101,代码来源:ContentObjectRenderer.php

示例10: makeInstanceService

 /**
  * Find the best service and check if it works.
  * Returns object of the service class.
  *
  * @param string $serviceType Type of service (service key).
  * @param string $serviceSubType Sub type like file extensions or similar. Defined by the service.
  * @param mixed $excludeServiceKeys List of service keys which should be excluded in the search for a service. Array or comma list.
  * @return object The service object or an array with error info's.
  */
 public static function makeInstanceService($serviceType, $serviceSubType = '', $excludeServiceKeys = array())
 {
     $error = FALSE;
     if (!is_array($excludeServiceKeys)) {
         $excludeServiceKeys = self::trimExplode(',', $excludeServiceKeys, TRUE);
     }
     $requestInfo = array('requestedServiceType' => $serviceType, 'requestedServiceSubType' => $serviceSubType, 'requestedExcludeServiceKeys' => $excludeServiceKeys);
     while ($info = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::findService($serviceType, $serviceSubType, $excludeServiceKeys)) {
         // provide information about requested service to service object
         $info = array_merge($info, $requestInfo);
         // Check persistent object and if found, call directly and exit.
         if (is_object($GLOBALS['T3_VAR']['makeInstanceService'][$info['className']])) {
             // update request info in persistent object
             $GLOBALS['T3_VAR']['makeInstanceService'][$info['className']]->info = $info;
             // reset service and return object
             $GLOBALS['T3_VAR']['makeInstanceService'][$info['className']]->reset();
             return $GLOBALS['T3_VAR']['makeInstanceService'][$info['className']];
         } else {
             if (isset($info['classFile'])) {
                 // @deprecated since 6.1, will be removed in TYPO3 CMS 6.3
                 // Option is deprecated, since we now have the autoloader function
                 self::deprecationLog('The option "classFile" of "' . $info['className'] . '" in T3_SERVICES has been deprecated, as this should now be done by the respective ' . 'ext_autoload.php of each extension. This option will be removed in TYPO3 CMS v6.3.');
                 $requireFile = self::getFileAbsFileName($info['classFile']);
                 if (@is_file($requireFile)) {
                     self::requireOnce($requireFile);
                 }
             }
             $obj = self::makeInstance($info['className']);
             if (is_object($obj)) {
                 if (!@is_callable(array($obj, 'init'))) {
                     // use silent logging??? I don't think so.
                     die('Broken service:' . \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($info));
                 }
                 $obj->info = $info;
                 // service available?
                 if ($obj->init()) {
                     // create persistent object
                     $GLOBALS['T3_VAR']['makeInstanceService'][$info['className']] = $obj;
                     return $obj;
                 }
                 $error = $obj->getLastErrorArray();
                 unset($obj);
             }
         }
         // deactivate the service
         \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::deactivateService($info['serviceType'], $info['serviceKey']);
     }
     return $error;
 }
开发者ID:KarlDennisMatthaei1923,项目名称:PierraaDesign,代码行数:58,代码来源:GeneralUtility.php

示例11: printLogMgm

    /**
     * Printing the debug-log from the DBAL extension
     *
     * To enabled debugging, you will have to enabled it in the configuration!
     *
     * @return 	string HTML content
     */
    protected function printLogMgm()
    {
        // Disable debugging in any case...
        $GLOBALS['TYPO3_DB']->debug = false;
        // Get cmd:
        $cmd = (string) GeneralUtility::_GP('cmd');
        switch ($cmd) {
            case 'flush':
                $res = $GLOBALS['TYPO3_DB']->exec_TRUNCATEquery('tx_dbal_debuglog');
                $res = $GLOBALS['TYPO3_DB']->exec_TRUNCATEquery('tx_dbal_debuglog_where');
                $outStr = 'Log FLUSHED!';
                break;
            case 'joins':
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('table_join,exec_time,query,script', 'tx_dbal_debuglog', 'table_join!=\'\'', 'table_join,script,exec_time,query');
                // Init vars in which to pick up the query result:
                $tableIndex = array();
                $tRows = array();
                $tRows[] = '
						<tr>
							<td>Execution time</td>
							<td>Table joins</td>
							<td>Script</td>
							<td>Query</td>
						</tr>';
                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                    $tableArray = $GLOBALS['TYPO3_DB']->SQLparser->parseFromTables($row['table_join']);
                    // Create table name index:
                    foreach ($tableArray as $a) {
                        foreach ($tableArray as $b) {
                            if ($b['table'] != $a['table']) {
                                $tableIndex[$a['table']][$b['table']] = 1;
                            }
                        }
                    }
                    // Create output row
                    $tRows[] = '
							<tr>
								<td>' . htmlspecialchars($row['exec_time']) . '</td>
								<td>' . htmlspecialchars($row['table_join']) . '</td>
								<td>' . htmlspecialchars($row['script']) . '</td>
								<td>' . htmlspecialchars($row['query']) . '</td>
							</tr>';
                }
                // Printing direct joins:
                $outStr .= '<h4>Direct joins:</h4>' . \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($tableIndex);
                // Printing total dependencies:
                foreach ($tableIndex as $priTable => $a) {
                    foreach ($tableIndex as $tableN => $v) {
                        foreach ($v as $tableP => $vv) {
                            if ($tableP == $priTable) {
                                $tableIndex[$priTable] = array_merge($v, $a);
                            }
                        }
                    }
                }
                $outStr .= '<h4>Total dependencies:</h4>' . \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($tableIndex);
                // Printing data rows:
                $outStr .= '
						<table border="1" cellspacing="0">' . implode('', $tRows) . '
						</table>';
                break;
            case 'errors':
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('serdata,exec_time,query,script', 'tx_dbal_debuglog', 'errorFlag>0', '', 'tstamp DESC');
                // Init vars in which to pick up the query result:
                $tRows = array();
                $tRows[] = '
						<tr>
							<td>Execution time</td>
							<td>Error data</td>
							<td>Script</td>
							<td>Query</td>
						</tr>';
                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                    // Create output row
                    $tRows[] = '
							<tr>
								<td>' . htmlspecialchars($row['exec_time']) . '</td>
								<td>' . \TYPO3\CMS\Core\Utility\DebugUtility::viewArray(unserialize($row['serdata'])) . '</td>
								<td>' . htmlspecialchars($row['script']) . '</td>
								<td>' . htmlspecialchars($row['query']) . '</td>
							</tr>';
                }
                // Printing data rows:
                $outStr .= '
						<table border="1" cellspacing="0">' . implode('', $tRows) . '
						</table>';
                break;
            case 'parsing':
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('query,serdata', 'tx_dbal_debuglog', 'errorFlag&2=2');
                $tRows = array();
                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                    // Create output row
                    $tRows[] = '
//.........这里部分代码省略.........
开发者ID:hlop,项目名称:TYPO3.CMS,代码行数:101,代码来源:ModuleController.php

示例12: getData


//.........这里部分代码省略.........
                     }
                     break;
                 case 'date':
                     if (!$key) {
                         $key = 'd/m Y';
                     }
                     $retVal = date($key, $GLOBALS['EXEC_TIME']);
                     break;
                 case 'page':
                     $retVal = $tsfe->page[$key];
                     break;
                 case 'pagelayout':
                     // Check if the current page has a value in the DB field "backend_layout"
                     // if empty, check the root line for "backend_layout_next_level"
                     // same as
                     //   field = backend_layout
                     //   ifEmpty.data = levelfield:-2, backend_layout_next_level, slide
                     //   ifEmpty.ifEmpty = default
                     $retVal = $GLOBALS['TSFE']->page['backend_layout'];
                     // If it is set to "none" - don't use any
                     if ($retVal === '-1') {
                         $retVal = 'none';
                     } elseif ($retVal === '' || $retVal === '0') {
                         // If it not set check the root-line for a layout on next level and use this
                         // Remove first element, which is the current page
                         // See also \TYPO3\CMS\Backend\View\BackendLayoutView::getSelectedCombinedIdentifier()
                         $rootLine = $tsfe->rootLine;
                         array_shift($rootLine);
                         foreach ($rootLine as $rootLinePage) {
                             $retVal = (string) $rootLinePage['backend_layout_next_level'];
                             // If layout for "next level" is set to "none" - don't use any and stop searching
                             if ($retVal === '-1') {
                                 $retVal = 'none';
                                 break;
                             } elseif ($retVal !== '' && $retVal !== '0') {
                                 // Stop searching if a layout for "next level" is set
                                 break;
                             }
                         }
                     }
                     if ($retVal === '0' || $retVal === '') {
                         $retVal = 'default';
                     }
                     break;
                 case 'current':
                     $retVal = $this->data[$this->currentValKey];
                     break;
                 case 'db':
                     $selectParts = GeneralUtility::trimExplode(':', $key);
                     $db_rec = $tsfe->sys_page->getRawRecord($selectParts[0], $selectParts[1]);
                     if (is_array($db_rec) && $selectParts[2]) {
                         $retVal = $db_rec[$selectParts[2]];
                     }
                     break;
                 case 'lll':
                     $retVal = $tsfe->sL('LLL:' . $key);
                     break;
                 case 'path':
                     $retVal = $tsfe->tmpl->getFileName($key);
                     break;
                 case 'cobj':
                     switch ($key) {
                         case 'parentRecordNumber':
                             $retVal = $this->parentRecordNumber;
                             break;
                     }
                     break;
                 case 'debug':
                     switch ($key) {
                         case 'rootLine':
                             $retVal = DebugUtility::viewArray($tsfe->tmpl->rootLine);
                             break;
                         case 'fullRootLine':
                             $retVal = DebugUtility::viewArray($tsfe->rootLine);
                             break;
                         case 'data':
                             $retVal = DebugUtility::viewArray($this->data);
                             break;
                         case 'register':
                             $retVal = DebugUtility::viewArray($tsfe->register);
                             break;
                         case 'page':
                             $retVal = DebugUtility::viewArray($tsfe->page);
                             break;
                     }
                     break;
             }
         }
         if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['getData'])) {
             foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['getData'] as $classData) {
                 $hookObject = GeneralUtility::getUserObj($classData);
                 if (!$hookObject instanceof ContentObjectGetDataHookInterface) {
                     throw new \UnexpectedValueException('$hookObject must implement interface ' . ContentObjectGetDataHookInterface::class, 1195044480);
                 }
                 $retVal = $hookObject->getDataExtension($string, $fieldArray, $secVal, $retVal, $this);
             }
         }
     }
     return $retVal;
 }
开发者ID:vip3out,项目名称:TYPO3.CMS,代码行数:101,代码来源:ContentObjectRenderer.php

示例13: saveMail

 /**
  * Save mail on submit
  *
  * @param Mail $mail
  * @return void
  */
 protected function saveMail(Mail &$mail = null)
 {
     $marketingInfos = SessionUtility::getMarketingInfos();
     $mail->setPid(FrontendUtility::getStoragePage($this->settings['main']['pid']))->setSenderMail($this->mailRepository->getSenderMailFromArguments($mail))->setSenderName($this->mailRepository->getSenderNameFromArguments($mail))->setSubject($this->settings['receiver']['subject'])->setReceiverMail($this->settings['receiver']['email'])->setBody(DebugUtility::viewArray($this->mailRepository->getVariablesWithMarkersFromMail($mail)))->setSpamFactor(SessionUtility::getSpamFactorFromSession())->setTime(time() - SessionUtility::getFormStartFromSession($mail->getForm()->getUid(), $this->settings))->setUserAgent(GeneralUtility::getIndpEnv('HTTP_USER_AGENT'))->setMarketingRefererDomain($marketingInfos['refererDomain'])->setMarketingReferer($marketingInfos['referer'])->setMarketingCountry($marketingInfos['country'])->setMarketingMobileDevice($marketingInfos['mobileDevice'])->setMarketingFrontendLanguage($marketingInfos['frontendLanguage'])->setMarketingBrowserLanguage($marketingInfos['browserLanguage'])->setMarketingPageFunnel($marketingInfos['pageFunnel']);
     if (FrontendUtility::isLoggedInFrontendUser()) {
         $mail->setFeuser($this->userRepository->findByUid(FrontendUtility::getPropertyFromLoggedInFrontendUser('uid')));
     }
     if (!ConfigurationUtility::isDisableIpLogActive()) {
         $mail->setSenderIp(GeneralUtility::getIndpEnv('REMOTE_ADDR'));
     }
     if ($this->settings['main']['optin'] || $this->settings['db']['hidden']) {
         $mail->setHidden(true);
     }
     foreach ($mail->getAnswers() as $answer) {
         $answer->setPid(FrontendUtility::getStoragePage($this->settings['main']['pid']));
     }
     $this->mailRepository->add($mail);
     $this->persistenceManager->persistAll();
 }
开发者ID:abeyl,项目名称:powermail,代码行数:25,代码来源:FormController.php

示例14: drawURLs_addRowsForPage

    /**
     * Create the rows for display of the page tree
     * For each page a number of rows are shown displaying GET variable configuration
     *
     * @param	array		Page row
     * @param	string		Page icon and title for row
     * @return	string		HTML <tr> content (one or more)
     */
    public function drawURLs_addRowsForPage(array $pageRow, $pageTitleAndIcon)
    {
        $skipMessage = '';
        // Get list of configurations
        $configurations = $this->getUrlsForPageRow($pageRow, $skipMessage);
        if (count($this->incomingConfigurationSelection) > 0) {
            // 	remove configuration that does not match the current selection
            foreach ($configurations as $confKey => $confArray) {
                if (!in_array($confKey, $this->incomingConfigurationSelection)) {
                    unset($configurations[$confKey]);
                }
            }
        }
        // Traverse parameter combinations:
        $c = 0;
        $cc = 0;
        $content = '';
        if (count($configurations)) {
            foreach ($configurations as $confKey => $confArray) {
                // Title column:
                if (!$c) {
                    $titleClm = '<td rowspan="' . count($configurations) . '">' . $pageTitleAndIcon . '</td>';
                } else {
                    $titleClm = '';
                }
                if (!in_array($pageRow['uid'], $this->expandExcludeString($confArray['subCfg']['exclude']))) {
                    // URL list:
                    $urlList = $this->urlListFromUrlArray($confArray, $pageRow, $this->scheduledTime, $this->reqMinute, $this->submitCrawlUrls, $this->downloadCrawlUrls, $this->duplicateTrack, $this->downloadUrls, $this->incomingProcInstructions);
                    // Expanded parameters:
                    $paramExpanded = '';
                    $calcAccu = array();
                    $calcRes = 1;
                    foreach ($confArray['paramExpanded'] as $gVar => $gVal) {
                        $paramExpanded .= '
							<tr>
								<td class="bgColor4-20">' . htmlspecialchars('&' . $gVar . '=') . '<br/>' . '(' . count($gVal) . ')' . '</td>
								<td class="bgColor4" nowrap="nowrap">' . nl2br(htmlspecialchars(implode(chr(10), $gVal))) . '</td>
							</tr>
						';
                        $calcRes *= count($gVal);
                        $calcAccu[] = count($gVal);
                    }
                    $paramExpanded = '<table class="lrPadding c-list param-expanded">' . $paramExpanded . '</table>';
                    $paramExpanded .= 'Comb: ' . implode('*', $calcAccu) . '=' . $calcRes;
                    // Options
                    $optionValues = '';
                    if ($confArray['subCfg']['userGroups']) {
                        $optionValues .= 'User Groups: ' . $confArray['subCfg']['userGroups'] . '<br/>';
                    }
                    if ($confArray['subCfg']['baseUrl']) {
                        $optionValues .= 'Base Url: ' . $confArray['subCfg']['baseUrl'] . '<br/>';
                    }
                    if ($confArray['subCfg']['procInstrFilter']) {
                        $optionValues .= 'ProcInstr: ' . $confArray['subCfg']['procInstrFilter'] . '<br/>';
                    }
                    // Compile row:
                    $content .= '
						<tr class="bgColor' . ($c % 2 ? '-20' : '-10') . '">
							' . $titleClm . '
							<td>' . htmlspecialchars($confKey) . '</td>
							<td>' . nl2br(htmlspecialchars(rawurldecode(trim(str_replace('&', chr(10) . '&', \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl('', $confArray['paramParsed'])))))) . '</td>
							<td>' . $paramExpanded . '</td>
							<td nowrap="nowrap">' . $urlList . '</td>
							<td nowrap="nowrap">' . $optionValues . '</td>
							<td nowrap="nowrap">' . \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($confArray['subCfg']['procInstrParams.']) . '</td>
						</tr>';
                } else {
                    $content .= '<tr class="bgColor' . ($c % 2 ? '-20' : '-10') . '">
							' . $titleClm . '
							<td>' . htmlspecialchars($confKey) . '</td>
							<td colspan="5"><em>No entries</em> (Page is excluded in this configuration)</td>
						</tr>';
                }
                $c++;
            }
        } else {
            $message = !empty($skipMessage) ? ' (' . $skipMessage . ')' : '';
            // Compile row:
            $content .= '
				<tr class="bgColor-20" style="border-bottom: 1px solid black;">
					<td>' . $pageTitleAndIcon . '</td>
					<td colspan="6"><em>No entries</em>' . $message . '</td>
				</tr>';
        }
        return $content;
    }
开发者ID:nawork,项目名称:crawler,代码行数:94,代码来源:class.tx_crawler_lib.php

示例15: reindexPhash

    /**
     * Re-indexing files/records attached to a page.
     *
     * @param 	integer		Phash value
     * @param 	integer		The page uid for the section record (file/url could appear more than one place you know...)
     * @return 	string		HTML content
     * @todo Define visibility
     */
    public function reindexPhash($phash, $pageId)
    {
        // Query:
        $resultRow = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('ISEC.*, IP.*', 'index_phash IP, index_section ISEC', 'IP.phash = ISEC.phash
						AND IP.phash = ' . (int) $phash . '
						AND ISEC.page_id = ' . (int) $pageId);
        $content = '';
        if (is_array($resultRow)) {
            if ($resultRow['item_type'] && $resultRow['item_type'] !== '0') {
                // (Re)-Indexing file on page.
                $indexerObj = GeneralUtility::makeInstance('TYPO3\\CMS\\IndexedSearch\\Indexer');
                $indexerObj->backend_initIndexer($pageId, 0, 0, '', $this->getUidRootLineForClosestTemplate($pageId));
                // URL or local file:
                if ($resultRow['externalUrl']) {
                    $indexerObj->indexExternalUrl($resultRow['data_filename']);
                } else {
                    $indexerObj->indexRegularDocument($resultRow['data_filename'], TRUE);
                }
                if ($indexerObj->file_phash_arr['phash'] != $resultRow['phash']) {
                    $content .= 'ERROR: phash (' . $indexerObj->file_phash_arr['phash'] . ') did NOT match ' . $resultRow['phash'] . ' for strange reasons!';
                }
                $content .= '<h4>Log for re-indexing of "' . htmlspecialchars($resultRow['data_filename']) . '":</h4>';
                $content .= \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($indexerObj->internal_log);
                $content .= '<h4>Hash-array, page:</h4>';
                $content .= \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($indexerObj->hash);
                $content .= '<h4>Hash-array, file:</h4>';
                $content .= \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($indexerObj->file_phash_arr);
            }
        }
        // Link back to list.
        $content .= $this->linkList();
        return $content;
    }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:41,代码来源:IndexedPagesController.php


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