批量设置成员+角色
@param array $members
@return $this
336464
public function setMemberList(array $members)
    {
        $memberLists = [];
        foreach ($members as $key => $value) {
            $memberLists[] = ['Member_Account' => $key, 'Role' => $value];
        }
        $this->setParameter('MemberList', $memberLists);
        return $this;
    }
971925
public function add($items)
        {
            if ($items && $items instanceof Container) {
                $id = (int) $items->id;
                $this->_items[$id] = $items;
            } elseif (Arrays::is($items)) {
                foreach ($items as $obj) {
                    if ($obj instanceof Container) {
                        $this->add($obj);
                    }
                }
            } elseif ($items instanceof self) {
                $this->add($items->toArray());
            }

            return $this;
        }
507709
public VarSetBuilder members( IVarDef... members)
    {
    for( IVarDef member : members)
      {
      varSet_.addMember( member);
      }
    return this;
    }
680124
public function join($join = [])
    {
        $this->string['join'] = $this->useBuilder('join')->join($join, $this->getBase()->getTable());
        return $this;
    }
1022279
public static function delete_group_members($members) {
        global $CFG, $DB;
        require_once("$CFG->dirroot/group/lib.php");

        $params = self::validate_parameters(self::delete_group_members_parameters(), array('members'=>$members));

        $transaction = $DB->start_delegated_transaction();

        foreach ($params['members'] as $member) {
            // validate params
            $groupid = $member['groupid'];
            $userid = $member['userid'];

            $group = groups_get_group($groupid, '*', MUST_EXIST);
            $user = $DB->get_record('user', array('id'=>$userid, 'deleted'=>0, 'mnethostid'=>$CFG->mnet_localhost_id), '*', MUST_EXIST);

            // now security checks
            $context = context_course::instance($group->courseid, IGNORE_MISSING);
            try {
                self::validate_context($context);
            } catch (Exception $e) {
                $exceptionparam = new stdClass();
                $exceptionparam->message = $e->getMessage();
                $exceptionparam->courseid = $group->courseid;
                throw new moodle_exception('errorcoursecontextnotvalid' , 'webservice', '', $exceptionparam);
            }
            require_capability('moodle/course:managegroups', $context);

            if (!groups_remove_member_allowed($group, $user)) {
                throw new moodle_exception('errorremovenotpermitted', 'group', '', fullname($user));
            }
            groups_remove_member($group, $user);
        }

        $transaction->allow_commit();
    }
841777
public function addElements(array $elements) {
		foreach ($elements as $name => $element) {
			if (is_string($name)) {
				$this->addElement($element, $name);
			} else {
				$this->addElement($element);
			}
		}
		
		return $this;
	}
246694
protected function CanEdit(Member $member)
    {
        return self::Guard()->Allow(BackendAction::Edit(), $member) && 
                self::Guard()->Allow(BackendAction::UseIt(), new MemberForm());
    }
846763
public function delete($members): int
    {
        if (!is_array($members)) {
            $members = [$members];
        }
        return $this->handle->sRem($this->name, ...$members);
    }
742487
public function set(array $strs)
    {
        if (!empty($strs)) {
            foreach ($strs as $_str) {
                $this->add($_str);
            }
        }
        return $this;
    }
641234
public function set(array $files)
    {
        if (!empty($files)) {
            foreach ($files as $_file) {
                $this->add($_file);
            }
        }
        return $this;
    }
964756
public function addHeaders(array $headers = [])
    {
        $this->headers = [];
        if($headers != []) {
            foreach ($headers as $header) {
                $this->headers[] = $header;
            }
        }
        return $this;
    }
694026
public function group($columns)
    {
        if (null === $this->group) {
            $this->group = $this->element('GROUP BY', $columns);
        } else {
            $this->group->append($columns);
        }

        return $this;
    }
563504
public function addMember($member)
    {
        $member = ($member instanceof Model ? $member->getDn() : $member);

        if (is_null($member)) {
            throw new InvalidArgumentException(
                'Cannot add member to group. The members distinguished name cannot be null.'
            );
        }

        $mod = $this->newBatchModification(
            $this->schema->member(),
            LDAP_MODIFY_BATCH_ADD,
            [$member]
        );

        return $this->addModification($mod)->save();
    }
125861
public function addElements(array $elements): self
    {
        foreach ($elements as $element) {
            if ($element instanceof OpenGraphElement) {
                $this->elements[] = $element->toArray();
            }
        }

        return $this;
    }
1365217
public function sAdd($key, $member, ...$members) {
        return $this->send(array_merge(['sadd', $key], (array) $member, $members));
    }
808032
public function increment(string $member,int $increment = 1) :bool
        {
                return $this->setFieldIncrement($member,$increment);
        }
756076
public long addAll(final String... members) {
        return doWithJedis(new JedisCallable<Long>() {
            @Override
            public Long call(Jedis jedis) {
                return jedis.sadd(getKey(), members);
            }
        });
    }