Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace Doctrine\DBAL\Portability;
6
 
7
use Doctrine\DBAL\Driver\Middleware\AbstractResultMiddleware;
8
use Doctrine\DBAL\Driver\Result as ResultInterface;
9
 
10
final class Result extends AbstractResultMiddleware
11
{
12
    private Converter $converter;
13
 
14
    /** @internal The result can be only instantiated by the portability connection or statement. */
15
    public function __construct(ResultInterface $result, Converter $converter)
16
    {
17
        parent::__construct($result);
18
 
19
        $this->converter = $converter;
20
    }
21
 
22
    /**
23
     * {@inheritDoc}
24
     */
25
    public function fetchNumeric()
26
    {
27
        return $this->converter->convertNumeric(
28
            parent::fetchNumeric(),
29
        );
30
    }
31
 
32
    /**
33
     * {@inheritDoc}
34
     */
35
    public function fetchAssociative()
36
    {
37
        return $this->converter->convertAssociative(
38
            parent::fetchAssociative(),
39
        );
40
    }
41
 
42
    /**
43
     * {@inheritDoc}
44
     */
45
    public function fetchOne()
46
    {
47
        return $this->converter->convertOne(
48
            parent::fetchOne(),
49
        );
50
    }
51
 
52
    /**
53
     * {@inheritDoc}
54
     */
55
    public function fetchAllNumeric(): array
56
    {
57
        return $this->converter->convertAllNumeric(
58
            parent::fetchAllNumeric(),
59
        );
60
    }
61
 
62
    /**
63
     * {@inheritDoc}
64
     */
65
    public function fetchAllAssociative(): array
66
    {
67
        return $this->converter->convertAllAssociative(
68
            parent::fetchAllAssociative(),
69
        );
70
    }
71
 
72
    /**
73
     * {@inheritDoc}
74
     */
75
    public function fetchFirstColumn(): array
76
    {
77
        return $this->converter->convertFirstColumn(
78
            parent::fetchFirstColumn(),
79
        );
80
    }
81
}