get('collection'); register_shutdown_function(function () { static::complete(); }); } return static::$collection; } /** * Call the complete method of all of the registered objects. */ public static function complete() { // Run the collection of tasks. This will also run the // completion tasks. $collection = static::getCollection(); $collection->run(); // Make sure that our completion functions do not run twice. $collection->reset(); } }