Skip to content

Instantly share code, notes, and snippets.

@wowo
Created September 26, 2011 22:29
Show Gist options
  • Save wowo/1243594 to your computer and use it in GitHub Desktop.
Save wowo/1243594 to your computer and use it in GitHub Desktop.
Closure wrapper handling
<?php
class NewsletterManager implements NewsletterManagerInterface
{
public function getJobFromQueueAndSendMailing(\Closure $logger, $verbose)
{
// [...]
if ($verbose) {
$logger(sprintf("Sent message:\n%s", $message->toString()));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment