Exemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 public function visitScalar(AST\Bag\Scalar $element, &$handle = null, $eldnah = null)
 {
     return var_export($element->getValue(), true);
 }
Exemplo n.º 2
0
 /**
  * Visit a scalar
  *
  * @param   \Hoa\Visitor\Element  $element    Element to visit.
  * @param   mixed                 &$handle    Handle (reference).
  * @param   mixed                 $eldnah     Handle (not reference).
  * @return  mixed
  */
 protected function visitScalar(Ruler\Model\Bag\Scalar $element, &$handle = null, $eldnah = null)
 {
     return $element->getValue();
 }
Exemplo n.º 3
0
 /**
  * {@inheritDoc}
  */
 public function visitScalar(AST\Bag\Scalar $element, &$handle = null, $eldnah = null)
 {
     $value = $element->getValue();
     return is_numeric($value) ? $value : sprintf('"%s"', $value);
 }
Exemplo n.º 4
0
 /**
  * {@inheritDoc}
  */
 public function visitScalar(AST\Bag\Scalar $element, &$handle = null, $eldnah = null)
 {
     return $element->getValue();
 }