Debian Codegraph @

vendor/mck89/peast/lib/Peast/Syntax/Node/JSX/JSXSpreadChild.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 use Peast\Syntax\Node\Expression;
14
15 /**
16 * A node that represents a spread child expression in JSX.
17 *
18 * @author Marco Marchiò <[email protected]>
19 */
20 class JSXSpreadChild extends Node
21 {
22 /**
23 * Map of node properties
24 *
25 * @var array
26 */
27 protected $propertiesMap = array(
28 "expression" => true
29 );
30
31 /**
32 * The wrapped expression
33 *
34 * @var Expression
35 */
36 protected $expression;
37
38 /**
39 * Returns the wrapped expression
40 *
41 * @return Expression
42 */
43 public function getExpression()
44 {
45 return $this->expression;
46 }
47
48 /**
49 * Sets the wrapped expression
50 *
51 * @param Expression $expression Wrapped expression
52 *
53 * @return $this
54 */
55 public function setExpression(Expression $expression)
56 {
57 $this->expression = $expression;
58 return $this;
59 }
60 }