Advertisement
sagaida

Untitled

Sep 6th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.23 KB | None | 0 0
  1. <?php
  2. namespace User\Model;
  3.  
  4. class Forma
  5. {
  6.      public function exchangeArray($data)
  7.      {
  8.         foreach($data as $key => $value){
  9.             $this->$key = (!empty($data[$key]) || $data[$key] == 0) ? $data[$key] : null;
  10.         }
  11.      }
  12.    
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement