Advertisement
Guest User

Untitled

a guest
Apr 19th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.41 KB | None | 0 0
  1. private function setAttribute($name, $value = null)
  2. {
  3.     if (isset($this->reply[$name])) {
  4.         if (empty($value)) {
  5.             unset($this->reply[$name])
  6.             return $this;
  7.         }
  8.  
  9.         if (is_array($this->reply[$name]) && is_array($value)) {
  10.             $this->reply[$name] += $value;
  11.             return $this;
  12.         }
  13.     }
  14.    
  15.     $this->reply[$name] = $value;
  16.     return $this;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement