system/Entity.php
public function fill(array $data)
	{
		foreach ($data as $key => $value)
		{
			$key = $this->mapProperty($key);

			$method = 'set' . str_replace(' ', '', ucwords(str_replace(['-', '_'], ' ', $key)));

			if (method_exists($this, $method))
			{
				$this->$method($value);
			}
			elseif (property_exists($this, $key))
			{
				$this->$key = $value;
			}
		}

		return $this;
	}
public function fill(array $data)
	{
		foreach ($data as $key => $value)
		{
			$key = $this->mapProperty($key);

			$method = 'set' . str_replace(' ', '', ucwords(str_replace(['-', '_'], ' ', $key)));

			if (method_exists($this, $method))
			{
				$this->$method($value);
			}
			elseif (property_exists($this, $key))
			{
				$this->$key = $value;
			}
		}

		return $this;
	}
Takes an array of key/value pairs and sets them as
class properties, using any `setCamelCasedProperty()` methods
that may or may not exist.

@param array $data

@return \CodeIgniter\Entity