Skip to content

Commit cdfa1f3

Browse files
committed
✨ add the setData() and requestData() methods
Signed-off-by: otengkwame <developerkwame@gmail.com>
1 parent cb34895 commit cdfa1f3

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

CodeIgniter/Framework/libraries/Form_validation.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,32 @@ public function set_data(array $data)
331331

332332
return $this;
333333
}
334+
335+
// --------------------------------------------------------------------
336+
337+
/**
338+
* Alias to the set_data() method above
339+
*
340+
* @param array $data
341+
* @return CI_Form_validation
342+
*/
343+
public function setData(array $data)
344+
{
345+
return $this->set_data($data);
346+
}
347+
348+
// --------------------------------------------------------------------
349+
350+
/**
351+
* Alias to the setData() method above
352+
*
353+
* @param array $data
354+
* @return CI_Form_validation
355+
*/
356+
public function requestData(array $data)
357+
{
358+
return $this->setData($data);
359+
}
334360

335361
// --------------------------------------------------------------------
336362

@@ -367,6 +393,8 @@ public function set_message($lang, $val = '')
367393
return $this;
368394
}
369395

396+
// --------------------------------------------------------------------
397+
370398
/**
371399
* Alias to the method above
372400
*

0 commit comments

Comments
 (0)