Passed
Pull Request — master (#1108)
by Tim
06:37
created

ParsersNodeTrait::getParsers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * \AppserverIo\Appserver\Core\Api\Node\ParsersNodeTrait
5
 *
6
 * NOTICE OF LICENSE
7
 *
8
 * This source file is subject to the Open Software License (OSL 3.0)
9
 * that is available through the world-wide-web at this URL:
10
 * http://opensource.org/licenses/osl-3.0.php
11
 *
12
 * PHP version 5
13
 *
14
 * @author    Tim Wagner <[email protected]>
15
 * @copyright 2015 TechDivision GmbH <[email protected]>
16
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
 * @link      https://github.com/appserver-io/appserver
18
 * @link      http://www.appserver.io
19
 */
20
21
namespace AppserverIo\Appserver\Core\Api\Node;
22
23
use AppserverIo\Description\Annotations as DI;
24
25
/**
26
 * Abstract node that serves nodes having a parsers/parser child.
27
 *
28
 * @author    Tim Wagner <[email protected]>
29
 * @copyright 2015 TechDivision GmbH <[email protected]>
30
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
31
 * @link      https://github.com/appserver-io/appserver
32
 * @link      http://www.appserver.io
33
 */
34
trait ParsersNodeTrait
35
{
36
37
    /**
38
     * The parsers.
39
     *
40
     * @var array
41
     * @DI\Mapping(nodeName="parsers/parser", nodeType="array", elementType="AppserverIo\Appserver\Core\Api\Node\ParserNode")
42
     */
43
    protected $parsers = array();
44
45
    /**
46
     * Array with the parsers.
47
     *
48
     * @param array $parsers The parsers
49
     *
50
     * @return void
51
     */
52
    public function setParsers(array $parsers)
53
    {
54
        $this->parsers = $parsers;
55
    }
56
57
    /**
58
     * Array with the parsers.
59
     *
60
     * @return array
61
     */
62
    public function getParsers()
63
    {
64
        return $this->parsers;
65
    }
66
}
67