public static function init() { APIError::$REJ_NOT_LOGGED = new APIError("Not logged"); APIError::$REJ_NO_ACTION = new APIError("No action"); APIError::$REJ_WRONG_API = new APIError("Wrong API"); APIError::$REJ_WRONG_PARAMS = new APIError("Wrong parameters"); APIError::$ERR_GENERIC = new APIError("Server error"); }
public function __construct($var) { $message = "{$this->message} - \${$var} cannot be set."; parent::__construct($this->message, $this->code, NULL); }