| 1 | <?php |
||
| 14 | class AbstractScriptMethod |
||
| 15 | { |
||
| 16 | /** @var array | null */ |
||
| 17 | protected $currentData = null; |
||
| 18 | |||
| 19 | /** @var bool */ |
||
| 20 | protected $callMade = false; |
||
| 21 | |||
| 22 | /** @var MethodScriptDataProviderInterface */ |
||
| 23 | protected $dataProvider; |
||
| 24 | |||
| 25 | /** @var callback[] */ |
||
| 26 | protected $toDispatch; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Get TM.Scores or SM.Scores. |
||
| 30 | * |
||
| 31 | * @param callback $function |
||
| 32 | * |
||
| 33 | * @return void |
||
| 34 | */ |
||
| 35 | public function get($function) |
||
| 47 | |||
| 48 | |||
| 49 | /** |
||
| 50 | * Set current stores. |
||
| 51 | * |
||
| 52 | * @param array $scores |
||
| 53 | * |
||
| 54 | * @return mixed |
||
| 55 | */ |
||
| 56 | public function set($scores) |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Set current data provider. |
||
| 64 | * |
||
| 65 | * @param MethodScriptDataProviderInterface $dataProvider |
||
| 66 | * |
||
| 67 | * @return mixed |
||
| 68 | */ |
||
| 69 | public function setCurrentDataProvider(MethodScriptDataProviderInterface $dataProvider) |
||
| 73 | |||
| 74 | /** |
||
| 75 | * Dispatch data. |
||
| 76 | */ |
||
| 77 | protected function dispatchData() |
||
| 86 | } |
||
| 87 |