public function listToMap(array $list)
    {
        $map = array();
        for ($i = 0, $n = count($list); $i < $n; $i += 2) {
            $map[$list[$i]] = $list[$i + 1];
        }
        return (object)$map;
    }