Created
December 2, 2015 11:08
-
-
Save fesor/dfb7f2894f620304d72e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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