Blame view

src/InputOutput/TestImpl/TestInputOutputClass.php 733 Bytes
22521f1c   Benjamin Renard   First commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php

/**
 * @class TestInputOutputClass
 * @brief Class that's implement an InputOutputInterface for test client. This class inherits from IHMInputOutputClass.
 * @details
 */
class TestInputOutputClass extends IHMInputOutputClass
{
	/*
	 * @brief translate input data from test to AMDA_Integration module
	*/
	public function getInputData($input,$function)
	{
		//just decode the input
		$ihmInput = json_decode($input);
		//and call the IHMInputOutputClass method
		return parent::getInputData($ihmInput,$function);
	}

	public function getOutput($data)
	{
		//call the IHMInputOutputClass method
		$output = parent::getOutput($data);
		//and encode the output
		return json_encode($output);
	}
}

?>