Haanga_AST::append PHP Method

append() public method

public append ( $name, $value )
    function append($name, $value)
    {
        if (is_string($name)) {
            $name = hvar($name);
        }
        $this->getValue($value, $stmt);
        $this->getValue($name, $name);
        $this->stack[] = array('op' => 'append_var', 'name' => $name['var'], $stmt);
        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);
 }