src/Phossa/Query/Statement/StatementAbstract.php
public function getStatement(
        array $settings = [],
        /*# bool */ $replace = true
    )/*# : string */ {
        // merge with builder's & provided settings
        $this->combineSettings(
            array_replace($this->getBuilder()->getSettings(), $settings)
        );

        // current settings
        $currSettings = $this->getSettings();

        // build PREVIOUS statement if any (UNION etc)
        $res = [];
        if ($this->hasPrevious()) {
            $res[] = $this->getPrevious()->getStatement($currSettings, false);
        }

        // build current statement
        $res[] = $this->build();

        // raw sql with placeholders
        $sql = join($currSettings['seperator'], $res);

        // replace placeholders with '?' or values
        if ($replace) {
            // flush bindings array
            $this->resetBindings();

            // replace with '?' or values
            $sql = $this->bindValues($sql, $currSettings);
        }

        return trim($sql);
    }
public function getStatement(
        array $settings = [],
        /*# bool */ $replace = true
    )/*# : string */ {
        // merge with builder's & provided settings
        $this->combineSettings(
            array_replace($this->getBuilder()->getSettings(), $settings)
        );

        // current settings
        $currSettings = $this->getSettings();

        // build PREVIOUS statement if any (UNION etc)
        $res = [];
        if ($this->hasPrevious()) {
            $res[] = $this->getPrevious()->getStatement($currSettings, false);
        }

        // build current statement
        $res[] = $this->build();

        // raw sql with placeholders
        $sql = join($currSettings['seperator'], $res);

        // replace placeholders with '?' or values
        if ($replace) {
            // flush bindings array
            $this->resetBindings();

            // replace with '?' or values
            $sql = $this->bindValues($sql, $currSettings);
        }

        return trim($sql);
    }
{@inheritDoc}