本文整理汇总了PHP中Hubzero\Utility\String::obfuscate方法的典型用法代码示例。如果您正苦于以下问题:PHP String::obfuscate方法的具体用法?PHP String::obfuscate怎么用?PHP String::obfuscate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Hubzero\Utility\String
的用法示例。
在下文中一共展示了String::obfuscate方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __invoke
/**
* Obfuscate some text
*
* @param string $text Text to obfuscate
* @return string
* @throws \InvalidArgumentException If no text passed
*/
public function __invoke($text = null)
{
if (null === $text) {
throw new \InvalidArgumentException(__METHOD__ . '(); No text passed.');
}
return String::obfuscate($text);
}
示例2:
<?php
if ($this->params->get('access_email', 2) == 0 || $this->params->get('access_email', 2) == 1 && $loggedin || $this->params->get('access_email', 2) == 2 && $isUser) {
?>
<li class="profile-email field">
<div class="field-content">
<div class="key"><?php
echo Lang::txt('PLG_GROUPS_PROFILE_EMAIL');
?>
</div>
<div class="value">
<a class="email" href="mailto:<?php
echo \Hubzero\Utility\String::obfuscate($this->profile->get('email'));
?>
" rel="nofollow">
<?php
echo \Hubzero\Utility\String::obfuscate($this->profile->get('email'));
?>
</a>
</div>
</div>
</li>
<?php
}
?>
<?php
}
?>
<?php
if ($this->registration->ORCID != REG_HIDE && $this->profile->get('orcid')) {
?>
示例3:
$usersConfig = Component::params('com_users');
$useractivation = $usersConfig->get('useractivation', 1);
if ($useractivation != 0) {
?>
<p class="warning"><?php
echo Lang::txt('COM_MEMBERS_REGISTER_YOU_MUST_CONFIRM_EMAIL', \Hubzero\Utility\String::obfuscate(Config::get('mailfrom')));
?>
</p>
<?php
}
?>
<?php
} else {
?>
<p class="warning">Important! If you change your e-mail address you <strong>must</strong> confirm receipt of the confirmation e-mail from <?php
echo \Hubzero\Utility\String::obfuscate(Config::get('mailfrom'));
?>
in order to re-activate your account.</p>
<?php
}
}
?>
<?php
}
?>
<?php
}
?>
</fieldset>
<div class="clear"></div>
<?php
示例4: anchor
/**
* Automatically links any strings matching a URL or email pattern
*
* Link is pushed to internal array and placeholder returned
* This is to ensure links aren't parsed twice. We put the links back in place
* towards the end of parsing.
*
* @param array $matches Text matching link pattern
* @return string
*/
public function anchor($matches)
{
if (empty($matches)) {
return '';
}
$whole = $matches[0];
$prtcl = rtrim($matches[1], ':');
$url = $matches[3];
$url .= isset($matches[4]) ? $matches[4] : '';
$url .= isset($matches[5]) ? $matches[5] : '';
$url .= isset($matches[6]) ? $matches[6] : '';
$prfx = preg_replace('/^([\\s]*)(.*)/i', "\$1", $whole);
$href = trim($whole);
if (substr($href, 0, 1) == '>') {
$href = ltrim($href, '>');
$prfx .= '>';
}
$txt = $href;
if ($prtcl == 'mailto') {
$txt = $url;
$href = 'mailto:' . String::obfuscate($url);
}
return $prfx . '<a class="ext-link" href="' . $href . '" rel="external">' . $txt . '</a>';
}
示例5: autolink
/**
* Auto-link mailto, ftp, and http strings in text
*
* @param array $matches Text to autolink
* @return string
*/
public function autolink($matches)
{
$href = $matches[0];
if (substr($href, 0, 1) == '!') {
return substr($href, 1);
}
$href = str_replace('"', '', $href);
$href = str_replace("'", '', $href);
$href = str_replace('”', '', $href);
$h = array('h', 'm', 'f', 'g', 'n');
if (!in_array(substr($href, 0, 1), $h)) {
$href = substr($href, 1);
}
$name = trim($href);
if (substr($name, 0, 7) == 'mailto:') {
$name = substr($name, 7, strlen($name));
$name = \Hubzero\Utility\String::obfuscate($name);
$href = 'mailto:' . $name;
}
$l = sprintf(' <a class="ext-link" href="%s" rel="external">%s</a>', $href, $name);
return $l;
}
示例6:
<div class="col span-half omega">
<?php
if ($this->getError()) {
?>
<p class="error"><?php
echo $this->getError();
?>
</p>
<?php
} else {
if ($this->xprofile->get('emailConfirmed') < 0) {
?>
<div class="account-activation">
<div class="instructions">
<p><?php
echo Lang::txt('COM_MEMBERS_REGISTER_ACCOUNT_CREATED_MESSAGE', $this->sitename, \Hubzero\Utility\String::obfuscate($this->xprofile->get('email')));
?>
</p>
<ol>
<li><?php
echo Lang::txt('COM_MEMBERS_REGISTER_ACCOUNT_INSTRUCT_FIND_EMAIL');
?>
</li>
<li><?php
echo Lang::txt('COM_MEMBERS_REGISTER_ACCOUNT_INSTRUCT_ACTIVATE');
?>
</li>
<li><?php
echo Lang::txt('COM_MEMBERS_REGISTER_ACCOUNT_INSTRUCT_LOGIN');
?>
</li>