Set an existing board
@param array $board The board array
@return array
194555
public function setBoard(array $board)
    {
        $this->board->setBoard($board);

        $this->positions = $this->winningPositions();

        $this->isFinished();
    }
1364089
public function setPostfields(array $array)
	{
		if (!is_null($this->getGetfield()))
		{
			throw new \Exception('You can only choose get OR post fields (post fields include put).');
		}
		if (isset($array['status']) && substr($array['status'], 0, 1) === '@')
		{
			$array['status'] = sprintf("\0%s", $array['status']);
		}
		foreach ($array as $key => &$value)
		{
			if (is_bool($value))
			{
				$value = ($value === true) ? 'true' : 'false';
			}
		}
		$this->postfields = $array;
		// rebuild oAuth
		if (isset($this->oauth['oauth_signature']))
		{
			$this->buildOauth($this->url, $this->requestMethod);
		}
		return $this;
	}
564136
public function set(array $data)
    {
        foreach ($data as $key => $value) {
            if (method_exists($this, 'set' . $key)) {
                $this->{'set' . $key}($value);
            } else if ($this->customParamsPrefix . $this->shopCommissionCustomParamKey === $key) {
                $this->setShopCommission($value);
            } else if (0 === strpos($key, $this->customParamsPrefix)) {
                $this->setCustomParam(substr($key, 4), $value);
            }
        }

        $this->auth->set($data);
        $this->client->set($data);

        return $this;
    }
30238
public function initFromArray(array $data) {

        $unknownFields = [];

        foreach ($data as $k => $v) {

            if (empty($v)) {
                continue;
            }

            $setter = 'set' . ucfirst(str_replace('_', '', ucwords($k, '_')));

            if (method_exists($this, $setter)) {
                $this->{$setter}($v);
                continue;
            }

            $unknownFields[$k] = $v;

        }

        if (!empty($unknownFields)) {
            trigger_error('Encountered unknown fields in response: ' . json_encode($unknownFields));
        }

        return $this;

    }
201862
protected function setIdFromData(array $data)
    {
        $key = $this->key();
        if (isset($data[$key])) {
            $this->setId($data[$key]);
            unset($data[$key]);
        }

        return $data;
    }
1036680
public function setData(array $data)
    {
        foreach ($data as $key => $val) {
            $setter = $this->setter($key);
            if (is_callable([ $this, $setter ])) {
                $this->{$setter}($val);
            } else {
                $this->{$key} = $val;
            }
        }

        return $this;
    }
975678
public function set(array $tags)
    {
        if (!empty($tags)) {
            foreach ($tags as $_tag) {
                $this->add($_tag);
            }
        }
        return $this;
    }
800013
def modify(board, opts=None):
    
    opts = get_opts(opts)
    if opts['board'] is not None:
        board.tiles = _read_tiles_from_string(opts['board'])
    else:
        board.tiles = _generate_tiles(opts['terrain'], opts['numbers'])
    board.ports = _get_ports(opts['ports'])
    board.state = catan.states.BoardStateModifiable(board)
    board.pieces = _get_pieces(board.tiles, board.ports, opts['players'], opts['pieces'])
    return None
652779
public function setItems(array $items)
    {
        $this->items = $items;
        $this->names = array_keys($items);

        return $this;
    }
1080899
public function getMeBoards(array $data = [])
    {
        $response = $this->request->get("me/boards", $data);
        return new Collection($this->master, $response, "Board");
    }
471157
public function getAllForBoard($boardId)
    {
        $boardId = (int) $boardId;
        if ($boardId <= 0) {
            throw new Exception('Invalid param boardId');
        }

        return $this->rest->get("portfolio/boards/$boardId/columns");
    }
896345
public function setRules(array $rules)
    {
        $this->initialRules = $rules;

        $this->rules = [];

        $this->addRules($rules);

        return $this;
    }
754502
public function setGroup(array $group)
    {
        try {

            // need to return << true
            $this->validator->verify($group, [
                'isArray', 'isNotEmpty', 'isExists'
            ], 'group');

        }
        catch(ExceptionFactory $e) {
            echo $e->getMessage();
        }

        return $this;
    }
586130
public function edit($board_id, array $data, $fields = null)
    {
        $query = (!$fields) ? array() : array("fields" => $fields);

        $response = $this->request->update(sprintf("boards/%s", $board_id), $data, $query);
        return new Board($this->master, $response);
    }
640655
def boards
      boards = Board.from_response client.get("/organizations/#{id}/boards/all")
      MultiAssociation.new(self, boards).proxy
    end
271337
public function set(array $data)
    {
        foreach ($data as $key => $value) {
            if (method_exists($this, 'set' . $key)) {
                $this->{'set' . $key}($value);
            }
        }

        return $this;
    }
303875
public function setValues(array $data): self
    {
        if (isset($data['values']) && !empty($data['values'])) {
            foreach ($data['values'] as $value) {
                $this->values[] = Value::create($value['value'], $value['end_time']);
            }
        }

        return $this;
    }