| 1 | <?php |
||
| 5 | class Slide |
||
| 6 | { |
||
| 7 | protected $show; |
||
| 8 | protected $type; |
||
| 9 | protected $playOrder; |
||
| 10 | protected $index; |
||
| 11 | |||
| 12 | public static function fromScheduledShow($show) |
||
| 21 | |||
| 22 | public static function fromEvent($event) |
||
| 31 | |||
| 32 | public function playOrder($playOrder) |
||
| 36 | |||
| 37 | public function displayText() |
||
| 56 | |||
| 57 | public function image() |
||
| 66 | |||
| 67 | public function textStyle() |
||
| 76 | |||
| 77 | public function url() |
||
| 86 | |||
| 87 | public function type() |
||
| 91 | |||
| 92 | public function index($index) |
||
| 96 | |||
| 97 | public function displayIndex() |
||
| 107 | } |
||
| 108 |
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: