diff -u b/src/TMGMTResponse.php b/src/TMGMTResponse.php --- b/src/TMGMTResponse.php +++ b/src/TMGMTResponse.php @@ -10,14 +10,14 @@ /** * TMGMT Response class. */ -class TMGMTResponse{ +class TMGMTResponse { /** * True or False for response. * * @var boolean */ - public $bit; + public $success; /** * Message in case bit is false. @@ -34,18 +34,20 @@ public $data; /** - * @param bool $bitwise + * Constructs a new TMGMT Response Object. + * + * @param bool $success * Response either TRUE or FALSE. * @param string $message * Message about the error. - * @param array $data + * @param array $args * Associative array of dynamic data that will be inserted into $message. */ - function __construct($bitwise, $message = "", $data = array()) { - $this->bit = $bitwise; - if (!$bitwise) { + public function __construct($success, $message = "", $args = array()) { + $this->success = $success; + if (!$success) { $this->$message = $message; - $this->data = $data; + $this->data = $args; } } }