Set::normalize('foo,bar'); // returns array('foo' => null, 'bar' => null);
Set::normalize(array('foo', 'bar' => 'baz'); // returns array('foo' => null, 'bar' => 'baz');
public static normalize ( string | array $list, boolean $assoc = true, string $sep = ',', boolean $trim = true ) : array | ||
$list | string | array | List to normalize. |
$assoc | boolean | If `true`, `$list` will be converted to an associative array. |
$sep | string | If `$list` is a string, it will be split into an array with `$sep`. |
$trim | boolean | If `true`, separated strings will be trimmed. |
return | array |