public function setMock($b = true,$files = null){
        if (is_bool($b)){
            $this->resetMock(true);
            $this->mockMode = $b;
            if ($b){
                $this->log("Mock Mode set to ON");
            }
            
            if (is_string($files)){
                $this->mockFiles = array();
                $this->mockFiles[0] = $files;
                $this->log("Single Mock File set: $files");
            } else if (is_array($files)){
                $this->mockFiles = $files;
                $this->log("Mock files array set.");
            } else if (is_numeric($files)){
                $this->mockFiles = array();
                $this->mockFiles[0] = $files;
                $this->log("Single Mock Response set: $files");
            }
        }
    }
public function setMock($b = true,$files = null){
        if (is_bool($b)){
            $this->resetMock(true);
            $this->mockMode = $b;
            if ($b){
                $this->log("Mock Mode set to ON");
            }
            
            if (is_string($files)){
                $this->mockFiles = array();
                $this->mockFiles[0] = $files;
                $this->log("Single Mock File set: $files");
            } else if (is_array($files)){
                $this->mockFiles = $files;
                $this->log("Mock files array set.");
            } else if (is_numeric($files)){
                $this->mockFiles = array();
                $this->mockFiles[0] = $files;
                $this->log("Single Mock Response set: $files");
            }
        }
    }
public function setMock ( $ b = true , $ files = null ) { if ( is_bool ( $ b ) ) { $ this -> resetMock ( true ) ; $ this -> mockMode = $ b ; if ( $ b ) { $ this -> log ( "Mock Mode set to ON" ) ; } if ( is_string ( $ files ) ) { $ this -> mockFiles = array ( ) ; $ this -> mockFiles [ 0 ] = $ files ; $ this -> log ( "Single Mock File set: $files" ) ; } else if ( is_array ( $ files ) ) { $ this -> mockFiles = $ files ; $ this -> log ( "Mock files array set." ) ; } else if ( is_numeric ( $ files ) ) { $ this -> mockFiles = array ( ) ; $ this -> mockFiles [ 0 ] = $ files ; $ this -> log ( "Single Mock Response set: $files" ) ; } } }
Enables or disables Mock Mode for the object.

Use this method when you want to test your object without sending
actual requests to Amazon. When Mock Mode is enabled, responses are
pulled from files you specify instead of sending the request.
Be careful, as this means that the parameters you send will not
necessarily match the response you get back. The files are pulled in order
of the list, looping back to the first file after the last file is used.
The log records every time a file is set or used, or if the file is missing.
This method is also used to set response codes used by certain functions.
Mock Mode is particularly useful when you need
to test functions such as canceling orders or adding new products.
@param boolean $b [optional] <p>When set to <b>TRUE</b>, Mock Mode is
enabled for the object. Defaults to <b>TRUE</b>.</p>
@param array|string|integer $files [optional] <p>The list of files (or single file)
to be used with Mock Mode. If a single string is given, this method will
put it into an array. Integers can also be given, for use in <i>fetchMockResponse</i>.
These numbers should only be response codes, such as <b>200</b> or <b>404</b>.</p>
Enables or disables Mock Mode for the object .