gossi\codegen\parser\visitor\parts\ValueParserPart::parseValue PHP Method

parseValue() private method

Parses the value of a node into the model
private parseValue ( gossi\codegen\model\ValueInterface $obj, PhpParser\Node $node ) : void
$obj gossi\codegen\model\ValueInterface
$node PhpParser\Node
return void
    private function parseValue(ValueInterface $obj, Node $node)
    {
        $value = $node instanceof Const_ ? $node->value : $node->default;
        if ($value !== null) {
            if ($this->isPrimitive($value)) {
                $obj->setValue($this->getPrimitiveValue($value));
            } else {
                $obj->setExpression($this->getExpression($value));
            }
        }
    }