Skip to content

Commit

Permalink
Allow access to the AjaxResponse properties via a getter.
Browse files Browse the repository at this point in the history
  • Loading branch information
ringmaster committed Sep 21, 2012
1 parent e4fd110 commit abfcf07
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion classes/ajaxresponse.php
Expand Up @@ -36,7 +36,19 @@ public function __set( $var, $val )
break;
}
}


public function __get( $var )
{
switch ( $var ) {
case 'response_code':
case 'message':
case 'data':
case 'callback':
return $this->$var;
break;
}
}

public function html( $name, $value )
{
if ( empty( $this->html ) ) {
Expand Down

0 comments on commit abfcf07

Please sign in to comment.