API / Minn\Support / Slashes

Slashes final class

Minn\Support\Slashes · public/minn/src/Minn/Support/Slashes.php · 32 lines

Magic-quote slashes the way WordPress keeps them (wp_slash, wp_unslash): added to or stripped from every string inside a value, arrays and objects walked all the way down, anything else left as it is.

Public

staticadd(mixed $value): mixed#

Every string in a value with its quotes and backslashes slashed.

staticstrip(mixed $value): mixed#

Every string in a value with one level of slashes taken off.

Internals 1

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privatedeep(mixed $value, Closure $change): mixed#
$change\Closure(string): string