form.php
public function submitButton(SelectorInterface $selector, $additional = false)
    {
        $additional = $additional ? $additional : array();
        foreach ($this->buttons as $button) {
            if ($selector->isMatch($button)) {
                $encoding = $this->encode();
                $button->write($encoding);
                if ($additional) {
                    $encoding->merge($additional);
                }

                return $encoding;
            }
        }

        return false;
    }
public function submitButton(SelectorInterface $selector, $additional = false)
    {
        $additional = $additional ? $additional : array();
        foreach ($this->buttons as $button) {
            if ($selector->isMatch($button)) {
                $encoding = $this->encode();
                $button->write($encoding);
                if ($additional) {
                    $encoding->merge($additional);
                }

                return $encoding;
            }
        }

        return false;
    }
Gets the submit values for a selected button.

@param $selector Criteria to apply.
@param hash $additional Additional data for the form.

@return SimpleEncoding Submitted values or false if there is no such button in the
form.