Skip to content

Instantly share code, notes, and snippets.

@fesor
Created December 2, 2015 11:08
Show Gist options
  • Save fesor/dfb7f2894f620304d72e to your computer and use it in GitHub Desktop.
Save fesor/dfb7f2894f620304d72e to your computer and use it in GitHub Desktop.
<?php
interface Reporter {
/** @return string */
public function getSupportedContext();
/** @return array */
public function getHandlers();
}
class MySQLFeedReporter implements Reporter {
public function getHandlers() {
return [
'totalSummary' => 'getTotalSummary'
];
}
public function getTotalSummary () {
return // some logic
}
}
class RedisFeedReporter implements Reporter {
public function getHandlers() {
return [
'totalSummary' => 'getTotalSummary'
];
}
}
class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment