Example #1
0
 private static function instantiate($record)
 {
     $object = new self();
     foreach ($record as $attribute => $value) {
         if ($object->hasAttribute($attribute)) {
             $object->{$attribute} = $value;
         }
     }
     return $object;
 }