src/SnooPHP/Model/Collection.php
public function each(Callable $iterator)
	{
		// No callable specified
		if (!$iterator)
		{
			error_log("no callable specified");
			return $this;
		}

		foreach ($this->models as $i => $model)
		{
			do $ctrl = call_user_func_array($iterator, array(&$this->models[$i], $i)); while ($ctrl === true);
			if ($ctrl === false) break;
		}

		return $this;
	}
public function each(Callable $iterator)
	{
		// No callable specified
		if (!$iterator)
		{
			error_log("no callable specified");
			return $this;
		}

		foreach ($this->models as $i => $model)
		{
			do $ctrl = call_user_func_array($iterator, array(&$this->models[$i], $i)); while ($ctrl === true);
			if ($ctrl === false) break;
		}

		return $this;
	}
Run function on each model instance (can only modify instance property)

@param Callable	$iterator	function called on every element of the collection.
Return true to repeat on current instance, return false to break.
Note that you should define the parameter as a reference in order to affect it.

@return static return this collection