Group::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
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 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
namespace Goetas\XML\XSDReader\Schema\Attribute;
3
4
use Goetas\XML\XSDReader\Schema\Schema;
5
6
class Group implements AttributeItem, AttributeContainer
7
{
8
9
    /**
10
     *
11
     * @var Schema
12
     */
13
    protected $schema;
14
15
    protected $doc;
16
17
    protected $name;
18
19
    protected $attributes = array();
20
21
    public function __construct(Schema $schema, $name)
22
    {
23
        $this->schema = $schema;
24
        $this->name = $name;
25
    }
26
27
    public function getName()
28
    {
29
        return $this->name;
30
    }
31
32
    public function setName($name)
33
    {
34
        $this->name = $name;
35
        return $this;
36
    }
37
38
    public function addAttribute(AttributeItem $attribute)
39
    {
40
        $this->attributes[] = $attribute;
41
    }
42
43
    public function getAttributes()
44
    {
45
        return $this->attributes;
46
    }
47
48
    public function getDoc()
49
    {
50
        return $this->doc;
51
    }
52
53
    public function setDoc($doc)
54
    {
55
        $this->doc = $doc;
56
        return $this;
57
    }
58
59
    public function getSchema()
60
    {
61
        return $this->schema;
62
    }
63
}
64