Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function getField($fieldName=null) {
- $array = array_merge($this->getMissing(),$this->getEscaped(),$this->getUnknown());
- if(key_exists($fieldName,$array)==true) return $array[$fieldName];
- return $array;
- }
- public function getErrorMsg($fieldName=null) {
- $errors = $this->getMessages();
- foreach($errors as $k => $v) {
- foreach($v as $kk => $vv) {
- $tab[$k][]=$vv;
- }
- }
- if(!is_null($fieldNamev)) {
- if(key_exists($fieldName,$tab)) {
- return $tab[$fieldName];
- } else return false;
- } else if(count($tab)<1) return false;
- return $tab;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement