/** * @param Parser $parser The instance that requests parsing. * @param TokensList $list The list of tokens to be parsed. * * @return void */ public function parse(Parser $parser, TokensList $list) { parent::parse($parser, $list); // Checks the type of this query. if ($this->options->has('START TRANSACTION') || $this->options->has('BEGIN')) { $this->type = TransactionStatement::TYPE_BEGIN; } elseif ($this->options->has('COMMIT') || $this->options->has('ROLLBACK')) { $this->type = TransactionStatement::TYPE_END; } }