Adding ArraUtil class

This commit is contained in:
Erik Amaru Ortiz
2014-02-20 10:54:49 -04:00
parent 2597366b39
commit 4545ecb287

View File

@@ -0,0 +1,16 @@
<?php
namespace ProcessMaker\Util;
class ArrayUtil
{
public static function boolToIntValues($array)
{
array_walk($array, function (&$v) {
if ($v === false) $v = 0;
elseif ($v === true) $v = 1;
elseif ($v === null) $v = 0;
});
return $array;
}
}