Commit 3a2417cc authored by David Weston's avatar David Weston

Added __set and __unset to the master object

parent 3df22172
......@@ -6,7 +6,7 @@
* quite a lot of functionality is shared between billing and customers, for
* example.
*
* @version: untested
* @version: 1.0-beta
* @author: David Weston <stpp@typefish.co.uk>
*/
......
......@@ -7,7 +7,7 @@
* this class matches the name registered on the card. Addresses
* are also key.
*
* @version: untested
* @version: 1.0-beta
* @author: David Weston <stpp@typefish.co.uk>
*/
......
......@@ -10,7 +10,7 @@
* no real need to fill in anything like addresses and such - however there
* /is/ a recommendation from ST to do so.
*
* @version: untested
* @version: 1.0-beta
* @author: David Weston <stpp@typefish.co.uk>
*/
......
......@@ -10,7 +10,7 @@
* it is a required feature for 3D-Secure, which most if not all
* transactions should be performed using (if available).
*
* @version: untested
* @version: 1.0-beta
* @author: David Weston <stpp@typefish.co.uk>
*/
......
......@@ -5,7 +5,7 @@
* This is the god object for all parts of the request, such as
* the merchant, operations and such.
*
* @version: untested
* @version: 1.0-beta
* @author: David Weston <stpp@typefish.co.uk>
*/
......
......@@ -5,7 +5,7 @@
* The operation object contains some other information that is needed
* to complete the request.
*
* @version: untested
* @version: 1.0-beta
* @author: David Weston <stpp@typefish.co.uk>
*/
......
......@@ -9,7 +9,7 @@
* give the XML response as the argument to the constructor and all will be
* revealed.
*
* @version: untested
* @version: 1.0-beta
* @author: David Weston <stpp@typefish.co.uk>
*/
......
......@@ -4,7 +4,7 @@
*
* This is the object that represents updated settlement details.
*
* @version: untested
* @version: 1.0-beta
* @author: David Weston <stpp@typefish.co.uk>
*/
......
......@@ -6,7 +6,7 @@
* to a setup, however, it'll allow you to with ease create
* and maintain a new contract with a SecureTrading node.
*
* @version: untested
* @version: 1.0-beta
* @author: David Weston <stpp@typefish.co.uk>
*/
......@@ -332,6 +332,36 @@ class STAPI
}
/**
* Some __set abuse - pretty much shorthand for the set?
* methods.
*/
public function __set($property, $value)
{
$caller = "set".ucfirst($property);
if(!method_exists($this, $caller))
return null;
return $this->$caller($value);
}
/**
* Some __unset abuse - pretty much shorthand for the reset?
* methods.
*/
public function __unset($property)
{
$caller = "reset".ucfirst($property);
if(!method_exists($this, $caller))
return null;
return $this->$caller($value);
}
/**
* Used to push a request off to the SecureTrading endpoint.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment