本文整理匯總了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;
}
示例2: unsetPlaceholders
/**
* @param $keys
*/
public function unsetPlaceholders($keys)
{
$this->modx->unsetPlaceholders($keys);
}