Exemplo n.º 1
0
 * Project: QAS API
 * Date: 01/09/2015
 * @author Mariusz Soltys.
 * @version 1.0.0
 * @license http://opensource.org/licenses/MIT
 *
 */
require_once __DIR__ . '/../vendor/autoload.php';
use Marsoltys\QASapi\QAS;
use Marsoltys\QASapi\Utils;
/**
 * @var $wsdl string URL to QAS WSDL file, i.e. "http://somehost.com/proweb.wsdl"
 */
$wsdl = "";
$qas = new QAS($wsdl);
$utils = new Utils();
$result = "";
/**
 * Very basic API call example
 */
/**
 * $qas->call() Invokes method provided in 'action' element of array
 *
 * $_POST = array(
 *      'action'=>'DoGetData'
 *      'params'=> [
 *          ...
 *      ]
 * )
 *
 */
Exemplo n.º 2
0
 public function testSanitizeInput()
 {
     $_POST = array('product_id' => 'libgd <?php ?>! *& ()/ \\ ^ % £', 'component' => '10', 'versions' => '2.0.33', 'testscalar' => array('2', '23', '10', '12'), 'testarray' => '2');
     $expected = array('product_id' => 'libgd ! *& ()/ \\ ^ % £', 'component' => '10', 'versions' => '2.0.33', 'testscalar' => false, 'testarray' => '2');
     $this->assertEquals($expected, $this->utils->sanitizeInputArray($_POST));
 }