public function __set($key, $value) { if (in_array($key, ['success', 'error', 'alert', 'info'])) { $this->{$key}($value); } else { parent::__set($key, $value); } }
public function __set($key, $value) { if (in_array($key, ['success', 'error', 'alert', 'info'])) { $this->{$key}($value); } else { parent::__set($key, $value); } }