public function __construct() { parent::__construct(); $factory = $this; $factory->define('SelectLoop', function () { return new SelectLoop(); }); }