Build.

@param  array        $data
@param  string|array $value
@return void
964250
public function build($args)
    {
        foreach ($this->fields as $field) {
            $args = Cuztom::merge($field, [
                'metaBox'  => $this->metaBox,
                'metaType' => $this->metaType,
                'object'   => $this->object,
            ]);

            $field = Field::create($args, $this->value);

            $data[$field->id] = $field;
        }

        return $data;
    }
221739
public function append($name, $value)
    {
        if (is_array($this->_data[$name])) {
            $this->_data[$name][] = $value;
        } else {
            $this->_data[$name] .= $value;
        }

        return $this;
    }
832833
public function set($name, $value) {
        $data = array();
        $dataPointer = &$data;
        $parents = explode('.', $name);
        $name = array_pop($parents);
        foreach ($parents as $parent) {
            $dataPointer[$parent] = array();
            $dataPointer = &$dataPointer[$parent];
        }
        $dataPointer[$name] = $value;
        $this->load($data);
    }
33387
public function build()
    {
        if ($this->builded) {
            return;
        }

        $collection = $this->processFilter(false);

        $data = $collection->toArray();

        $this->prependRowSelectorColumn();
        $this->appendActionsColumn();

        Column::setOriginalGridModels($collection);

        $this->columns->map(function (Column $column) use (&$data) {
            $data = $column->fill($data);

            $this->columnNames[] = $column->getName();
        });

        $this->buildRows($data);

        $this->builded = true;
    }
1071882
public static function set(array &$data, $key, $value)
    {
        $segments = explode('.', $key);

        $key = array_pop($segments);

        // iterate through all of $segments except the last one
        foreach ($segments as $segment) {
            if (!array_key_exists($segment, $data)) {
                $data[$segment] = array();
            } elseif (!is_array($data[$segment])) {
                throw new \UnexpectedValueException('Non-array segment encountered');
            }

            $data = &$data[$segment];
        }

        $data[$key] = $value;
    }
781648
public function build()
    {
        parent::build();

        $value = $this->validator->arrayGet($this->suppliedOptions, 'value', true);

        //we need to set the value to 'false' when it is falsey so it plays nicely with select2
        if (!$value && $value !== '') {
            $this->suppliedOptions['value'] = 'false';
        }
    }
1297697
protected function buildRows(array $data)
    {
        $this->rows = collect($data)->map(function ($model, $number) {
            return new Row($number, $model);
        });

        if ($this->rowsCallback) {
            $this->rows->map($this->rowsCallback);
        }
    }
161058
public function addValue($value)
    {
        $this->values = array_values(
            array_unique(
                array_merge($this->values, $this->prepareValues($value))
            )
        );
    }
834415
public function build( $data = null, $type = null ) {

		if ( ! empty( $data ) ) {
			$this->set_data( $data );
		}

		if ( ! empty( $type ) && in_array( $type, $this->types, true ) ) {
			$this->type = $type;
		}

		if ( method_exists( $this, "build_{$this->type}" ) ) {
			call_user_func( array( $this, 'build_' . $this->type ) );
		}

		return $this->data;
	}
233030
public function set(array $data)
    {
        $this->data = [];
        $this->replace = false;

        foreach ($data as $key => $value) {
            $this->add($key, $value);
        }
    }
922440
public function set($name, $value = null)
    {
        if (!is_array($name)) {
            $this->data[$name] = $value;
        } else {
            foreach ($name as $key => $value) {
                $this->data[$key] = $value;
            }
        }
        return $this;
    }
454169
public function setValue($value) : void
    {
        if (is_object($value) && !($value instanceof ArrayObject)) {
            $this->class = $value;
            if (isset($this->value)) {
                $old = clone $this->value;
                $work = clone $value;
                if ($work instanceof JsonSerializable) {
                    $work = $work->jsonSerialize();
                }
                foreach ($work as $prop => $status) {
                    $value->$prop = isset($old->$prop) ? $old->$prop : false;
                }
            }
            $this->value = $value;
        }
        if (!isset($this->value)) {
            $this->value = clone $this->class;
        }
        if (is_array($value) || $value instanceof ArrayObject) {
            $work = clone $this->value;
            if ($work instanceof JsonSerializable) {
                $work = $work->jsonSerialize();
            }
            foreach ($work as $prop => $status) {
                $this->value->$prop = false;
            }
            foreach ($value as $prop) {
                if (is_string($prop) && $this->hasBit($prop) && isset($this->value->$prop)) {
                    $this->value->$prop = true;
                }
            }
        }
        $found = [];
        foreach ((array)$this as $element) {
            if ($element->getElement() instanceof Hidden) {
                continue;
            }
            $check = $element->getElement()->getValue();
            if (isset($this->value->$check) && $this->value->$check) {
                $element->getElement()->check();
            } else {
                $element->getElement()->check(false);
            }
            $found[] = $check;
        }
    }
633259
public function setValue($value)
    {
        $this->value = [];

        $token = ' ,;';
        $values = strtok($value, $token);

        while ($values !== false) {
            $this->value[] = $values;
            $values = strtok($token);
        }
    }
926389
public function applyData ( $data = NULL ) {
        if (NULL != $data && is_array( $data )) {
            foreach ($data as $propName => $propValue) {
                $this->assignValue( $propName, $propValue );
            }
        } else {
            $this->buildVars();
        }
    }
1236154
public function build(array $data = array())
    {
        $data += array(
            'page' => 1,
            'limit' => 0,
            'total' => 0,
            'mini' => false,
            'max_pages' => 10,
            'query' => array()
        );

        $this->setPage($data['page'])
            ->setPerPage($data['limit'])
            ->setTotal($data['total'])
            ->setMaxPages($data['max_pages'])
            ->setUrlPattern('?' . urldecode(http_build_query($data['query'])));

        return $this;
    }
737712
public function addData($key, $value)
    {
        if (isset($this->data[$key])) {
            $this->data[$key] = array_merge_recursive(
                $this->data[$key],
                $value
            );
        } else {
            $this->setData($key, $value);
        }
    }
140292
public function set($data, $value = null)
    {
        //argument 1 must be an array or string
        Argument::i()->test(1, 'array', 'string');

        if (is_array($data)) {
            $this->data = $data;
            return $this;
        }

        $this->data[$data] = $value;

        return $this;
    }