• R/O
  • SSH
  • HTTPS

jinrousiki: コミット


コミットメタ情報

リビジョン2110 (tree)
日時2018-01-03 21:20:16
作者umethyl

ログメッセージ

Request: func_get_args() 廃止

変更サマリ

差分

--- trunk/include/request/request_class.php (revision 2109)
+++ trunk/include/request/request_class.php (revision 2110)
@@ -88,11 +88,11 @@
8888 $value_list = $this->GetSource($src);
8989 foreach ($spec_list as $spec) {
9090 $value = ArrayFilter::Get($value_list, $spec);
91- if (empty($filter)) {
91+ if (true === empty($filter)) {
9292 $this->$spec = $value;
93- } elseif (method_exists($this, $filter)) {
93+ } elseif (true === method_exists($this, $filter)) {
9494 $this->$spec = $this->$filter($value);
95- } elseif (method_exists('Text', $filter)) {
95+ } elseif (true === method_exists('Text', $filter)) {
9696 $this->$spec = Text::$filter($value);
9797 } else {
9898 $this->$spec = $filter($value);
@@ -100,56 +100,46 @@
100100 }
101101 }
102102
103- public function ParseGet($stack) {
104- $stack = func_get_args();
103+ public function ParseGet(...$stack) {
105104 $filter = array_shift($stack);
106105 $this->Parse('get', $filter, $stack);
107106 }
108107
109- public function ParsePost($stack) {
110- $stack = func_get_args();
108+ public function ParsePost(...$stack) {
111109 $filter = array_shift($stack);
112110 $this->Parse('post', $filter, $stack);
113111 }
114112
115- public function ParseRequest($stack) {
116- $stack = func_get_args();
113+ public function ParseRequest(...$stack) {
117114 $filter = array_shift($stack);
118115 $this->Parse('request', $filter, $stack);
119116 }
120117
121- public function ParseGetInt($stack) {
122- $stack = func_get_args();
118+ public function ParseGetInt(...$stack) {
123119 $this->Parse('get', 'intval', $stack);
124120 }
125121
126- public function ParsePostInt($stack) {
127- $stack = func_get_args();
122+ public function ParsePostInt(...$stack) {
128123 $this->Parse('post', 'intval', $stack);
129124 }
130125
131- public function ParseGetOn($stack) {
132- $stack = func_get_args();
126+ public function ParseGetOn(...$stack) {
133127 $this->Parse('get', 'IsOn', $stack);
134128 }
135129
136- public function ParsePostOn($stack) {
137- $stack = func_get_args();
130+ public function ParsePostOn(...$stack) {
138131 $this->Parse('post', 'IsOn', $stack);
139132 }
140133
141- public function ParsePostStr($stack) {
142- $stack = func_get_args();
134+ public function ParsePostStr(...$stack) {
143135 $this->Parse('post', 'Escape', $stack);
144136 }
145137
146- public function ParseGetData($stack) {
147- $stack = func_get_args();
138+ public function ParseGetData(...$stack) {
148139 $this->Parse('get', null, $stack);
149140 }
150141
151- public function ParsePostData($stack) {
152- $stack = func_get_args();
142+ public function ParsePostData(...$stack) {
153143 $this->Parse('post', null, $stack);
154144 }
155145
旧リポジトリブラウザで表示