Commit aa32e4cf by thybag

Rename static::get_encoding() method to static::encoding() to fit better with style.

parent f55bb85c
...@@ -38,7 +38,7 @@ class HTML { ...@@ -38,7 +38,7 @@ class HTML {
*/ */
public static function entities($value) public static function entities($value)
{ {
return htmlentities($value, ENT_QUOTES, static::get_encoding(), false); return htmlentities($value, ENT_QUOTES, static::encoding(), false);
} }
/** /**
...@@ -49,7 +49,7 @@ class HTML { ...@@ -49,7 +49,7 @@ class HTML {
*/ */
public static function decode($value) public static function decode($value)
{ {
return html_entity_decode($value, ENT_QUOTES, static::get_encoding()); return html_entity_decode($value, ENT_QUOTES, static::encoding());
} }
/** /**
...@@ -62,7 +62,7 @@ class HTML { ...@@ -62,7 +62,7 @@ class HTML {
*/ */
public static function specialchars($value) public static function specialchars($value)
{ {
return htmlspecialchars($value, ENT_QUOTES, static::get_encoding(), false); return htmlspecialchars($value, ENT_QUOTES, static::encoding(), false);
} }
/** /**
...@@ -419,8 +419,8 @@ class HTML { ...@@ -419,8 +419,8 @@ class HTML {
* *
* @return string * @return string
*/ */
protected static function get_encoding() protected static function encoding()
{ {
if(static::$encoding===null) static::$encoding = Config::get('application.encoding'); if(static::$encoding===null) static::$encoding = Config::get('application.encoding');
return static::$encoding; return static::$encoding;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment