class JSXMemberExpression
A node that represents a JSX member expression.
@author Marco Marchiò <marco.mm89@gmail.com>
Hierarchy
- class \Peast\Syntax\Node\Node implements \Peast\Syntax\Node\JSONSerializable
- class \Peast\Syntax\Node\JSX\JSXMemberExpression extends \Peast\Syntax\Node\Node implements \Peast\Syntax\Node\Expression
Expanded class hierarchy of JSXMemberExpression
3 string references to 'JSXMemberExpression'
- Parser::isSameJSXElementName in vendor/
mck89/ peast/ lib/ Peast/ Syntax/ JSX/ Parser.php - Checks that 2 tag names are equal
- Parser::parseJSXIdentifierOrMemberExpression in vendor/
mck89/ peast/ lib/ Peast/ Syntax/ JSX/ Parser.php - Parses a jsx identifier, namespaced identifier or member expression
- Renderer::renderNode in vendor/
mck89/ peast/ lib/ Peast/ Renderer.php - Renders a node
File
-
vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Node/ JSX/ JSXMemberExpression.php, line 20
Namespace
Peast\Syntax\Node\JSXView source
class JSXMemberExpression extends Node implements Expression {
/**
* Map of node properties
*
* @var array
*/
protected $propertiesMap = array(
"object" => true,
"property" => true,
);
/**
* Expression's object
*
* @var JSXMemberExpression|JSXIdentifier
*/
protected $object;
/**
* Expression's property
*
* @var JSXIdentifier
*/
protected $property;
/**
* Returns the expression's object
*
* @return JSXMemberExpression|JSXIdentifier
*/
public function getObject() {
return $this->object;
}
/**
* Sets the expression's object
*
* @param JSXMemberExpression|JSXIdentifier $object Object
*
* @return $this
*/
public function setObject($object) {
$this->assertType($object, array(
"JSX\\JSXMemberExpression",
"JSX\\JSXIdentifier",
));
$this->object = $object;
return $this;
}
/**
* Returns the expression's property
*
* @return JSXIdentifier
*/
public function getProperty() {
return $this->property;
}
/**
* Sets the expression's property
*
* @param JSXIdentifier $property Property
*
* @return $this
*/
public function setProperty(JSXIdentifier $property) {
$this->property = $property;
return $this;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
JSXMemberExpression::$object | protected | property | Expression's object | ||
JSXMemberExpression::$propertiesMap | protected | property | Map of node properties | Overrides Node::$propertiesMap | |
JSXMemberExpression::$property | protected | property | Expression's property | ||
JSXMemberExpression::getObject | public | function | Returns the expression's object | ||
JSXMemberExpression::getProperty | public | function | Returns the expression's property | ||
JSXMemberExpression::setObject | public | function | Sets the expression's object | ||
JSXMemberExpression::setProperty | public | function | Sets the expression's property | ||
Node::$leadingComments | protected | property | Leading comments array | ||
Node::$location | public | property | Node location in the source code | ||
Node::$trailingComments | protected | property | Trailing comments array | ||
Node::assertArrayOf | protected | function | Asserts that the given value is an array of defined type | ||
Node::assertType | protected | function | Asserts that the given value respects the defined type | ||
Node::getLeadingComments | public | function | Returns leading comments array | ||
Node::getLocation | public | function | Returns node location in the source code | ||
Node::getTrailingComments | public | function | Returns trailing comments array | ||
Node::getType | public | function | Returns node type | 2 | |
Node::jsonSerialize | public | function | Returns a serializable version of the node | 2 | |
Node::render | public | function | Renders the current node | ||
Node::setEndPosition | public | function | Sets the end position of the node in the source code | ||
Node::setLeadingComments | public | function | Sets leading comments array | 1 | |
Node::setStartPosition | public | function | Sets the start position of the node in the source code | ||
Node::setTrailingComments | public | function | Sets trailing comments array | 1 | |
Node::traverse | public | function | Traverses the current node and all its child nodes using the given function |
||
Node::typeError | protected | function | Throws an error if the defined type is not supported b | ||
Node::__construct | public | function | Class constructor |