Haanga_AST::do_echo PHP Method

do_echo() public method

public do_echo ( $stmt )
    function do_echo($stmt)
    {
        $this->getValue($stmt, $value);
        $this->stack[] = array('op' => 'print', $value);
        return $this;
    }

Usage Example

Ejemplo n.º 1
0
 public function do_print(Haanga_AST $code, $stmt)
 {
     /* Flag this object as a printing one */
     $code->doesPrint = TRUE;
     if (self::$strip_whitespace && Haanga_AST::is_str($stmt)) {
         $stmt['string'] = preg_replace('/\\s+/', ' ', $stmt['string']);
     }
     if ($this->ob_start == 0) {
         $code->do_echo($stmt);
         return;
     }
     $buffer = hvar('buffer' . $this->ob_start);
     $code->append($buffer, $stmt);
 }