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\Schema;
4
 
5
use Doctrine\Deprecations\Deprecation;
6
 
7
/**
8
 * Configuration for a Schema.
9
 */
10
class SchemaConfig
11
{
12
    /**
13
     * @deprecated
14
     *
15
     * @var bool
16
     */
17
    protected $hasExplicitForeignKeyIndexes = false;
18
 
19
    /** @var int */
20
    protected $maxIdentifierLength = 63;
21
 
22
    /** @var string|null */
23
    protected $name;
24
 
25
    /** @var mixed[] */
26
    protected $defaultTableOptions = [];
27
 
28
    /**
29
     * @deprecated
30
     *
31
     * @return bool
32
     */
33
    public function hasExplicitForeignKeyIndexes()
34
    {
35
        Deprecation::triggerIfCalledFromOutside(
36
            'doctrine/dbal',
37
            'https://github.com/doctrine/dbal/pull/4822',
38
            'SchemaConfig::hasExplicitForeignKeyIndexes() is deprecated.',
39
        );
40
 
41
        return $this->hasExplicitForeignKeyIndexes;
42
    }
43
 
44
    /**
45
     * @deprecated
46
     *
47
     * @param bool $flag
48
     *
49
     * @return void
50
     */
51
    public function setExplicitForeignKeyIndexes($flag)
52
    {
53
        Deprecation::trigger(
54
            'doctrine/dbal',
55
            'https://github.com/doctrine/dbal/pull/4822',
56
            'SchemaConfig::setExplicitForeignKeyIndexes() is deprecated.',
57
        );
58
 
59
        $this->hasExplicitForeignKeyIndexes = (bool) $flag;
60
    }
61
 
62
    /**
63
     * @param int $length
64
     *
65
     * @return void
66
     */
67
    public function setMaxIdentifierLength($length)
68
    {
69
        $this->maxIdentifierLength = (int) $length;
70
    }
71
 
72
    /** @return int */
73
    public function getMaxIdentifierLength()
74
    {
75
        return $this->maxIdentifierLength;
76
    }
77
 
78
    /**
79
     * Gets the default namespace of schema objects.
80
     *
81
     * @return string|null
82
     */
83
    public function getName()
84
    {
85
        return $this->name;
86
    }
87
 
88
    /**
89
     * Sets the default namespace name of schema objects.
90
     *
91
     * @param string $name The value to set.
92
     *
93
     * @return void
94
     */
95
    public function setName($name)
96
    {
97
        $this->name = $name;
98
    }
99
 
100
    /**
101
     * Gets the default options that are passed to Table instances created with
102
     * Schema#createTable().
103
     *
104
     * @return mixed[]
105
     */
106
    public function getDefaultTableOptions()
107
    {
108
        return $this->defaultTableOptions;
109
    }
110
 
111
    /**
112
     * @param mixed[] $defaultTableOptions
113
     *
114
     * @return void
115
     */
116
    public function setDefaultTableOptions(array $defaultTableOptions)
117
    {
118
        $this->defaultTableOptions = $defaultTableOptions;
119
    }
120
}