Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.61 KB | None | 0 0
  1. public function __set($variable, $value)
  2.     {
  3.         if($variable != 'erreurs' && $variable != 'isNew')
  4.         {
  5.             if($variable == 'description')
  6.             {
  7.                 $this->$variable = str_tools::bbcode($value);
  8.             }
  9.             else
  10.             {
  11.                 $this->$variable = $value;
  12.                 if($variable == 'email')
  13.                 {
  14.                     if(!empty($this->email))
  15.                     {
  16.                        
  17.                         if((filter_var($this->email,FILTER_VALIDATE_EMAIL)))
  18.                         {
  19.                              return true;
  20.                         }
  21.                         else
  22.                         $this->erreurs[] = EMAIL_INVALIDE;
  23.                         return false;
  24.                     }
  25.                     else
  26.                     $this->erreurs[] = EMAIL_VIDE;
  27.                     return false;
  28.                 }
  29.                 if($variable == 'pseudo')
  30.                 {
  31.                    
  32.                 }
  33.             }
  34.         }
  35.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement