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
|
|
|
use Ajax\semantic\traits\SemanticHtmlCollectionsTrait; |
23
|
|
|
|
24
|
|
|
class Semantic extends BaseGui { |
25
|
|
|
use SemanticComponentsTrait,SemanticHtmlElementsTrait,SemanticHtmlCollectionsTrait; |
26
|
|
|
public function __construct($autoCompile=true) { |
27
|
|
|
parent::__construct($autoCompile=true); |
28
|
|
|
} |
29
|
|
|
|
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* @param string $identifier |
33
|
|
|
* @param array $items |
34
|
|
|
* @return Ajax\semantic\html\collections\HtmlMenu |
35
|
|
|
*/ |
36
|
|
|
public function htmlMenu($identifier,$items=array()){ |
37
|
|
|
return $this->addHtmlComponent(new HtmlMenu($identifier,$items)); |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
/**Adds an icon menu |
41
|
|
|
* @param string $identifier |
42
|
|
|
* @param array $items icons |
43
|
|
|
*/ |
44
|
|
|
public function htmlIconMenu($identifier,$items=array()){ |
45
|
|
|
return $this->addHtmlComponent(new HtmlIconMenu($identifier,$items)); |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
/**Adds an labeled icon menu |
49
|
|
|
* @param string $identifier |
50
|
|
|
* @param array $items icons |
51
|
|
|
*/ |
52
|
|
|
public function htmlLabeledIconMenu($identifier,$items=array()){ |
53
|
|
|
return $this->addHtmlComponent(new HtmlLabeledIconMenu($identifier,$items)); |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* @param string $identifier |
58
|
|
|
* @param string $value |
59
|
|
|
* @param array $items |
60
|
|
|
*/ |
61
|
|
|
public function htmlDropdown($identifier, $value="", $items=array()){ |
62
|
|
|
return $this->addHtmlComponent(new HtmlDropdown($identifier,$value,$items)); |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* Adds a new message |
67
|
|
|
* @param string $identifier |
68
|
|
|
* @param string $content |
69
|
|
|
*/ |
70
|
|
|
public function htmlMessage($identifier, $content=""){ |
71
|
|
|
return $this->addHtmlComponent(new HtmlMessage($identifier,$content)); |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* @param string $identifier |
76
|
|
|
* @param mixed $content |
77
|
|
|
*/ |
78
|
|
|
public function htmlPopup(BaseHtml $container,$identifier,$content){ |
79
|
|
|
return $this->addHtmlComponent(new HtmlPopup($container,$identifier,$content)); |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* @param string $identifier |
84
|
|
|
* @param int $numRows |
85
|
|
|
* @param int $numCols |
86
|
|
|
* @param boolean $createCols |
87
|
|
|
* @param boolean $implicitRows |
88
|
|
|
*/ |
89
|
|
|
public function htmlGrid($identifier,$numRows=1,$numCols=NULL,$createCols=true,$implicitRows=false){ |
90
|
|
|
return $this->addHtmlComponent(new HtmlGrid($identifier,$numRows,$numCols,$createCols,$implicitRows)); |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
|
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* Return a new Semantic Html Breadcrumb |
97
|
|
|
* @param string $identifier |
98
|
|
|
* @param array $elements |
|
|
|
|
99
|
|
|
* @param boolean $autoActive sets the last element's class to <b>active</b> if true. default : true |
100
|
|
|
* @param function $hrefFunction the function who generates the href elements. default : function($e){return $e->getContent()} |
101
|
|
|
* @return HtmlBreadcrumb |
102
|
|
|
*/ |
103
|
|
|
public function htmlBreadcrumb( $identifier,$items=array(),$autoActive=true,$startIndex=0,$hrefFunction=NULL){ |
104
|
|
|
return $this->addHtmlComponent(new HtmlBreadcrumb($identifier,$items,$autoActive,$startIndex,$hrefFunction)); |
105
|
|
|
} |
106
|
|
|
|
107
|
|
|
/** |
108
|
|
|
* Return a new Semantic Accordion |
109
|
|
|
* @param string $identifier |
110
|
|
|
* @return HtmlAccordion |
111
|
|
|
*/ |
112
|
|
|
public function htmlAccordion($identifier) { |
113
|
|
|
return $this->addHtmlComponent(new HtmlAccordion($identifier)); |
114
|
|
|
} |
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* Return a new Semantic Menu Accordion |
118
|
|
|
* @param string $identifier |
119
|
|
|
* @return HtmlAccordion |
120
|
|
|
*/ |
121
|
|
|
public function htmlAccordionMenu($identifier,$items=array()) { |
122
|
|
|
return $this->addHtmlComponent(new HtmlAccordionMenu($identifier,$items)); |
123
|
|
|
} |
124
|
|
|
|
125
|
|
|
/** |
126
|
|
|
* Return a new Semantic Form |
127
|
|
|
* @param string $identifier |
128
|
|
|
* @param array $elements |
129
|
|
|
*/ |
130
|
|
|
public function htmlForm($identifier,$elements=array()) { |
131
|
|
|
return $this->addHtmlComponent(new HtmlForm($identifier,$elements)); |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
public function htmlSticky($identifier,$content=array()) { |
135
|
|
|
return $this->addHtmlComponent(new HtmlSticky($identifier,$content)); |
136
|
|
|
} |
137
|
|
|
} |
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.