public function arrayToHash($array)
    {
        $hash = [];
        for ($i = 0, $s = sizeof($array) - 1; $i < $s; ++$i) {
            $hash[$array[$i]] = $array[++$i];
        }
        return $hash;
    }