1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* \AppserverIo\Appserver\Core\Api\Node\ParserNode |
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
|
|
|
use AppserverIo\Description\Api\Node\AbstractNode; |
25
|
|
|
use AppserverIo\Description\Api\Node\DirectoriesNodeTrait; |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* DTO to transfer the object description parser configuration. |
29
|
|
|
* |
30
|
|
|
* @author Tim Wagner <[email protected]> |
31
|
|
|
* @copyright 2015 TechDivision GmbH <[email protected]> |
32
|
|
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
33
|
|
|
* @link https://github.com/appserver-io/appserver |
34
|
|
|
* @link http://www.appserver.io |
35
|
|
|
*/ |
36
|
|
|
class ParserNode extends AbstractNode implements ParserNodeInterface |
37
|
|
|
{ |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* A directories node trait. |
41
|
|
|
* |
42
|
|
|
* @var \AppserverIo\Description\Api\Node\DirectoriesNodeTrait |
43
|
|
|
*/ |
44
|
|
|
use DirectoriesNodeTrait; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* The unique parser name. |
48
|
|
|
* |
49
|
|
|
* @var string |
50
|
|
|
* @DI\Mapping(nodeType="string") |
51
|
|
|
*/ |
52
|
|
|
protected $name; |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* The parser class name. |
56
|
|
|
* |
57
|
|
|
* @var string |
58
|
|
|
* @DI\Mapping(nodeType="string") |
59
|
|
|
*/ |
60
|
|
|
protected $type; |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* The parsers factory class name. |
64
|
|
|
* |
65
|
|
|
* @var string |
66
|
|
|
* @DI\Mapping(nodeType="string") |
67
|
|
|
*/ |
68
|
|
|
protected $factory; |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* The parsers descriptor name. |
72
|
|
|
* |
73
|
|
|
* @var string |
74
|
|
|
* @DI\Mapping(nodeType="string") |
75
|
|
|
*/ |
76
|
|
|
protected $descriptorName; |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* Returns the parser name. |
80
|
|
|
* |
81
|
|
|
* @return string The unique parser name |
82
|
|
|
*/ |
83
|
|
|
public function getName() |
84
|
|
|
{ |
85
|
|
|
return $this->name; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* Returns the class name. |
90
|
|
|
* |
91
|
|
|
* @return string The class name |
92
|
|
|
*/ |
93
|
|
|
public function getType() |
94
|
|
|
{ |
95
|
|
|
return $this->type; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* Returns the factory class name. |
100
|
|
|
* |
101
|
|
|
* @return string The factory class name |
102
|
|
|
*/ |
103
|
|
|
public function getFactory() |
104
|
|
|
{ |
105
|
|
|
return $this->factory; |
106
|
|
|
} |
107
|
|
|
|
108
|
|
|
/** |
109
|
|
|
* Returns the descriptor name. |
110
|
|
|
* |
111
|
|
|
* @return string The descriptor name |
112
|
|
|
*/ |
113
|
|
|
public function getDescriptorName() |
114
|
|
|
{ |
115
|
|
|
return $this->descriptorName; |
116
|
|
|
} |
117
|
|
|
} |
118
|
|
|
|