Completed
Push — master ( 111bcd...99ca87 )
by Andrey
26:30
created

MetadataFactoryOptions::setMetadataDriver()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
/**
3
 * @link    https://github.com/nnx-framework/jms-serializer-module
4
 * @author  Malofeykin Andrey  <[email protected]>
5
 */
6
namespace Nnx\JmsSerializerModule\Options;
7
8
use Zend\Stdlib\AbstractOptions;
9
use Metadata\ClassHierarchyMetadata;
10
11
12
/**
13
 * Class MetadataFactoryOptions
14
 *
15
 * @package Nnx\JmsSerializerModule\Options
16
 */
17
class MetadataFactoryOptions extends AbstractOptions
18
{
19
    /**
20
     * Имя для получения драйвера метаданнх
21
     *
22
     * @var string
23
     */
24
    protected $metadataDriver;
25
26
    /**
27
     * @todo добавить корректное описание для класса
28
     *
29
     * @var string
30
     */
31
    protected $hierarchyMetadataClass = ClassHierarchyMetadata::class;
32
33
    /**
34
     * Флаг отдадки
35
     *
36
     * @var bool
37
     */
38
    protected $debug = false;
39
40
    /**
41
     * Возвращает имя для получения драйвера метаданнх
42
     *
43
     * @return string
44
     */
45
    public function getMetadataDriver()
46
    {
47
        return $this->metadataDriver;
48
    }
49
50
    /**
51
     * Устанавливает имя для получения драйвера метаданнх
52
     *
53
     * @param string $metadataDriver
54
     *
55
     * @return $this
56
     */
57
    public function setMetadataDriver($metadataDriver)
58
    {
59
        $this->metadataDriver = (string)$metadataDriver;
60
61
        return $this;
62
    }
63
64
    /**
65
     * @return string
66
     */
67
    public function getHierarchyMetadataClass()
68
    {
69
        return $this->hierarchyMetadataClass;
70
    }
71
72
    /**
73
     * @param string $hierarchyMetadataClass
74
     *
75
     * @return $this
76
     */
77
    public function setHierarchyMetadataClass($hierarchyMetadataClass)
78
    {
79
        $this->hierarchyMetadataClass = (string)$hierarchyMetadataClass;
80
81
        return $this;
82
    }
83
84
    /**
85
     * Возвращает флаг указывающий на то, нужно ли производить отладку
86
     *
87
     * @return boolean
88
     */
89
    public function getDebug()
90
    {
91
        return $this->debug;
92
    }
93
94
    /**
95
     * Устанавливает флаг отладки
96
     *
97
     * @param boolean $debug
98
     *
99
     * @return $this
100
     */
101
    public function setDebug($debug)
102
    {
103
        $this->debug = (boolean)$debug;
104
105
        return $this;
106
    }
107
}
108