public function __construct($array = null, $success = true) { if (!$success) { $this->exception = new SmsException($array); } else { if ($array) { Logs::warn('Constructor with JSON params in ' . get_class($this) . ' is deprecated, use Conversions utility class!'); Conversions::fillFromJSON($this, $array, !$success); } } }
public function __construct($arrayOrJson = null, $success = true) { // TODO: Remove this and use only the Conversions class if (!$success) { $this->exception = new SmsException($arrayOrJson); } else { if ($arrayOrJson) { Logs::warn('Constructor with JSON params in ' . get_class($this) . ' is deprecated, use Conversions utility class!'); Conversions::fillFromJSON($this, $arrayOrJson, !$success); } } }