| 1 | <?php |
||
| 5 | trait NavElementTrait{ |
||
| 6 | /** |
||
| 7 | * Generate the jquery script to set the elements to the HtmlNavElement |
||
| 8 | * @param JsUtils $jsUtils |
||
| 9 | */ |
||
| 10 | public function jsSetContent(JsUtils $jsUtils){ |
||
| 13 | |||
| 14 | public function getRoot() { |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Define the html attribute for each element url in ajax |
||
| 27 | * @param string $attr html attribute |
||
| 28 | * @return HtmlNavElement |
||
| 29 | */ |
||
| 30 | public function setAttr($attr) { |
||
| 34 | |||
| 35 | public function __call($method, $args) { |
||
| 43 | |||
| 44 | abstract public function fromDispatcher(JsUtils $js,$dispatcher,$startIndex=0); |
||
| 45 | } |
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: