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


PHP modX::unsetPlaceholders方法代碼示例

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


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

示例1: process

 /**
  * Process the template variable and return the output.
  *
  * {@inheritdoc}
  */
 public function process($properties = null, $content = null)
 {
     parent::process($properties, $content);
     if (!$this->_processed) {
         $this->_content = $this->renderOutput($this->xpdo->resourceIdentifier);
         /* copy the content source to the output buffer */
         $this->_output = $this->_content;
         if (is_string($this->_output) && !empty($this->_output)) {
             /* turn the processed properties into placeholders */
             $scope = $this->xpdo->toPlaceholders($this->_properties, '', '.', true);
             /* collect element tags in the content and process them */
             $maxIterations = intval($this->xpdo->getOption('parser_max_iterations', null, 10));
             $this->xpdo->parser->processElementTags($this->_tag, $this->_output, $this->xpdo->parser->isProcessingUncacheable(), $this->xpdo->parser->isRemovingUnprocessed(), '[[', ']]', array(), $maxIterations);
             /* remove the placeholders set from the properties of this element and restore global values */
             if (isset($scope['keys'])) {
                 $this->xpdo->unsetPlaceholders($scope['keys']);
             }
             if (isset($scope['restore'])) {
                 $this->xpdo->toPlaceholders($scope['restore']);
             }
         }
         /* apply output filtering */
         $this->filterOutput();
         /* cache the content */
         $this->cache();
         $this->_processed = true;
     }
     $this->xpdo->parser->setProcessingElement(false);
     /* finally, return the processed element content */
     return $this->_output;
 }
開發者ID:ChrstnMgcn,項目名稱:revolution,代碼行數:36,代碼來源:modtemplatevar.class.php

示例2: unsetPlaceholders

 /**
  * @param $keys
  */
 public function unsetPlaceholders($keys)
 {
     $this->modx->unsetPlaceholders($keys);
 }
開發者ID:suasti,項目名稱:pdoTools,代碼行數:7,代碼來源:_micromodx.php


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