File tree Expand file tree Collapse file tree 6 files changed +51
-16
lines changed Expand file tree Collapse file tree 6 files changed +51
-16
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public function getOutputValues();
3838
3939 /**
4040 * Get all tables of the remote function.
41- * @return \phpsap\interfaces\Api\IArray []
41+ * @return \phpsap\interfaces\Api\ITable []
4242 */
4343 public function getTables ();
4444}
Original file line number Diff line number Diff line change 55/**
66 * Interface IArray
77 *
8- * API extend the logic of values but contain member elements.
8+ * API extend the logic of values to contain member elements.
99 *
1010 * @package phpsap\interfaces\Api
1111 * @author Gregor J.
1212 * @license MIT
1313 */
1414interface IArray extends IValue
1515{
16- /**
17- * API table element.
18- */
19- const DIRECTION_TABLE = 'table ' ;
20-
21- /**
22- * API element that casts to PHP array.
23- */
24- const TYPE_ARRAY = 'array ' ;
25-
2616 /**
2717 * JSON configuration key for members array.
2818 */
2919 const JSON_MEMBERS = 'members ' ;
3020
3121 /**
3222 * Cast a given output value to the implemented value.
33- * @param array $struct The output array to typecast.
23+ * @param array $value The output array to typecast.
3424 * @return array
3525 * @throws \phpsap\interfaces\exceptions\IArrayElementMissingException
3626 * @throws \phpsap\interfaces\exceptions\IInvalidArgumentException
3727 */
38- public function cast ($ struct );
28+ public function cast ($ value );
3929
4030 /**
4131 * Return an array of member elements.
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ public function getName();
8787 /**
8888 * Cast a given output value to the implemented value.
8989 * @param bool|int|float|string $value The output to typecast.
90- * @return bool|int|float|string|\phpsap\DateTime\SapDateTime
90+ * @return bool|int|float|string|\phpsap\DateTime\SapDateTime|\phpsap\DateTime\SapDateInterval
9191 * @throws \phpsap\interfaces\exceptions\IInvalidArgumentException
9292 */
9393 public function cast ($ value );
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace phpsap \interfaces \Api ;
4+
5+ /**
6+ * Interface IStruct
7+ *
8+ * API extend the logic of arrays to contain member elements.
9+ *
10+ * @package phpsap\interfaces\Api
11+ * @author Gregor J.
12+ * @license MIT
13+ */
14+ interface IStruct extends IArray
15+ {
16+ /**
17+ * API element that casts to an associative array in PHP.
18+ */
19+ const TYPE_STRUCT = 'struct ' ;
20+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace phpsap \interfaces \Api ;
4+
5+ /**
6+ * Interface ITable
7+ *
8+ * API extend the logic of arrays but contains rows of member elements.
9+ *
10+ * @package phpsap\interfaces\Api
11+ * @author Gregor J.
12+ * @license MIT
13+ */
14+ interface ITable extends IArray
15+ {
16+ /**
17+ * API table element.
18+ */
19+ const DIRECTION_TABLE = 'table ' ;
20+
21+ /**
22+ * API element that casts to a PHP array of associative arrays.
23+ */
24+ const TYPE_TABLE = 'table ' ;
25+ }
Original file line number Diff line number Diff line change 55/**
66 * Interface IArrayElementMissingException
77 *
8- * A table element required by the API is not in the table.
8+ * A table/struct element required by the API is not in the table/struct .
99 *
1010 * @package phpsap\interfaces\exceptions
1111 * @author Gregor J.
You can’t perform that action at this time.
0 commit comments