Stevemo\Cpanel\Services\Validation\ValidableInterface::getData PHP Метод

getData() публичный Метод

Get the stored data
Автор: Steve Montambeault
public getData ( ) : array
Результат array
    public function getData();

Usage Example

Пример #1
0
 /**
  * Validate and update a existing user
  *
  * @author Steve Montambeault
  * @link   http://stevemo.ca
  *
  * @param array $data
  *
  * @return bool
  */
 public function update(array $data)
 {
     try {
         if ($this->validator->with($data)->validForUpdate()) {
             $this->users->update($data['id'], $this->validator->getData());
             return true;
         }
     } catch (LoginRequiredException $e) {
         $this->validator->add('LoginRequiredException', $e->getMessage());
     } catch (PasswordRequiredException $e) {
         $this->validator->add('PasswordRequiredException', $e->getMessage());
     } catch (UserExistsException $e) {
         $this->validator->add('UserExistsException', $e->getMessage());
     }
     return false;
 }