本文整理汇总了PHP中S::entityDecode方法的典型用法代码示例。如果您正苦于以下问题:PHP S::entityDecode方法的具体用法?PHP S::entityDecode怎么用?PHP S::entityDecode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类S
的用法示例。
在下文中一共展示了S::entityDecode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: manageTTL
/**
* Will add a string to the <title></title> array, that will be represented by the getPageTitle method. If you need to have
* control over the <title></title> tags of the generated DOM, than you can use this method by passing a string that will get
* appended to the title string. You can see {@link TPL::switchtTL ()} on how to reverse the title string;
*
* @param S $webPageStringTitle The string to be added to the title;
* @return M Either the current object instance, or boolean false, depends;
* @author Catalin Z. Alexandru <catalin.zamfir@raphpframework.ro>
* @copyright Under the terms of the GNU General Public License v3
* @see TPL::switchTTL()
* @version $Id: 10_TPL.php 315 2009-10-11 07:11:31Z catalin.zamfir $
* @since Version 1.0
* @access public
* @static
* @final
*/
public static final function manageTTL(S $webPageStringTitle)
{
if (self::$objPageTitle[self::$objPageTitle->doCount()->toInt()] = $webPageStringTitle->entityDecode(ENT_QUOTES)->stripTags()->entityEncode(ENT_QUOTES)) {
return TheFactoryMethodOfSingleton::getInstance(__CLASS__);
} else {
// Do return ...
return new B(FALSE);
}
}
示例2: doMAIL
/**
* Will send the email, at the specified address, using the specified subject and content;
*
* This method will send out the given email and subject, to the given address, while decoding the content from entities; You,
* as the user, SHOULD ALWAYS remember, that the content gets decoded in this method, thus allowing you to work with your
* content where you've called it, without modifying it;
*
* @param S $objMAILTo The email to send it to;
* @param S $objMAILSubject The subject to set;
* @param S $objMAILContent And the content;
* @todo CLEAN THIS URGENTLY! ...
*/
public function doMAIL(S $objMAILTo, S $objMAILSubject, S $objMAILContent)
{
// First of ALL, get a CLONE ...
$objMAILClone = clone $objMAILContent;
$objMAILClone = $objMAILClone->entityDecode(ENT_QUOTES)->stripTags();
// #0: proper MULTIPART;
$objMAILContent->prependString(new S(_N_))->prependString(_S(self::MAIL_HEADER_CONTENT_ENCODING_SEVENBIT . _N_))->prependString(_S(self::MAIL_HEADER_CONTENT_TYPE_HTML . _N_))->prependString(_S(self::MAIL_HEADER_PHP_ALTERNATIVE . _N_)->doToken('%s', self::$objHASHId))->prependString(_S(_N_))->prependString(_S($objMAILClone . _N_))->prependString(_S(_N_))->prependString(_S(self::MAIL_HEADER_CONTENT_ENCODING_SEVENBIT . _N_))->prependString(_S(self::MAIL_HEADER_CONTENT_TYPE_PLAIN . _N_))->prependString(_S(self::MAIL_HEADER_PHP_ALTERNATIVE . _N_)->doToken('%s', self::$objHASHId))->prependString(_S(_N_))->prependString(_S(self::MAIL_HEADER_MULTIPART_ALTERNATIVE . _N_)->doToken('%s', self::$objHASHId))->prependString(_S(self::MAIL_HEADER_PHP_MIXED . _N_)->doToken('%s', self::$objHASHId));
// #4: ... end PLAIN and HTML ...
$objMAILContent->appendString(_S(_N_))->appendString(_S(self::MAIL_HEADER_PHP_ALTERNATIVE_END . _N_)->doToken('%s', self::$objHASHId));
// #5: ... attachments;
foreach (self::$objEMLAttachment as $k => $v) {
// #5.1
$objMAILContent->appendString(_S(self::MAIL_HEADER_PHP_MIXED . _N_)->doToken('%s', self::$objHASHId))->appendString(_S(self::MAIL_HEADER_ATTACHMENT_TYPE_NAME . _N_)->doToken('%t', $v['attachment_type'])->doToken('%n', $v['attachment_name']))->appendString(_S(self::MAIL_HEADER_ENCODING_BASE64 . _N_))->appendString(_S(self::MAIL_HEADER_DISPOSITION_ATTACHMENT . _N_))->appendString(_S(_N_))->appendString($v['attachment_base64'])->appendString(_S(self::MAIL_HEADER_PHP_MIXED . _N_)->doToken('%s', self::$objHASHId));
}
// Finish ...
$objMAILContent->appendString(_S(_N_))->appendString(_S(self::MAIL_HEADER_PHP_MIXED_END)->doToken('%s', self::$objHASHId));
// Go ... everyhing IS ok and life's grand ...
MAIL($objMAILTo, $objMAILSubject, $objMAILContent->entityDecode(ENT_QUOTES), self::$objFromHeader . self::$objReceiptTo . self::$objReplyTo . self::$objMIMEHeader . self::$objTypeHTML);
}