Item::getSchema()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace Goetas\XML\XSDReader\Schema;
3
4
use Goetas\XML\XSDReader\Schema\Type\Type;
5
use Goetas\XML\XSDReader\Schema\Schema;
6
use Goetas\XML\XSDReader\Schema\SchemaItem;
7
8
abstract class Item implements SchemaItem
9
{
10
11
    protected $doc;
12
13
    protected $schema;
14
15
    protected $name;
16
17
    protected $type;
18
19
    public function __construct(Schema $schema, $name)
20
    {
21
        $this->schema = $schema;
22
        $this->name = $name;
23
    }
24
25
    public function getName()
26
    {
27
        return $this->name;
28
    }
29
30
    public function setName($name)
31
    {
32
        $this->name = $name;
33
        return $this;
34
    }
35
    /**
36
     *
37
     * @return Type
38
     */
39
    public function getType()
40
    {
41
        return $this->type;
42
    }
43
44
    public function setType(Type $type)
45
    {
46
        $this->type = $type;
47
        return $this;
48
    }
49
50
    public function getDoc()
51
    {
52
        return $this->doc;
53
    }
54
55
    public function setDoc($doc)
56
    {
57
        $this->doc = $doc;
58
        return $this;
59
    }
60
61
    public function getSchema()
62
    {
63
        return $this->schema;
64
    }
65
}
66