1: <?php
2:
3: namespace webfilesframework\core\datastore\types\database\resultHandler;
4:
5: class MMysqlResultHandler implements MIResultHandler
6: {
7: /**
8: * @var \mysqli_result
9: */
10: var $result;
11:
12: /**
13: * MMysqlResultHandler constructor.
14: *
15: * @param $result
16: */
17: public function __construct($result)
18: {
19: $this->result = $result;
20: }
21:
22:
23: /**
24: * @return int
25: */
26: public function getResultSize()
27: {
28: return $this->result->num_rows;
29: }
30:
31: /**
32: * @return object|\stdClass
33: */
34: public function fetchNextResultObject() {
35: $nextResultObject = $this->result->fetch_object();
36: return $nextResultObject;
37: }
38:
39:
40: }