public function onError(Promisable $promised) { printf("Oh noes: %s\n", (string) $promised->getError()); }
public function onFulfilled(Promisable $promised) { $promised->getLogger()->log("%s: %s\n", $promised->getName(), $promised->getDescription()); /* allow the object to be collected */ $promised->setGarbage(true); }