1
0
mirror of https://github.com/danielstjules/Stringy.git synced 2025-08-14 01:04:06 +02:00

Update htmlEncode and htmlDecode docs

This commit is contained in:
Daniel St. Jules
2015-07-25 22:25:44 -07:00
parent b3f1bf5174
commit 9165957971
2 changed files with 14 additions and 6 deletions

View File

@@ -393,7 +393,9 @@ s('fòô bàř')->hasUpperCase(); // false
##### htmlDecode()
Convert all HTML entities to their applicable characters.
Convert all HTML entities to their applicable characters. An alias of
html_entity_decode. For a list of flags, refer to
http://php.net/manual/en/function.html-entity-decode.php
```php
s('&')->htmlDecode(); // '&'
@@ -401,7 +403,9 @@ s('&')->htmlDecode(); // '&'
##### htmlEncode()
Convert all applicable characters to HTML entities.
Convert all applicable characters to HTML entities. An alias of
htmlentities. Refer to http://php.net/manual/en/function.htmlentities.php
for a list of flags.
```php
s('&')->htmlEncode(); // '&'

View File

@@ -1704,9 +1704,11 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
}
/**
* Convert all applicable characters to HTML entities.
* Convert all applicable characters to HTML entities. An alias of
* htmlentities. Refer to http://php.net/manual/en/function.htmlentities.php
* for a list of flags.
*
* @param int|null $flags See http://php.net/manual/en/function.htmlentities.php
* @param int|null $flags Optional flags
* @return Stringy Object with the resulting $str after being html encoded.
*/
public function htmlEncode($flags = ENT_COMPAT)
@@ -1717,9 +1719,11 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
}
/**
* Convert all HTML entities to their applicable characters.
* Convert all HTML entities to their applicable characters. An alias of
* html_entity_decode. For a list of flags, refer to
* http://php.net/manual/en/function.html-entity-decode.php
*
* @param int|null $flags See http://php.net/manual/en/function.html-entity-decode.php
* @param int|null $flags Optional flags
* @return Stringy Object with the resulting $str after being html decoded.
*/
public function htmlDecode($flags = ENT_COMPAT)