| Total Complexity | 7 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class Module |
||
| 6 | { |
||
| 7 | protected $module; |
||
| 8 | |||
| 9 | protected $data; |
||
| 10 | |||
| 11 | protected $images; |
||
| 12 | |||
| 13 | protected $name; |
||
| 14 | |||
| 15 | public function __construct($module) |
||
| 16 | { |
||
| 17 | $this->module = (object)$module; |
||
| 18 | $this->data = $this->module->data; |
||
| 19 | $this->name = $this->module->name; |
||
| 20 | } |
||
| 21 | |||
| 22 | public function getName() |
||
| 23 | { |
||
| 24 | return $this->name; |
||
| 25 | } |
||
| 26 | |||
| 27 | public function getData() |
||
| 28 | { |
||
| 29 | return $this->data; |
||
| 30 | } |
||
| 31 | |||
| 32 | public function getModuleName() |
||
| 33 | { |
||
| 34 | return $this->name; |
||
| 35 | } |
||
| 36 | |||
| 37 | public function getModelName() |
||
| 38 | { |
||
| 39 | return ucfirst(camel_case(str_singular($this->name))); |
||
| 40 | } |
||
| 41 | |||
| 42 | public function getModelNamePlural() |
||
| 45 | } |
||
| 46 | |||
| 47 | public function getModelNameSingularLowercase() |
||
| 48 | { |
||
| 49 | return str_singular($this->name); |
||
| 50 | } |
||
| 51 | } |
||
| 52 |