本文整理汇总了PHP中sensitiveIO::stripPHPTags方法的典型用法代码示例。如果您正苦于以下问题:PHP sensitiveIO::stripPHPTags方法的具体用法?PHP sensitiveIO::stripPHPTags怎么用?PHP sensitiveIO::stripPHPTags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sensitiveIO
的用法示例。
在下文中一共展示了sensitiveIO::stripPHPTags方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CMS_poly_rss_definitions
$content = $cache->load();
} else {
$cache->start();
if (!isset($_REQUEST['id']) || !sensitiveIO::isPositiveInteger($_REQUEST['id'])) {
$error = 1;
} else {
if (!CMS_poly_rss_definitions::exists($_REQUEST['id'])) {
$error = 2;
} else {
$RSSDefinition = new CMS_poly_rss_definitions($_REQUEST['id']);
if ($RSSDefinition->hasError()) {
$error = 2;
}
//Create RSS Content
ob_start();
eval(sensitiveIO::stripPHPTags($RSSDefinition->getValue('compiledDefinition')));
$data = ob_get_contents();
ob_end_clean();
if (!$data) {
$error = 3;
}
$label = new CMS_object_i18nm($RSSDefinition->getValue("labelID"));
$description = new CMS_object_i18nm($RSSDefinition->getValue("descriptionID"));
$link = $RSSDefinition->getValue("link") ? $RSSDefinition->getValue("link") : CMS_websitesCatalog::getMainURL();
$categoriesTags = '';
if ($RSSDefinition->getValue("categories")) {
$categories = array_map('trim', explode(',', $RSSDefinition->getValue("categories")));
foreach ($categories as $category) {
$categoriesTags .= '<category>' . $category . '</category>' . "\n";
}
}
示例2: CMS_polymod_definition_parsing
$parameters['public'] = true;
$parameters['cache'] = false;
$parameters['pageID'] = CURRENT_PAGE;
$definitionParsing = new CMS_polymod_definition_parsing($transformedDefinition, true, CMS_polymod_definition_parsing::BLOCK_PARAM_MODE, $parameters['module']);
$compiledDefinition = $definitionParsing->getContent(CMS_polymod_definition_parsing::OUTPUT_PHP, $parameters);
$urlParts = parse_url($url);
if (!isset($urlParts['query'])) {
die("Incorrect parameters");
}
parse_str($urlParts['query']);
$parameterName = $oembedDefinition->getParameter();
$embededObject = CMS_poly_object_catalog::getObjectByID(${$parameterName}, false, true);
if (!$embededObject) {
die("Incorrect parameters");
}
// get label
ob_start();
eval(sensitiveIO::stripPHPTags($compiledDefinition));
$data = ob_get_contents();
ob_end_clean();
$html = array('html' => $data, 'title' => $embededObject->getLabel(), 'height' => io::get('height'), 'width' => io::get('width'));
$oembed = CMS_polymod_oembed_definition::getResults($html);
if ($format === 'json') {
print json_encode($oembed, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT);
} elseif ($format === 'xml') {
$output = "<?xml version=\"1.0\" encoding=\"utf-8\">\n";
$output .= "<oembed>\n";
$output .= CMS_polymod_oembed_definition::format_xml_elements($oembed);
$output .= "</oembed>";
print $output;
}
示例3: pluginCode
/**
* Return a wysiwyg plugin output for given parameters
*
* @param integer $pluginID : the plugin id to use
* @param integer $itemID : the item id to use
* @param string $selection : the selected wysiwyg text if any
* @param boolean $public : the data status
* @param boolean $pluginView : is this plugin is intended to be shown in wysiwyg view ? (default false)
* @return string : the plugin output
* @access public
* @static
*/
static function pluginCode($pluginID, $itemID, $selection, $public = false, $pluginView = false)
{
global $cms_user;
//then create the code to paste for the current selected object if any
if (sensitiveIO::isPositiveInteger($itemID) && sensitiveIO::isPositiveInteger($pluginID)) {
//get plugin
$plugin = new CMS_poly_plugin_definitions($pluginID);
//set execution parameters
$parameters = array();
$parameters['itemID'] = $itemID;
$parameters['public'] = $public;
if ($pluginView) {
$parameters['plugin-view'] = true;
}
//get originaly selected text
if (!$plugin->needSelection()) {
$parameters['selection'] = '';
} else {
$parameters['selection'] = io::decodeEntities($selection);
}
//this line is used to optimise text fields (see CMS_object_text) which use a lot of plugin codes.
//in this case, items are searched before then put in this global var so it is not necessary to do one search for each of them
if (isset($GLOBALS['polymod']['preparedItems'][$plugin->getValue('objectID')][$itemID])) {
$parameters['item'] = $GLOBALS['polymod']['preparedItems'][$plugin->getValue('objectID')][$itemID];
}
//eval item content
ob_start();
eval(sensitiveIO::sanitizeExecCommand(sensitiveIO::stripPHPTags($plugin->getValue('compiledDefinition'))));
$data = ob_get_contents();
ob_end_clean();
return $data;
}
}