1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Ajax; |
4
|
|
|
|
5
|
|
|
use Ajax\common\BaseGui; |
6
|
|
|
use Ajax\semantic\html\collections\menus\HtmlMenu; |
7
|
|
|
use Ajax\semantic\html\modules\HtmlDropdown; |
8
|
|
|
use Ajax\semantic\html\collections\HtmlMessage; |
9
|
|
|
use Ajax\semantic\html\modules\HtmlPopup; |
10
|
|
|
use Ajax\common\html\BaseHtml; |
11
|
|
|
use Ajax\semantic\html\collections\HtmlGrid; |
12
|
|
|
use Ajax\semantic\html\collections\menus\HtmlIconMenu; |
13
|
|
|
use Ajax\semantic\html\collections\menus\HtmlLabeledIconMenu; |
14
|
|
|
use Ajax\semantic\html\collections\HtmlBreadcrumb; |
15
|
|
|
use Ajax\semantic\html\modules\HtmlAccordion; |
16
|
|
|
use Ajax\semantic\components\Accordion; |
17
|
|
|
use Ajax\semantic\html\collections\menus\HtmlAccordionMenu; |
18
|
|
|
use Ajax\semantic\html\collections\form\HtmlForm; |
19
|
|
|
use Ajax\semantic\traits\SemanticComponentsTrait; |
20
|
|
|
use Ajax\semantic\traits\SemanticHtmlElementsTrait; |
21
|
|
|
use Ajax\semantic\html\modules\HtmlSticky; |
22
|
|
|
|
23
|
|
|
class Semantic extends BaseGui { |
24
|
|
|
use SemanticComponentsTrait,SemanticHtmlElementsTrait; |
25
|
|
|
public function __construct($autoCompile=true) { |
26
|
|
|
parent::__construct($autoCompile=true); |
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @param string $identifier |
32
|
|
|
* @param array $items |
33
|
|
|
* @return Ajax\semantic\html\collections\HtmlMenu |
34
|
|
|
*/ |
35
|
|
|
public function htmlMenu($identifier,$items=array()){ |
36
|
|
|
return $this->addHtmlComponent(new HtmlMenu($identifier,$items)); |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
/**Adds an icon menu |
40
|
|
|
* @param string $identifier |
41
|
|
|
* @param array $items icons |
42
|
|
|
*/ |
43
|
|
|
public function htmlIconMenu($identifier,$items=array()){ |
44
|
|
|
return $this->addHtmlComponent(new HtmlIconMenu($identifier,$items)); |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
/**Adds an labeled icon menu |
48
|
|
|
* @param string $identifier |
49
|
|
|
* @param array $items icons |
50
|
|
|
*/ |
51
|
|
|
public function htmlLabeledIconMenu($identifier,$items=array()){ |
52
|
|
|
return $this->addHtmlComponent(new HtmlLabeledIconMenu($identifier,$items)); |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* @param string $identifier |
57
|
|
|
* @param string $value |
58
|
|
|
* @param array $items |
59
|
|
|
*/ |
60
|
|
|
public function htmlDropdown($identifier, $value="", $items=array()){ |
61
|
|
|
return $this->addHtmlComponent(new HtmlDropdown($identifier,$value,$items)); |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* Adds a new message |
66
|
|
|
* @param string $identifier |
67
|
|
|
* @param string $content |
68
|
|
|
*/ |
69
|
|
|
public function htmlMessage($identifier, $content=""){ |
70
|
|
|
return $this->addHtmlComponent(new HtmlMessage($identifier,$content)); |
71
|
|
|
} |
72
|
|
|
|
73
|
|
|
/** |
74
|
|
|
* @param string $identifier |
75
|
|
|
* @param mixed $content |
76
|
|
|
*/ |
77
|
|
|
public function htmlPopup(BaseHtml $container,$identifier,$content){ |
78
|
|
|
return $this->addHtmlComponent(new HtmlPopup($container,$identifier,$content)); |
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* @param string $identifier |
83
|
|
|
* @param int $numRows |
84
|
|
|
* @param int $numCols |
85
|
|
|
* @param boolean $createCols |
86
|
|
|
* @param boolean $implicitRows |
87
|
|
|
*/ |
88
|
|
|
public function htmlGrid($identifier,$numRows=1,$numCols=NULL,$createCols=true,$implicitRows=false){ |
89
|
|
|
return $this->addHtmlComponent(new HtmlGrid($identifier,$numRows,$numCols,$createCols,$implicitRows)); |
90
|
|
|
} |
91
|
|
|
|
92
|
|
|
|
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* Return a new Semantic Html Breadcrumb |
96
|
|
|
* @param string $identifier |
97
|
|
|
* @param array $elements |
|
|
|
|
98
|
|
|
* @param boolean $autoActive sets the last element's class to <b>active</b> if true. default : true |
99
|
|
|
* @param function $hrefFunction the function who generates the href elements. default : function($e){return $e->getContent()} |
100
|
|
|
* @return HtmlBreadcrumb |
101
|
|
|
*/ |
102
|
|
|
public function htmlBreadcrumb( $identifier,$items=array(),$autoActive=true,$startIndex=0,$hrefFunction=NULL){ |
103
|
|
|
return $this->addHtmlComponent(new HtmlBreadcrumb($identifier,$items,$autoActive,$startIndex,$hrefFunction)); |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* Return a new Semantic Accordion |
108
|
|
|
* @param string $identifier |
109
|
|
|
* @return HtmlAccordion |
110
|
|
|
*/ |
111
|
|
|
public function htmlAccordion($identifier) { |
112
|
|
|
return $this->addHtmlComponent(new HtmlAccordion($identifier)); |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
/** |
116
|
|
|
* Return a new Semantic Menu Accordion |
117
|
|
|
* @param string $identifier |
118
|
|
|
* @return HtmlAccordion |
119
|
|
|
*/ |
120
|
|
|
public function htmlAccordionMenu($identifier,$items=array()) { |
121
|
|
|
return $this->addHtmlComponent(new HtmlAccordionMenu($identifier,$items)); |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* Return a new Semantic Form |
126
|
|
|
* @param string $identifier |
127
|
|
|
* @param array $elements |
128
|
|
|
*/ |
129
|
|
|
public function htmlForm($identifier,$elements=array()) { |
130
|
|
|
return $this->addHtmlComponent(new HtmlForm($identifier,$elements)); |
131
|
|
|
} |
132
|
|
|
|
133
|
|
|
public function htmlSticky($identifier,$content=array()) { |
134
|
|
|
return $this->addHtmlComponent(new HtmlSticky($identifier,$content)); |
135
|
|
|
} |
136
|
|
|
} |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.