public function set($name, $data = [])
    {
        if (!is_array($name) || (isset($name[0]) && is_string($name[0]))) {
            $this->setAt($name, $data);
            return $this;
        }
        $data = $name;
        if (!is_array($data)) {
            throw new ORMException('Invalid bulk data for a document.');
        }
        foreach ($data as $name => $value) {
            $this->setAt($name, $value);
        }
        return $this;
    }
public function set($name, $data = [])
    {
        if (!is_array($name) || (isset($name[0]) && is_string($name[0]))) {
            $this->setAt($name, $data);
            return $this;
        }
        $data = $name;
        if (!is_array($data)) {
            throw new ORMException('Invalid bulk data for a document.');
        }
        foreach ($data as $name => $value) {
            $this->setAt($name, $value);
        }
        return $this;
    }
public function set ( $ name , $ data = [ ] ) { if ( ! is_array ( $ name ) || ( isset ( $ name [ 0 ] ) && is_string ( $ name [ 0 ] ) ) ) { $ this -> setAt ( $ name , $ data ) ; return $ this ; } $ data = $ name ; if ( ! is_array ( $ data ) ) { throw new ORMException ( 'Invalid bulk data for a document.' ) ; } foreach ( $ data as $ name => $ value ) { $ this -> setAt ( $ name , $ value ) ; } return $ this ; }
Sets one or several properties.

@param  mixed   $name    A field name or an associative array of fields and values.
@param  array   $data    An associative array of fields and values or an options array.
@return object           Returns `$this`.
Sets one or several properties .