Cake\Database\Expression\ValuesExpression::add PHP Method

add() public method

Add a row of data to be inserted.
public add ( array | Query $data ) : void
$data array | Cake\Database\Query Array of data to append into the insert, or a query for doing INSERT INTO .. SELECT style commands
return void
    public function add($data)
    {
        if (count($this->_values) && $data instanceof Query || $this->_query && is_array($data)) {
            throw new Exception('You cannot mix subqueries and array data in inserts.');
        }
        if ($data instanceof Query) {
            $this->query($data);
            return;
        }
        $this->_values[] = $data;
        $this->_castedExpressions = false;
    }