Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Doctrine\DBAL\Event;
4
 
5
use Doctrine\DBAL\Connection;
6
use Doctrine\DBAL\Schema\Index;
7
 
8
/**
9
 * Event Arguments used when the portable index definition is generated inside {@see AbstractSchemaManager}.
10
 *
11
 * @deprecated
12
 */
13
class SchemaIndexDefinitionEventArgs extends SchemaEventArgs
14
{
15
    private ?Index $index = null;
16
 
17
    /**
18
     * Raw index data as fetched from the database.
19
     *
20
     * @var mixed[]
21
     */
22
    private array $tableIndex;
23
 
24
    /** @var string */
25
    private $table;
26
 
27
    private Connection $connection;
28
 
29
    /**
30
     * @param mixed[] $tableIndex
31
     * @param string  $table
32
     */
33
    public function __construct(array $tableIndex, $table, Connection $connection)
34
    {
35
        $this->tableIndex = $tableIndex;
36
        $this->table      = $table;
37
        $this->connection = $connection;
38
    }
39
 
40
    /**
41
     * Allows to clear the index which means the index will be excluded from tables index list.
42
     *
43
     * @return SchemaIndexDefinitionEventArgs
44
     */
45
    public function setIndex(?Index $index = null)
46
    {
47
        $this->index = $index;
48
 
49
        return $this;
50
    }
51
 
52
    /** @return Index|null */
53
    public function getIndex()
54
    {
55
        return $this->index;
56
    }
57
 
58
    /** @return mixed[] */
59
    public function getTableIndex()
60
    {
61
        return $this->tableIndex;
62
    }
63
 
64
    /** @return string */
65
    public function getTable()
66
    {
67
        return $this->table;
68
    }
69
 
70
    /** @return Connection */
71
    public function getConnection()
72
    {
73
        return $this->connection;
74
    }
75
}