File tree Expand file tree Collapse file tree 2 files changed +31
-3
lines changed
Expand file tree Collapse file tree 2 files changed +31
-3
lines changed Original file line number Diff line number Diff line change @@ -156,11 +156,24 @@ public function getLimit()
156156 }
157157
158158 /**
159- * Return arbitrary data for this query.
159+ * @param string $name
160+ * @param null $default
160161 *
162+ * @return mixed
163+ */
164+ public function getData ($ name , $ default = null )
165+ {
166+ if (!array_key_exists ($ name , $ this ->data )) {
167+ return $ default ;
168+ }
169+
170+ return $ this ->data [$ name ];
171+ }
172+
173+ /**
161174 * @return array
162175 */
163- public function getData ()
176+ public function getAllData ()
164177 {
165178 return $ this ->data ;
166179 }
Original file line number Diff line number Diff line change @@ -133,10 +133,25 @@ public function getLocale()
133133 return $ this ->locale ;
134134 }
135135
136+ /**
137+ * @param string $name
138+ * @param null $default
139+ *
140+ * @return mixed
141+ */
142+ public function getData ($ name , $ default = null )
143+ {
144+ if (!array_key_exists ($ name , $ this ->data )) {
145+ return $ default ;
146+ }
147+
148+ return $ this ->data [$ name ];
149+ }
150+
136151 /**
137152 * @return array
138153 */
139- public function getData ()
154+ public function getAllData ()
140155 {
141156 return $ this ->data ;
142157 }
You can’t perform that action at this time.
0 commit comments