| Total Complexity | 3 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | abstract class MediaFlag extends CWidget |
||
| 11 | { |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var string the media file name |
||
| 15 | */ |
||
| 16 | public $file; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var string the base URL to the flag icons |
||
| 20 | */ |
||
| 21 | private $_iconBaseDir; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Initializes the widget |
||
| 25 | */ |
||
| 26 | public function init() |
||
| 27 | { |
||
| 28 | $this->_iconBaseDir = Yii::app()->baseUrl.'/images/xbmc-media-flags'; |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Runs the widget. If an icon can be determined it will be rendered. |
||
| 33 | */ |
||
| 34 | public function run() |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Returns the name of the icon file that should be displayed, without the |
||
| 44 | * file extension, e.g. "50px-720". If no icon can be determined, false is returned |
||
| 45 | * @return string|false the icon name |
||
| 46 | */ |
||
| 47 | abstract protected function getIcon(); |
||
| 48 | } |
||
| 49 |