|
@@ -100,11 +100,11 @@ class ObjectDecorator extends BaseEscaper implements \ArrayAccess, \Countable
|
|
|
* Escapes an object property using the specified escaper.
|
|
|
*
|
|
|
* @param string $key The object property name
|
|
|
- * @param mixed $escaper The escaping method (a PHP callable or a named escaper)
|
|
|
+ * @param string $escaper The escaping strategy prefixed with esc_ (see __call())
|
|
|
*/
|
|
|
public function getEscapedProperty($key, $escaper)
|
|
|
{
|
|
|
- return Escaper::escape($escaper, $this->value->$key);
|
|
|
+ return Escaper::escape(substr($escaper, 4), $this->value->$key);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -168,11 +168,11 @@ class ObjectDecorator extends BaseEscaper implements \ArrayAccess, \Countable
|
|
|
* Escapes a key from the array using the specified escaper.
|
|
|
*
|
|
|
* @param string $key The array key
|
|
|
- * @param mixed $escaper The escaping method (a PHP callable or a named escaper)
|
|
|
+ * @param string $escaper The escaping strategy prefixed with esc_ (see __call())
|
|
|
*/
|
|
|
public function getEscapedKey($key, $escaper)
|
|
|
{
|
|
|
- return Escaper::escape($escaper, $this->value[$key]);
|
|
|
+ return Escaper::escape(substr($escaper, 4), $this->value[$key]);
|
|
|
}
|
|
|
|
|
|
/**
|