| 1 | <?php namespace XoopsModules\Smartobject; |
||
| 24 | class ObjectColumn |
||
| 25 | { |
||
| 26 | public $_keyname; |
||
| 27 | public $_align; |
||
| 28 | public $_width; |
||
| 29 | public $_customMethodForValue; |
||
| 30 | public $_extraParams; |
||
| 31 | public $_sortable; |
||
| 32 | public $_customCaption; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * SmartObjectColumn constructor. |
||
| 36 | * @param $keyname |
||
| 37 | * @param string $align |
||
| 38 | * @param bool $width |
||
| 39 | * @param bool $customMethodForValue |
||
| 40 | * @param bool $param |
||
| 41 | * @param bool $customCaption |
||
| 42 | * @param bool $sortable |
||
| 43 | */ |
||
| 44 | public function __construct( |
||
| 61 | |||
| 62 | public function getKeyName() |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @return string |
||
| 69 | */ |
||
| 70 | public function getAlign() |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @return bool |
||
| 77 | */ |
||
| 78 | public function isSortable() |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @return bool|string |
||
| 85 | */ |
||
| 86 | public function getWidth() |
||
| 96 | |||
| 97 | /** |
||
| 98 | * @return bool |
||
| 99 | */ |
||
| 100 | public function getCustomCaption() |
||
| 104 | } |
||
| 105 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: