Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1.  
  2. public function getField($fieldName=null) {
  3. $array = array_merge($this->getMissing(),$this->getEscaped(),$this->getUnknown());
  4. if(key_exists($fieldName,$array)==true) return $array[$fieldName];
  5. return $array;
  6. }
  7.  
  8. public function getErrorMsg($fieldName=null) {
  9. $errors = $this->getMessages();
  10. foreach($errors as $k => $v) {
  11. foreach($v as $kk => $vv) {
  12. $tab[$k][]=$vv;
  13. }
  14. }
  15. if(!is_null($fieldNamev)) {
  16. if(key_exists($fieldName,$tab)) {
  17. return $tab[$fieldName];
  18. } else return false;
  19. } else if(count($tab)<1) return false;
  20. return $tab;
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement