本文整理汇总了PHP中dmString::escape方法的典型用法代码示例。如果您正苦于以下问题:PHP dmString::escape方法的具体用法?PHP dmString::escape怎么用?PHP dmString::escape使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dmString
的用法示例。
在下文中一共展示了dmString::escape方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addPage
protected function addPage(DmPage $page)
{
$pageMenu = $this->addChild('page-' . $page->get('id'), $page)->label(dmString::escape($page->get('name')))->secure($page->get('is_secure'))->credentials($page->get('credentials'));
foreach ($page->get('__children') as $child) {
!in_array($child->id, $this->hide) && $pageMenu->addPage($child);
}
}
示例2: renderText
protected function renderText()
{
if (isset($this->options['text'])) {
return $this->options['text'];
}
return dmString::escape($this->page->_getI18n('name'));
}
示例3: renderSubject
protected function renderSubject(dmEventLogEntry $entry)
{
$subject = $this->i18n->__($entry->get('subject'));
if ($record = $entry->get('record_object')) {
$subject = $this->helper->link($record)->text(dmString::escape($subject));
}
return $subject;
}
示例4: renderText
protected function renderText()
{
if (!isset($this->options['text'])) {
if (is_object($this->resource)) {
if ($this->resource instanceof DmPage) {
$text = $this->resource->_getI18n('name');
} else {
$text = (string) $this->resource;
}
$text = dmString::escape($text);
} else {
$text = $this->getBaseHref();
}
} else {
$text = $this->options['text'];
}
return $text;
}
示例5: escape
function escape($text)
{
return dmString::escape($text);
}
示例6: getDefaultOptions
public function getDefaultOptions()
{
return array('navigation_top' => true, 'navigation_bottom' => true, 'separator' => null, 'class' => null, 'current_class' => 'current', 'first' => dmString::escape('<<'), 'prev' => dmString::escape('<'), 'next' => dmString::escape('>'), 'last' => dmString::escape('>>'), 'nb_links' => 9, 'ajax' => false, 'url_params' => array(), 'anchor' => false, 'widget_id' => null);
}
示例7: doClean
/**
* @see sfValidatorString
*/
protected function doClean($value)
{
return parent::doClean(dmString::escape((string) $value));
}
示例8: executeMarkdown
public function executeMarkdown(dmWebRequest $request)
{
$this->forward404Unless($request->isMethod('post'));
$text = $request->getParameter('text');
return $this->renderText($this->getService('markdown')->toHtml(dmString::escape($text, ENT_NOQUOTES)));
}
示例9: _open
* Action for Version : Show
* Vars : $version
*/
echo _open('div.version.show');
echo _tag('h1.t_big', $version->name);
echo _tag('h2.t_baseline', $version->resume);
if ($version->githubTag) {
echo _tag('p.mb10', _link($version->downloadUrl)->text(_tag('span.download_link', __('Download ' . $version . ' in TGZ')))->set('.button.large.orange'));
}
echo _tag('h2.t_medium', __('Version notes'));
echo _tag('p.quiet.mb5', format_date($version->createdAt, 'D'));
echo markdown($version->text);
echo _tag('h2.t_medium', __('Changelog'));
if ($version->svnUrl) {
echo _tag('p.mb10', _link('http://trac.symfony-project.org/log/plugins/diemPlugin/trunk')->text(__('View the changelog on symfony trac')));
} elseif ($version->githubTag) {
echo _open('ul.commits');
foreach ($commits as $commit) {
echo _tag('li.clickable', _link($commit['url'])->text(auto_link_text(escape($commit['message'])))->set('.block') . _tag('span.quiet.little', format_date($commit['committed_date'], 'd/MM H:mm') . ' by ' . escape($commit['author']['name'])));
}
echo _close('ul');
echo _tag('p.mt10', 'And many more... ' . _link('http://github.com/diem-project/diem/commits/' . $version->githubTag)->text(__('View more commits on github')));
}
$markdown = markdown($version->changelog);
if ($version->changelog && '<div class="markdown"></div>' == $markdown) {
echo _tag('em', 'Sorry, the changelog is so big, the markdown parser can not transform it.');
echo _tag('div.markdown.mt10', nl2br(dmString::escape($version->changelog)));
} else {
echo $markdown;
}
echo _close('div');
示例10: renderUserTime
protected function renderUserTime(dmEventLogEntry $entry)
{
$username = $entry->get('username');
return ($username ? '<strong class="mr10">' . dmString::escape(dmString::truncate($username, 20, '...')) . '</strong><br />' : '') . $entry->get('ip');
}
示例11: renderLink
protected function renderLink(dmStaticLogEntry $entry)
{
$uri = ltrim($entry->get('uri'), '/');
$text = $uri ? $uri : 'front home';
return $this->helper->link('app:front/' . $uri)->text(dmString::escape($text));
}
示例12: renderUserAndBrowser
protected function renderUserAndBrowser(dmRequestLogEntry $entry)
{
$browser = $entry->get('browser');
return sprintf('<div class="browser %s">%s<br />%s %s</div>', $this->getBrowserIcon($browser), ($username = $entry->get('username')) ? '<strong class="mr5">' . dmString::escape(dmString::truncate($username, 20, '...')) . '</strong>' : $this->renderIp($entry->get('ip')), ucfirst($browser->getName()), $browser->getVersion());
}
示例13: renderLink
protected function renderLink(dmRequestLogEntry $entry)
{
$uri = ltrim($entry->get('uri'), '/');
$text = $uri ? $uri : $entry->get('app') . ' home';
return $this->helper->link('app:' . $entry->get('app') . '/' . $uri)->text(dmString::escape($text));
}
示例14: getMarkdownText
public function getMarkdownText(myGeshiMarkdown $markdown)
{
return $markdown->toHtml(dmString::escape($this->text, ENT_NOQUOTES));
}