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


PHP t3lib_div::array_merge_recursive_overrule方法代码示例

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


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

示例1: loadConfig4BE

 /**
  * Lädt ein COnfigurations Objekt nach mit der TS aus der Extension
  * Dabei wird alles geholt was in "plugin.tx_$extKey", "lib.$extKey." und
  * "lib.links." liegt
  *
  * @param string $extKey Extension, deren TS Config geladen werden soll
  * @param string $extKeyTS Extension, deren Konfig innerhalb der
  *     TS Config geladen werden soll.
  *     Es kann also zb. das TS von mklib geladen werden aber darin die konfig für
  *     das plugin von mkxyz
  * @param string $sStaticPath pfad zum TS
  * @param array $aConfig zusätzliche Konfig, die die default  überschreibt
  * @param boolean $resolveReferences sollen referenzen die in lib.
  *     und plugin.tx_$extKeyTS stehen aufgelöst werden?
  * @param boolean $forceTsfePreparation
  * @return tx_rnbase_configurations
  */
 public static function loadConfig4BE($extKey, $extKeyTs = null, $sStaticPath = '', $aConfig = array(), $resolveReferences = false, $forceTsfePreparation = false)
 {
     $extKeyTs = is_null($extKeyTs) ? $extKey : $extKeyTs;
     if (!$sStaticPath) {
         $sStaticPath = '/static/ts/setup.txt';
     }
     if (file_exists(t3lib_div::getFileAbsFileName('EXT:' . $extKey . $sStaticPath))) {
         t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $extKey . $sStaticPath . '">');
     }
     tx_rnbase::load('tx_rnbase_configurations');
     tx_rnbase::load('tx_rnbase_util_Misc');
     $tsfePreparationOptions = array();
     if ($forceTsfePreparation) {
         $tsfePreparationOptions['force'] = true;
     }
     // Ist bei Aufruf aus BE notwendig! (@TODO: sicher???)
     tx_rnbase_util_Misc::prepareTSFE($tsfePreparationOptions);
     $GLOBALS['TSFE']->config = array();
     $cObj = t3lib_div::makeInstance('tslib_cObj');
     $pageTsConfig = self::getPagesTSconfig(0);
     $tempConfig = $pageTsConfig['plugin.']['tx_' . $extKeyTs . '.'];
     $tempConfig['lib.'][$extKeyTs . '.'] = $pageTsConfig['lib.'][$extKeyTs . '.'];
     $tempConfig['lib.']['links.'] = $pageTsConfig['lib.']['links.'];
     if ($resolveReferences) {
         $GLOBALS['TSFE']->tmpl->setup['lib.'][$extKeyTs . '.'] = $tempConfig['lib.'][$extKeyTs . '.'];
         $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_' . $extKeyTs . '.'] = $pageTsConfig['plugin.']['tx_' . $extKeyTs . '.'];
     }
     $pageTsConfig = $tempConfig;
     $qualifier = $pageTsConfig['qualifier'] ? $pageTsConfig['qualifier'] : $extKeyTs;
     // möglichkeit die default konfig zu überschreiben
     $pageTsConfig = t3lib_div::array_merge_recursive_overrule($pageTsConfig, $aConfig);
     $configurations = new tx_rnbase_configurations();
     $configurations->init($pageTsConfig, $cObj, $extKeyTs, $qualifier);
     return $configurations;
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:52,代码来源:class.tx_mklib_util_TS.php

示例2: merge

 /**
  * Merges the values of $setup with plugin.[xxx].settings
  *
  * @param array $setup
  * @return void
  */
 public function merge($setup)
 {
     if (isset($setup) && is_array($setup)) {
         $settings = $this->setup['settings.'];
         $settings = t3lib_div::array_merge_recursive_overrule($settings, $setup);
         $this->setup['settings.'] = $settings;
     }
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:14,代码来源:Tx_Formhandler_Configuration.php

示例3: __construct

 /**
  * Creates an isntance of this class.
  *
  * @return void
  */
 public function __construct()
 {
     $urlParameters = t3lib_div::array_merge_recursive_overrule($_GET, $_POST);
     $this->currentPage = max(1, intval($urlParameters['page']));
     unset($urlParameters['page']);
     unset($urlParameters['cmd']);
     $this->baseURL = t3lib_div::getIndpEnv('TYPO3_REQUEST_SCRIPT') . '?' . t3lib_div::implodeArrayForUrl('', $urlParameters);
     $this->resultsPerPage = self::RESULTS_PER_PAGE_DEFAULT;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:14,代码来源:class.tx_realurl_pagebrowser.php

示例4: array_merge_recursive_overrule

 /**
  * Implements array_merge_recursive_overrule() in a cross-version way.
  *
  * This code is a copy from realurl, written by Dmitry Dulepov <dmitry.dulepov@gmail.com>.
  *
  * @param array $array1
  * @param array $array2
  * @return array
  */
 public static function array_merge_recursive_overrule($array1, $array2)
 {
     if (class_exists('\\TYPO3\\CMS\\Core\\Utility\\ArrayUtility')) {
         /** @noinspection PhpUndefinedClassInspection PhpUndefinedNamespaceInspection */
         \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($array1, $array2);
     } else {
         /** @noinspection PhpDeprecationInspection */
         $array1 = t3lib_div::array_merge_recursive_overrule($array1, $array2);
     }
     return $array1;
 }
开发者ID:CalanthaC,项目名称:goobi-presentation,代码行数:20,代码来源:class.tx_dlf_helper.php

示例5: initializeAction

 /**
  * Initialize the action and get correct configuration
  *
  * @return void
  */
 public function initializeAction()
 {
     $this->objects = $this->widgetConfiguration['objects'];
     $this->configuration = t3lib_div::array_merge_recursive_overrule($this->configuration, (array) $this->widgetConfiguration['configuration'], TRUE);
     $this->numberOfPages = (int) ceil(count($this->objects) / (int) $this->configuration['itemsPerPage']);
     $this->pagesBefore = (int) $this->configuration['pagesBefore'];
     $this->pagesAfter = (int) $this->configuration['pagesAfter'];
     $this->lessPages = (bool) $this->configuration['lessPages'];
     $this->forcedNumberOfLinks = (int) $this->configuration['forcedNumberOfLinks'];
     $this->templatePath = t3lib_div::getFileAbsFileName($this->configuration['templatePath']);
 }
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:16,代码来源:PaginateController.php

示例6: getPluginConfiguration

 /**
  * Returns the TypoScript configuration found in module.tx_yourextension_yourmodule
  * merged with the global configuration of your extension from module.tx_yourextension
  *
  * @param string $extensionName
  * @param string $pluginName in BE mode this is actually the module signature. But we're using it just like the plugin name in FE
  * @return array
  */
 protected function getPluginConfiguration($extensionName, $pluginName)
 {
     $setup = $this->getTypoScriptSetup();
     $pluginConfiguration = array();
     if (is_array($setup['module.']['tx_' . strtolower($extensionName) . '.'])) {
         $pluginConfiguration = Tx_Extbase_Utility_TypoScript::convertTypoScriptArrayToPlainArray($setup['module.']['tx_' . strtolower($extensionName) . '.']);
     }
     $pluginSignature = strtolower($extensionName . '_' . $pluginName);
     if (is_array($setup['module.']['tx_' . $pluginSignature . '.'])) {
         $pluginConfiguration = t3lib_div::array_merge_recursive_overrule($pluginConfiguration, Tx_Extbase_Utility_TypoScript::convertTypoScriptArrayToPlainArray($setup['module.']['tx_' . $pluginSignature . '.']));
     }
     return $pluginConfiguration;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:21,代码来源:BackendConfigurationManager.php

示例7: render

 /**
 * Download a file
 *
 * @param string $file Path to the file
 * @param array $configuration configuration used to render the filelink cObject
 * @param boolean $hideError define if an error should be displayed if file not found
 * 	 * @param string $class optional class
 * 	 * @param string $target target
 * 	 * @param string $alt alt text
 * 	 * @param string $title title text
 * @return string
 * @throws Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException
 */
 public function render($file, $configuration = array(), $hideError = FALSE, $class = '', $target = '', $alt = '', $title = '')
 {
     if (!is_file($file)) {
         $errorMessage = sprintf('Given file "%s" for %s is not valid', htmlspecialchars($file), get_class());
         t3lib_div::devLog($errorMessage, 'news', t3lib_div::SYSLOG_SEVERITY_WARNING);
         if (!$hideError) {
             throw new Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException('Given file is not a valid file: ' . htmlspecialchars($file));
         }
     }
     $cObj = t3lib_div::makeInstance('tslib_cObj');
     $fileInformation = pathinfo($file);
     $fileInformation['file'] = $file;
     $fileInformation['size'] = filesize($file);
     $cObj->data = $fileInformation;
     // set a basic configuration for cObj->filelink
     $tsConfiguration = array('path' => $fileInformation['dirname'] . '/', 'ATagParams' => 'class="download-link basic-class ' . strtolower($fileInformation['extension']) . '"', 'labelStdWrap.' => array('cObject.' => array('value' => $this->renderChildren())));
     // Fallback if no configuration given
     if (!is_array($configuration)) {
         $configuration = array('labelStdWrap.' => array('cObject' => 'TEXT'));
     } else {
         if (class_exists('Tx_Extbase_Utility_TypoScript')) {
             $configuration = Tx_Extbase_Utility_TypoScript::convertPlainArrayToTypoScriptArray($configuration);
         } else {
             /** @var $typoscriptService Tx_Extbase_Service_TypoScriptService */
             $typoscriptService = t3lib_div::makeInstance('Tx_Extbase_Service_TypoScriptService');
             $configuration = $typoscriptService->convertPlainArrayToTypoScriptArray($configuration);
         }
     }
     // merge default configuration with optional configuration
     $tsConfiguration = t3lib_div::array_merge_recursive_overrule($tsConfiguration, $configuration);
     if (!empty($class)) {
         $tsConfiguration['ATagParams'] .= ' class="' . $class . '"';
     }
     if (!empty($target)) {
         $tsConfiguration['target'] = $target;
     }
     if (!empty($alt)) {
         $tsConfiguration['altText'] = $alt;
     }
     if (!empty($title)) {
         $tsConfiguration['titleText'] = $title;
     }
     // generate link
     $link = $cObj->filelink($fileInformation['basename'], $tsConfiguration);
     return $link;
 }
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:59,代码来源:FileDownloadViewHelper.php

示例8: initializationIsCorrect

 /**
  * @test
  */
 public function initializationIsCorrect()
 {
     $controller = $this->getAccessibleMock('Tx_News_ViewHelpers_Widget_Controller_PaginateController', array('dummy'));
     $objects = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14);
     $configuration = array('pagesBefore' => '10', 'pagesAfter' => '3x', 'forcedNumberOfLinks' => '9fo', 'lessPages' => 0, 'templatePath' => 'fo/bar', 'itemsPerPage' => '3');
     $widgetConfiguration = array('fo' => 'bar');
     $controller->_set('configuration', $configuration);
     $controller->_set('widgetConfiguration', array('configuration' => $widgetConfiguration, 'objects' => $objects));
     $controller->initializeAction();
     $this->assertEquals($controller->_get('objects'), $objects);
     $this->assertEquals($controller->_get('configuration'), t3lib_div::array_merge_recursive_overrule($configuration, $widgetConfiguration, TRUE));
     $this->assertEquals($controller->_get('numberOfPages'), 5);
     $this->assertEquals($controller->_get('pagesBefore'), 10);
     $this->assertEquals($controller->_get('pagesAfter'), 3);
     $this->assertEquals($controller->_get('lessPages'), FALSE);
     $this->assertEquals($controller->_get('forcedNumberOfLinks'), 9);
     $this->assertEquals($controller->_get('templatePath'), PATH_site . 'fo/bar');
 }
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:21,代码来源:PaginateControllerTest.php

示例9: extraGlobalMarkerProcessor

 function extraGlobalMarkerProcessor(&$pObj, $markerArray)
 {
     // configuration of chgallery
     $confDefault = $pObj->conf['globalmarkers.'];
     if (!is_array($confDefault)) {
         return $markerArray;
     }
     // merge with special configuration (based on chosen CODE [SINGLE, LIST, LATEST]) if this is available
     if (is_array($confDefault[$pObj->config['code'] . '.'])) {
         $conf = t3lib_div::array_merge_recursive_overrule($confDefault, $confDefault[$pObj->config['code'] . '.']);
     } else {
         $conf = $confDefault;
     }
     if (is_array($conf)) {
         foreach ($conf as $key => $value) {
             $key2 = trim($key, '.');
             $markerArray['###GLOBAL_' . strtoupper($key2) . '###'] = $pObj->cObj->cObjGetSingle($conf[$key2], $conf[$key]);
         }
     }
     return $markerArray;
 }
开发者ID:mmirsch,项目名称:he_tools1,代码行数:21,代码来源:class.tx_he_tools_news_hooks.php

示例10: majixShowBox

 function majixShowBox($aConfig = array(), $aTags = array())
 {
     if ($this->oForm->__getEnvExecMode() !== "EID") {
         #$bOldValue = $this->oForm->bInlineEvents;
         #$this->oForm->bInlineEvents = TRUE;
         $aEventsBefore = array_keys($this->oForm->aRdtEvents);
         //debug($aEventsBefore);
     }
     if ($this->isDataBridge()) {
         $sDBridgeName = $this->_getElementHtmlName() . "[databridge]";
         $sDBridgeId = $this->_getElementHtmlId() . "_databridge";
         $sSignature = $this->dbridge_getCurrentDsetSignature();
         $sHidden = "<input type=\"hidden\" name=\"" . $sDBridgeName . "\" id=\"" . $sDBridgeId . "\" value=\"" . htmlspecialchars($sSignature) . "\" />";
     }
     $aChildsBag = $this->renderChildsBag();
     $aChildsBag = t3lib_div::array_merge_recursive_overrule($aChildsBag, $aTags);
     if ($this->oForm->__getEnvExecMode() !== "EID") {
         #$this->oForm->bInlineEvents = $bOldValue;
         $aEventsAfter = array_keys($this->oForm->aRdtEvents);
         $aAddedKeys = array_diff($aEventsAfter, $aEventsBefore);
         $aAddedEvents = array();
         reset($aAddedKeys);
         while (list(, $sKey) = each($aAddedKeys)) {
             $aAddedEvents[$sKey] = $this->oForm->aRdtEvents[$sKey];
             unset($this->oForm->aRdtEvents[$sKey]);
             // unset because if rendered in a lister,
             // we need to be able to detect the new events even if they were already declared by other loops in the lister
         }
         //debug($aAddedEvents);
         $aConfig["attachevents"] = $aAddedEvents;
     }
     $sCompiledChilds = $this->renderChildsCompiled($aChildsBag);
     $aConfig["html"] = $sCompiledChilds;
     $aConfig["postinit"] = $this->aPostInitTasks;
     $aConfig["preuninit"] = $this->aPreUninitTasks;
     return $this->buildMajixExecuter("showBox", $aConfig);
 }
开发者ID:preinboth,项目名称:formidable,代码行数:37,代码来源:class.tx_rdtmodalbox.php

示例11: majixShowBox

 function majixShowBox($aConfig = array(), $aTags = array())
 {
     if ($this->oForm->__getEnvExecMode() !== "EID") {
         $aEventsBefore = array_keys($this->oForm->aRdtEvents);
     }
     $aChildsBag = $this->renderChildsBag();
     $aChildsBag = t3lib_div::array_merge_recursive_overrule($aChildsBag, $aTags);
     if ($this->oForm->__getEnvExecMode() !== "EID") {
         $aEventsAfter = array_keys($this->oForm->aRdtEvents);
         $aAddedKeys = array_diff($aEventsAfter, $aEventsBefore);
         $aAddedEvents = array();
         reset($aAddedKeys);
         while (list(, $sKey) = each($aAddedKeys)) {
             $aAddedEvents[$sKey] = $this->oForm->aRdtEvents[$sKey];
             unset($this->oForm->aRdtEvents[$sKey]);
             // unset because if rendered in a lister,
             // we need to be able to detect the new events even if they were already declared by other loops in the lister
         }
         $aConfig["attachevents"] = $aAddedEvents;
         $aConfig["postinit"] = $this->oForm->aPostInitTasks;
     } else {
         # specific to this renderlet
         # as events have to be attached to the HTML
         # after the execution of the majix tasks
         # in that case, using the modalbox's afterLoad event handler
         $aConfig["attachevents"] = $this->oForm->aRdtEventsAjax;
         $aConfig["postinit"] = $this->oForm->aPostInitTasksAjax;
         $this->oForm->aRdtEventsAjax = array();
         $this->oForm->aPostInitTasksAjax = array();
     }
     $aConfig["postinit"] = array_merge($this->aPostInitTasks, $aConfig["postinit"]);
     $aConfig["preuninit"] = $this->aPreUninitTasks;
     $sCompiledChilds = $this->renderChildsCompiled($aChildsBag);
     $aConfig["html"] = $sCompiledChilds;
     return $this->buildMajixExecuter("showBox", $aConfig);
 }
开发者ID:preinboth,项目名称:formidable,代码行数:36,代码来源:class.tx_rdtmodalbox2.php

示例12: main

 /**
  * The main method of the PlugIn
  *
  * @access	public
  *
  * @param	string		$content: The PlugIn content
  * @param	array		$conf: The PlugIn configuration
  *
  * @return	string		The content that is displayed on the website
  */
 public function main($content, $conf)
 {
     $this->init($conf);
     // Merge configuration with conf array of toolbox.
     $this->conf = t3lib_div::array_merge_recursive_overrule($this->cObj->data['conf'], $this->conf);
     // Load current document.
     $this->loadDocument();
     if ($this->doc === NULL || $this->doc->numPages < 1 || empty($this->conf['fileGrpFulltext'])) {
         // Quit without doing anything if required variables are not set.
         return $content;
     } else {
         // Set default values if not set.
         // page may be integer or string (physical page attribute)
         if ((int) $this->piVars['page'] > 0 || empty($this->piVars['page'])) {
             $this->piVars['page'] = tx_dlf_helper::intInRange((int) $this->piVars['page'], 1, $this->doc->numPages, 1);
         } else {
             $this->piVars['page'] = array_search($this->piVars['page'], $this->doc->physicalPages);
         }
         $this->piVars['double'] = tx_dlf_helper::intInRange($this->piVars['double'], 0, 1, 0);
     }
     // Load template file.
     if (!empty($this->conf['templateFile'])) {
         $this->template = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['templateFile']), '###TEMPLATE###');
     } else {
         $this->template = $this->cObj->getSubpart($this->cObj->fileResource('EXT:dlf/plugins/toolbox/tools/fulltext/template.tmpl'), '###TEMPLATE###');
     }
     $fullTextFile = $this->doc->physicalPagesInfo[$this->doc->physicalPages[$this->piVars['page']]]['files'][$this->conf['fileGrpFulltext']];
     // Get single page downloads.
     if (!empty($fullTextFile)) {
         $markerArray['###FULLTEXT_SELECT###'] = '<a class="select" title="' . $this->pi_getLL('fulltext-select', '', TRUE) . '" onclick="tx_dlf_viewer.toogleFulltextSelect();">' . $this->pi_getLL('fulltext-select', '', TRUE) . '</a>';
     } else {
         $markerArray['###FULLTEXT_SELECT###'] = $this->pi_getLL('fulltext-select', '', TRUE);
     }
     $content .= $this->cObj->substituteMarkerArray($this->template, $markerArray);
     return $this->pi_wrapInBaseClass($content);
 }
开发者ID:CalanthaC,项目名称:goobi-presentation,代码行数:46,代码来源:class.tx_dlf_toolsFulltext.php

示例13: unset

 *		TOTAL FUNCTIONS: 7
 * (This index is automatically created/updated by the extension "extdeveval")
 *
 */
unset($MCONF);
require 'conf.php';
require $BACK_PATH . 'init.php';
require $BACK_PATH . 'template.php';
// Unset MCONF/MLANG since all we wanted was back path etc. for this particular script.
unset($MCONF);
unset($MLANG);
// Merging locallang files/arrays:
$LANG->includeLLFile('EXT:lang/locallang_misc.xml');
$LOCAL_LANG_orig = $LOCAL_LANG;
$LANG->includeLLFile('EXT:templavoila/mod1/locallang_db_new_content_el.xml');
$LOCAL_LANG = t3lib_div::array_merge_recursive_overrule($LOCAL_LANG_orig, $LOCAL_LANG);
// Exits if 'cms' extension is not loaded:
t3lib_extMgm::isLoaded('cms', 1);
// Include needed libraries:
require_once PATH_t3lib . 'class.t3lib_page.php';
require_once t3lib_extMgm::extPath('templavoila') . 'class.tx_templavoila_api.php';
/**
 * Script Class for the New Content element wizard
 *
 * @author	Robert Lemke <robert@typo3.org>
 * @package TYPO3
 * @subpackage templavoila
 */
class tx_templavoila_dbnewcontentel
{
    // Internal, static (from GPvars):
开发者ID:rod86,项目名称:t3sandbox,代码行数:31,代码来源:db_new_content_el.php

示例14: mergeConstantsFromPageTSconfig

 /**
  * Loads Page TSconfig until the outermost template record and parses the configuration - if TSFE.constants object path is found it is merged with the default data in here!
  *
  * @param	array		Constants array, default input.
  * @return	array		Constants array, modified
  * @todo	Apply caching to the parsed Page TSconfig. This is done in the other similar functions for both frontend and backend. However, since this functions works for BOTH frontend and backend we will have to either write our own local caching function or (more likely) detect if we are in FE or BE and use caching functions accordingly. Not having caching affects mostly the backend modules inside the "Template" module since the overhead in the frontend is only seen when TypoScript templates are parsed anyways (after which point they are cached anyways...)
  */
 function mergeConstantsFromPageTSconfig($constArray)
 {
     $TSdataArray = array();
     $TSdataArray[] = $GLOBALS['TYPO3_CONF_VARS']['BE']['defaultPageTSconfig'];
     // Setting default configuration:
     for ($a = 0; $a <= $this->outermostRootlineIndexWithTemplate; $a++) {
         $TSdataArray[] = $this->absoluteRootLine[$a]['TSconfig'];
     }
     // Parsing the user TS (or getting from cache)
     $TSdataArray = t3lib_TSparser::checkIncludeLines_array($TSdataArray);
     $userTS = implode(LF . '[GLOBAL]' . LF, $TSdataArray);
     $parseObj = t3lib_div::makeInstance('t3lib_TSparser');
     $parseObj->parse($userTS);
     if (is_array($parseObj->setup['TSFE.']['constants.'])) {
         $constArray = t3lib_div::array_merge_recursive_overrule($constArray, $parseObj->setup['TSFE.']['constants.']);
     }
     return $constArray;
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:25,代码来源:class.t3lib_tstemplate.php

示例15: getQueryArguments

 /**
  * Gets the query arguments and assembles them for URLs.
  * Arguments may be removed or set, depending on configuration.
  *
  * @param	string		Configuration
  * @param	array		Multidimensional key/value pairs that overrule incoming query arguments
  * @param	boolean		If set, key/value pairs not in the query but the overrule array will be set
  * @return	string		The URL query part (starting with a &)
  */
 public function getQueryArguments($conf, $overruleQueryArguments = array(), $forceOverruleArguments = FALSE)
 {
     switch ((string) $conf['method']) {
         case 'GET':
             $currentQueryArray = t3lib_div::_GET();
             break;
         case 'POST':
             $currentQueryArray = t3lib_div::_POST();
             break;
         case 'GET,POST':
             $currentQueryArray = array_merge(t3lib_div::_GET(), t3lib_div::_POST());
             break;
         case 'POST,GET':
             $currentQueryArray = array_merge(t3lib_div::_POST(), t3lib_div::_GET());
             break;
         default:
             $currentQueryArray = t3lib_div::explodeUrl2Array(t3lib_div::getIndpEnv('QUERY_STRING'), TRUE);
     }
     if ($conf['exclude']) {
         $exclude = str_replace(',', '&', $conf['exclude']);
         $exclude = t3lib_div::explodeUrl2Array($exclude, TRUE);
         // never repeat id
         $exclude['id'] = 0;
         $newQueryArray = t3lib_div::arrayDiffAssocRecursive($currentQueryArray, $exclude);
     } else {
         $newQueryArray = $currentQueryArray;
     }
     if ($forceOverruleArguments) {
         $newQueryArray = t3lib_div::array_merge_recursive_overrule($newQueryArray, $overruleQueryArguments);
     } else {
         $newQueryArray = t3lib_div::array_merge_recursive_overrule($newQueryArray, $overruleQueryArguments, TRUE);
     }
     return t3lib_div::implodeArrayForUrl('', $newQueryArray);
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:43,代码来源:class.tslib_content.php


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