lib/hz2600/Kazoo/Api/Entity/AbstractEntity.php
public static function mset($chunk, array $keys, $value) {
        $head = $chunk;
        $last = count($keys)-1;
        foreach($keys as $id => $key) {
            if ($last == $id) {
                if (is_null($value)) {
                    unset($chunk->$key);
                } else {
                    $chunk->$key = $value;
                }
            } else {
                $chunk->$key = isset($chunk->$key)? $chunk->$key : new stdClass();
                $chunk = $chunk->$key;
            }
        }
        return $head;
    }
public static function mset($chunk, array $keys, $value) {
        $head = $chunk;
        $last = count($keys)-1;
        foreach($keys as $id => $key) {
            if ($last == $id) {
                if (is_null($value)) {
                    unset($chunk->$key);
                } else {
                    $chunk->$key = $value;
                }
            } else {
                $chunk->$key = isset($chunk->$key)? $chunk->$key : new stdClass();
                $chunk = $chunk->$key;
            }
        }
        return $head;
    }
public static function mset ( $ chunk , array $ keys , $ value ) { $ head = $ chunk ; $ last = count ( $ keys ) - 1 ; foreach ( $ keys as $ id => $ key ) { if ( $ last == $ id ) { if ( is_null ( $ value ) ) { unset ( $ chunk -> $ key ) ; } else { $ chunk -> $ key = $ value ; } } else { $ chunk -> $ key = isset ( $ chunk -> $ key ) ? $ chunk -> $ key : new stdClass ( ) ; $ chunk = $ chunk -> $ key ; } } return $ head ; }
auto-create nodes for this->k1->k2->k3 = v1
auto - create nodes for this - > k1 - > k2 - > k3 = v1