Debian Codegraph @

vendor/mck89/peast/lib/Peast/Syntax/Node/JSX/JSXText.php

raw
1 <?php
2 /**
3 * This file is part of the Peast package
4 *
5 * (c) Marco Marchiò <[email protected]>
6 *
7 * For the full copyright and license information refer to the LICENSE file
8 * distributed with this source code
9 */
10 namespace Peast\Syntax\Node\JSX;
11
12 use Peast\Syntax\Node\Node;
13
14 /**
15 * A node that represents a JSX closing fragment tag.
16 *
17 * @author Marco Marchiò <[email protected]>
18 */
19 class JSXText extends Node
20 {
21 /**
22 * Map of node properties
23 *
24 * @var array
25 */
26 protected $propertiesMap = array(
27 "value" => false,
28 "raw" => false
29 );
30
31 /**
32 * Node's value
33 *
34 * @var mixed
35 */
36 protected $value;
37
38 /**
39 * Node's raw value
40 *
41 * @var string
42 */
43 protected $raw;
44
45 /**
46 * Returns node's value
47 *
48 * @return mixed
49 */
50 public function getValue()
51 {
52 return $this->value;
53 }
54
55 /**
56 * Sets node's value
57 *
58 * @param mixed $value Value
59 *
60 * @return $this
61 */
62 public function setValue($value)
63 {
64 $this->value = $value;
65 $this->raw = $value;
66 return $this;
67 }
68
69 /**
70 * Return node's raw value
71 *
72 * @return string
73 */
74 public function getRaw()
75 {
76 return $this->raw;
77 }
78
79 /**
80 * Sets node's raw value
81 *
82 * @param mixed $raw Raw value
83 *
84 * @return $this
85 */
86 public function setRaw($raw)
87 {
88 return $this->setValue($raw);
89 }
90 }