Skip to content

Commit 35deb2a

Browse files
committed
Delete PhalconUtils + Fix sl bugs
1 parent e33ab32 commit 35deb2a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+103
-148
lines changed

Ajax/Bootstrap.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,10 @@
33
namespace Ajax;
44

55
use Ajax\common\BaseGui;
6-
use Ajax\bootstrap\components\Modal;
7-
use Ajax\bootstrap\components\Dropdown;
8-
use Ajax\bootstrap\components\Carousel;
96
use Ajax\bootstrap\html\HtmlButton;
107
use Ajax\bootstrap\html\HtmlButtongroups;
118
use Ajax\bootstrap\html\HtmlGlyphButton;
129
use Ajax\bootstrap\html\HtmlDropdown;
13-
use Ajax\bootstrap\components\Splitbutton;
1410
use Ajax\bootstrap\html\HtmlButtontoolbar;
1511
use Ajax\bootstrap\html\HtmlNavbar;
1612
use Ajax\bootstrap\html\HtmlProgressbar;
@@ -220,7 +216,7 @@ public function htmlInputgroup($identifier){
220216
* @param string $identifier
221217
* @param array $elements
222218
* @param boolean $autoActive sets the last element's class to <b>active</b> if true. default : true
223-
* @param function $hrefFunction the function who generates the href elements. default : function($e){return $e->getContent()}
219+
* @param callable $hrefFunction the function who generates the href elements. default : function($e){return $e->getContent()}
224220
* @return HtmlBreadcrumbs
225221
*/
226222
public function htmlBreadcrumbs($identifier,$elements=array(),$autoActive=true,$startIndex=0,$hrefFunction=NULL){

Ajax/JqueryUI.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,101 +34,101 @@ public function __construct($autoCompile=true) {
3434

3535
/**
3636
* Retourne un composant Dialog
37-
* @return \Ajax\Components\Dialog
37+
* @return Dialog
3838
*/
3939
public function dialog($attachTo=NULL, $params=NULL) {
4040
return $this->addComponent(new Dialog($this->js), $attachTo, $params);
4141
}
4242

4343
/**
4444
* Retourne un composant Accordion
45-
* @return \Ajax\Components\Accordion
45+
* @return Accordion
4646
*/
4747
public function accordion($attachTo=NULL, $params=NULL) {
4848
return $this->addComponent(new Accordion($this->js), $attachTo, $params);
4949
}
5050

5151
/**
5252
* Retourne un composant Menu
53-
* @return \Ajax\Components\Menu
53+
* @return Menu
5454
*/
5555
public function menu($attachTo=NULL, $params=NULL) {
5656
return $this->addComponent(new Menu($this->js), $attachTo, $params);
5757
}
5858

5959
/**
6060
* Retourne un composant Progressbar
61-
* @return \Ajax\Components\Progressbar
61+
* @return Progressbar
6262
*/
6363
public function progressbar($attachTo=NULL, $params=NULL) {
6464
return $this->addComponent(new Progressbar($this->js), $attachTo, $params);
6565
}
6666

6767
/**
6868
* Retourne un composant Selectmenu
69-
* @return \Ajax\Components\Selectmenu
69+
* @return Selectmenu
7070
*/
7171
public function selectmenu($attachTo=NULL, $params=NULL) {
7272
return $this->addComponent(new Selectmenu($this->js), $attachTo, $params);
7373
}
7474

7575
/**
7676
* Retourne un composant Slider
77-
* @return \Ajax\Components\Slider
77+
* @return Slider
7878
*/
7979
public function slider($attachTo=NULL, $params=NULL) {
8080
return $this->addComponent(new Slider($this->js), $attachTo, $params);
8181
}
8282

8383
/**
8484
* Retourne un composant Spinner
85-
* @return \Ajax\Components\Spinner
85+
* @return Spinner
8686
*/
8787
public function spinner($attachTo=NULL, $params=NULL) {
8888
return $this->addComponent(new Spinner($this->js), $attachTo, $params);
8989
}
9090

9191
/**
9292
* Retourne un composant Autocomplete
93-
* @return \Ajax\Components\Autocomplete
93+
* @return Autocomplete
9494
*/
9595
public function autocomplete($attachTo=NULL, $params=NULL) {
9696
return $this->addComponent(new Autocomplete($this->js), $attachTo, $params);
9797
}
9898

9999
/**
100100
* Create and return a Tabs component
101-
* @return \Ajax\Components\Tabs
101+
* @return Tabs
102102
*/
103103
public function tabs($attachTo=NULL, $params=NULL) {
104104
return $this->addComponent(new Tabs($this->js), $attachTo, $params);
105105
}
106106

107107
/**
108108
* Create and return a Button component
109-
* @param $attachTo css/jquery selector attached to the component
110-
* @param $params php array of parameters
111-
* @return \Ajax\Components\Button
109+
* @param string $attachTo css/jquery selector attached to the component
110+
* @param array $params php array of parameters
111+
* @return Button
112112
*/
113113
public function button($attachTo=NULL, $params=NULL) {
114114
return $this->addComponent(new Button($this->js), $attachTo, $params);
115115
}
116116

117117
/**
118118
* Create and return a ButtonSet component
119-
* @param $attachTo css/jquery selector attached to the component
120-
* @param $params php array of parameters
121-
* @return \Ajax\Components\ButtonSet
119+
* @param string $attachTo css/jquery selector attached to the component
120+
* @param array $params php array of parameters
121+
* @return ButtonSet
122122
*/
123123
public function buttonSet($attachTo=NULL, $params=NULL) {
124124
return $this->addComponent(new Buttonset($this->js), $attachTo, $params);
125125
}
126126

127127
/**
128128
* Create and return a Tooltip component
129-
* @param $attachTo css/jquery selector attached to the component
130-
* @param $params php array of parameters
131-
* @return \Ajax\Components\Tooltip
129+
* @param string $attachTo css/jquery selector attached to the component
130+
* @param array $params php array of parameters
131+
* @return Tooltip
132132
*/
133133
public function tooltip($attachTo=NULL, $params=NULL) {
134134
return $this->addComponent(new Tooltip($this->js), $attachTo, $params);

Ajax/JsUtils.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ abstract public function createScriptVariable(&$view,$view_var, $output);
7575
/**
7676
* Forwards to $controller::$action and set the response to the modal content
7777
* Used internally by phpMv
78-
* @param Controller $initialController
78+
* @param object $initialController
7979
* @param string $controller a controller
8080
* @param string $action an action
8181
* @param array $params
@@ -84,9 +84,9 @@ abstract public function forward($initialController,$controller,$action,$params)
8484
/**
8585
* render the content of an existing view : $viewName and set the response to the modal content
8686
* Used internally by phpMv
87-
* @param Controller $initialControllerInstance
88-
* @param View $viewName
89-
* @param $params The parameters to pass to the view
87+
* @param object $initialControllerInstance
88+
* @param string $viewName
89+
* @param array $params The parameters to pass to the view
9090
*/
9191
abstract public function renderContent($initialControllerInstance,$viewName, $params=NULL);
9292

@@ -251,9 +251,9 @@ public function output($array_js) {
251251
/**
252252
* gather together all script needing to be output
253253
*
254-
* @param View $view
255-
* @param $view_var view script variable name, default : script_foot
256-
* @param $script_tags
254+
* @param object $view
255+
* @param string $view_var view script variable name, default : script_foot
256+
* @param boolean $script_tags
257257
* @return string
258258
*/
259259
public function compile(&$view=NULL, $view_var='script_foot', $script_tags=TRUE) {
@@ -374,8 +374,9 @@ private function _create_json($json_result, $match_array_type) {
374374
/**
375375
* Ensures a standard json value and escapes values
376376
*
377-
* @param type
378-
* @return type
377+
* @param mixed $result
378+
* @param boolean $is_key
379+
* @return string
379380
*/
380381
public function _prep_args($result, $is_key=FALSE) {
381382
if (is_null($result)) {

Ajax/bootstrap/html/HtmlAccordion.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ public function addPanel($title, $content) {
4141
* render the content of an existing view : $controller/$action and set the response to a new panel
4242
* @param JsUtils $js
4343
* @param string $title The panel title
44-
* @param Controller $initialController
44+
* @param object $initialController
4545
* @param string $viewName
46-
* @param $params The parameters to pass to the view
46+
* @param array $params The parameters to pass to the view
4747
*/
4848
public function renderViewPanel(JsUtils $js,$title,$initialController, $viewName, $params=array()) {
4949
return $this->addPanel($title, $js->renderContent($initialController, $viewName,$params));
@@ -53,7 +53,7 @@ public function renderViewPanel(JsUtils $js,$title,$initialController, $viewName
5353
* render the content of $controller::$action and set the response to a new panel
5454
* @param JsUtils $js
5555
* @param string $title The panel title
56-
* @param Controller $initialController
56+
* @param object $initialController
5757
* @param string $controller a Phalcon controller
5858
* @param string $action a Phalcon action
5959
* @param array $params

Ajax/bootstrap/html/HtmlBreadcrumbs.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
namespace Ajax\bootstrap\html;
33

44
use Ajax\bootstrap\html\base\HtmlBsDoubleElement;
5-
use Ajax\bootstrap\html\HtmlLink;
65
use Ajax\JsUtils;
76

87
use Ajax\bootstrap\html\base\HtmlNavElement;
@@ -40,7 +39,7 @@ class HtmlBreadcrumbs extends HtmlNavElement {
4039
* @param string $identifier
4140
* @param array $elements
4241
* @param boolean $autoActive sets the last element's class to <b>active</b> if true
43-
* @param function $hrefFunction the function who generates the href elements. default : function($e){return $e->getContent()}
42+
* @param callable $hrefFunction the function who generates the href elements. default : function($e){return $e->getContent()}
4443
*/
4544
public function __construct($identifier,$elements=array(),$autoActive=true,$startIndex=0,$hrefFunction=NULL){
4645
parent::__construct($identifier,"ol");
@@ -195,7 +194,7 @@ public function addGlyph($glyph,$index=0){
195194
/**
196195
* Add new elements in breadcrumbs corresponding to request dispatcher : controllerName, actionName, parameters
197196
* @param JsUtils $js
198-
* @param Dispatcher $dispatcher the request dispatcher
197+
* @param object $dispatcher the request dispatcher
199198
* @return \Ajax\bootstrap\html\HtmlBreadcrumbs
200199
*/
201200
public function fromDispatcher(JsUtils $js,$dispatcher,$startIndex=0){
@@ -206,7 +205,7 @@ public function fromDispatcher(JsUtils $js,$dispatcher,$startIndex=0){
206205

207206
/**
208207
* sets the function who generates the href elements. default : function($element){return $element->getContent()}
209-
* @param function $_hrefFunction
208+
* @param callable $_hrefFunction
210209
* @return \Ajax\bootstrap\html\HtmlBreadcrumbs
211210
*/
212211
public function setHrefFunction($_hrefFunction) {

Ajax/bootstrap/html/HtmlDropdown.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
use Ajax\JsUtils;
66
use Ajax\bootstrap\html\content\HtmlDropdownItem;
77
use Ajax\bootstrap\html\base\CssRef;
8-
use Ajax\service\PhalconUtils;
8+
use Ajax\service\JString;
9+
use Ajax\common\html\BaseHtml;
910

1011
/**
1112
* Twitter Bootstrap HTML Dropdown component
@@ -52,7 +53,7 @@ public function setStyle($cssStyle) {
5253
if (is_int($cssStyle)) {
5354
return $this->addToMember($this->class, CssRef::buttonStyles()[$cssStyle]);
5455
}
55-
if (PhalconUtils::startsWith($cssStyle, "btn-")===false) {
56+
if (JString::startsWith($cssStyle, "btn-")===false) {
5657
$cssStyle="btn".$cssStyle;
5758
}
5859
return $this->addToMemberCtrl($this->class, $cssStyle, CssRef::buttonStyles());
@@ -182,7 +183,7 @@ public function run(JsUtils $js) {
182183

183184
/**
184185
* Sets the tagName's dropdown
185-
* @see \Ajax\bootstrap\html\BaseHtml::setTagName()
186+
* @see BaseHtml::setTagName()
186187
*/
187188
public function setTagName($tagName) {
188189
if ($tagName=="button")

Ajax/bootstrap/html/HtmlGridsystem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function setNumRows($numRows,$numCols=NULL){
6666
/**
6767
* @param int $row
6868
* @param int $col
69-
* @param $force add the cell at $row,$col if true
69+
* @param boolean $force add the cell at $row,$col if true
7070
* @return HtmlGridCol
7171
*/
7272
public function getCell($row,$col,$force=true){

Ajax/bootstrap/html/HtmlModal.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ public function setTitle($title) {
110110
/**
111111
* render the content of an existing view : $controller/$action and set the response to the modal content
112112
* @param JsUtils $js
113-
* @param Controller $initialController
113+
* @param object $initialController
114114
* @param string $viewName
115-
* @param $params The parameters to pass to the view
115+
* @param array $params The parameters to pass to the view
116116
*/
117117
public function renderView(JsUtils $js,$initialController,$viewName, $params=array()) {
118118
$this->content=$js->renderContent($initialController, $viewName,$params);
@@ -121,7 +121,7 @@ public function renderView(JsUtils $js,$initialController,$viewName, $params=arr
121121
/**
122122
* render the content of $controller::$action and set the response to the modal content
123123
* @param JsUtils $js
124-
* @param Controller $initialControllerInstance
124+
* @param object $initialControllerInstance
125125
* @param string $controllerName the controller name
126126
* @param string $actionName the action name
127127
* @param array $params

Ajax/bootstrap/html/HtmlPagination.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
use Ajax\bootstrap\html\base\HtmlBsDoubleElement;
55
use Ajax\bootstrap\html\base\HtmlNavElement;
66
use Ajax\bootstrap\html\base\CssRef;
7-
use Ajax\service\PhalconUtils;
87
use Ajax\common\html\BaseHtml;
98
use Ajax\JsUtils;
9+
use Ajax\service\JString;
1010

1111
/**
1212
* Twitter Bootstrap Pagination component
@@ -114,7 +114,7 @@ public function _addEvent($event, $jsCode) {
114114
/**
115115
* set the active page corresponding to request dispatcher : controllerName, actionName, parameters and $urlMask
116116
* @param JsUtils $js
117-
* @param Dispatcher $dispatcher the request dispatcher
117+
* @param object $dispatcher the request dispatcher
118118
* @return \Ajax\bootstrap\html\HtmlPagination
119119
*/
120120
public function fromDispatcher(JsUtils $js,$dispatcher,$startIndex=0){
@@ -146,7 +146,7 @@ public function setSize($size) {
146146
if (is_int($size)) {
147147
return $this->addToPropertyUnique("class", CssRef::sizes("pagination")[$size], CssRef::sizes("pagination"));
148148
}
149-
if(!PhalconUtils::startsWith($size, "pagination-") && $size!=="")
149+
if(!JString::startsWith($size, "pagination-") && $size!=="")
150150
$size="pagination-".$size;
151151
return $this->addToPropertyCtrl("class", $size, CssRef::sizes("pagination"));
152152
}

Ajax/bootstrap/html/HtmlTabs.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Ajax\bootstrap\html\base\HtmlBsDoubleElement;
1515
use Ajax\bootstrap\html\content\HtmlTabContent;
1616

17-
1817
class HtmlTabs extends HtmlBsDoubleElement {
1918
protected $tabs=array ();
2019
protected $_tabsType="tabs";

0 commit comments

Comments
 (0)