Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Allow access to the AjaxResponse properties via a getter.

  • Loading branch information...
commit abfcf07a9774a23e383826dc420e94ea37fc6659 1 parent e4fd110
Owen Winkler authored

Showing 1 changed file with 13 additions and 1 deletion. Show diff stats Hide diff stats

  1. 14  classes/ajaxresponse.php
14  classes/ajaxresponse.php
@@ -36,7 +36,19 @@ public function __set( $var, $val )
36 36
 				break;
37 37
 		}
38 38
 	}
39  
-	
  39
+
  40
+	public function __get( $var )
  41
+	{
  42
+		switch ( $var ) {
  43
+			case 'response_code':
  44
+			case 'message':
  45
+			case 'data':
  46
+			case 'callback':
  47
+				return $this->$var;
  48
+				break;
  49
+		}
  50
+	}
  51
+
40 52
 	public function html( $name, $value )
41 53
 	{
42 54
 		if ( empty( $this->html ) ) {

0 notes on commit abfcf07

Please sign in to comment.
Something went wrong with that request. Please try again.