Normalize the provided data to an array.

@param mixed $data

@return $this
165523
protected function normalizeData( $data )
	{
		// If an object was provided, get its public properties
		if( is_object( $data )) {
			$this->data = get_object_vars( $data );
		}
		else {
			$this->data = $data;
		}

		return $this;
	}
969600
public function transform($data)
    {
        if (is_array($data)) {
            return $data;
        }

        if (is_object($data) && $data instanceof Arrayable) {
            return $data->toArray();
        }

        return (array) $data;
    }
895807
public final function load(array $data): self
    {
        foreach ($data as $key => $value) {
            $this->set($key, $value);
        }

        return $this;
    }
373230
public function mapData(array $data) {
        $this->flush();

        if (!empty($data[$this->primaryKey])) {
            $this->_exists = true;
        }

        $this->_original = Hash::exclude($data, $this->reserved);
        $this->_attributes = $data;

        return $this;
    }
1301911
public function setData($data) {
		$data = json_decode(json_encode($data), true);
		$this->data = array_dot($data);

		return $this;
	}
451874
public function with($data)
    {
        if (\is_array($data)) {
            $data = new Fluent($data);
        }

        $this->data = $data;

        return $this;
    }
63114
protected function normalize(array $data)
    {
        $body = json_encode($data);

        if ($this->length($body) > static::MAX_SIZE) {
            unset($data['events'][0]['metaData']);
        }

        $body = json_encode($data);

        if ($this->length($body) > static::MAX_SIZE) {
            throw new RuntimeException('Payload too large');
        }

        return $data;
    }
1200295
public function addData($data)
    {
        $data = (array) $data;

        if (empty($data)) {
            return $this;
        }

        foreach ($data as $key => $value) {
            $this->setData($key, $value);
        }

        return $this;
    }
1216289
public function fromArray($data)
    {
        if (empty($data)) {
            return $this;
        }
        if (isset($data['type']) && $data['type']) {
            $this->setType($data['type']);
        }
        if (isset($data[$this->getType()]) && $data[$this->getType()]) {
            $this->setValue($data[$this->getType()]);
        }
        return $this;
    }
528417
public function data(array $data)
    {
       if (empty($data)) {
           trigger_error(var_export(debug_backtrace(), true));
       }
       foreach ($data as $key => $value) {
           $this->$key = $value;
       }
       return $this;
    }
1321478
protected function setWithArrayData(array $data)
    {
        if (isset($data[0])) { // multiple rows
            foreach ($data as $row) {
                $this->set($row);
            }
        } else { // multiple values
            foreach ($data as $col => $val) {
                $this->set($col, $val);
            }
            $this->set_row++;
        }
        return $this;
    }
118236
public function setData(array $data)
    {
        $data = $this->setIdFromData($data);

        parent::setData($data);
        return $this;
    }
935137
public function data(array $data)
    {
        $this->columns(array_keys($data))->values(array_values($data));

        return $this;
    }
1294887
public function setData(array $data)
    {
        foreach ($data as $name => $value) {
            if (is_string($name)) {
                $this->__set($name, $value);
            }
        }

        return $this;
    }
605348
protected function normalize(array $data, int $n)
    {
        if (empty($this->means)) {
            $this->calculateMeans($data, $n);
        }

        // Normalize data
        foreach ($data as $i => $row) {
            for ($k = 0; $k < $n; ++$k) {
                $data[$i][$k] -= $this->means[$k];
            }
        }

        return $data;
    }
837646
public function fromArray($data)
    {
        foreach ($data as $key => $value) {
            if (is_int($key) || $this->isFillable($key)) {
                $this->set($key, $value);
            }
        }
        return $this;
    }
1276452
public function setMultiData(array $data = [])
    {
        if (empty($data)) {
            unset($this->query['multi-data']);
        } else {
            $this->query['multi-data'] = $data;
        }
        return $this;
    }