This method is responsible for factorying a new instance of a single entity object of correct type, matching the current data source class.

Parameters

  • string $model A fully-namespaced class name representing the model class to which the `Entity` object will be bound.
  • array $data The default data with which the new `Entity` should be populated.
  • array $options Any additional options to pass to the `Entity`'s constructor

Returns

object Returns a new, un-saved `Entity` object bound to the model class specified in `$model`.

Source

						public function item($model, array $data = array(), array $options = array()) {
		$defaults = array('class' => 'entity');
		$options += $defaults;

		$class = $options['class'];
		unset($options['class']);
		return $this->_instance($class, compact('model', 'data') + $options);
	}