| Total Complexity | 4 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class BackendManager extends CApplicationComponent |
||
| 11 | { |
||
| 12 | |||
| 13 | const SESSION_KEY = 'currentBackendId'; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var Backend the current backend |
||
| 17 | */ |
||
| 18 | private $_backend; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Initializes the component. The backend to use is chosen here. If a |
||
| 22 | * current backend is stored in the session we use that, otherwise we fall |
||
| 23 | * back on whatever backend is set as default. |
||
| 24 | */ |
||
| 25 | public function init() |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return Backend the current backend, or null if no backend is configured |
||
| 39 | */ |
||
| 40 | public function getCurrent() |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Sets the default backend |
||
| 47 | * @param Backend $backend |
||
| 48 | */ |
||
| 49 | public function setCurrent($backend) |
||
| 54 | } |