Files
PdoWrapper/src/Query.php

47 lines
785 B
PHP

<?php
namespace Kletellier\PdoWrapper;
class Query
{
public string $query;
public array $data;
public function __construct()
{
$this->query = "";
$this->data = [];
}
public function addData($value)
{
if (is_array($value)) {
$this->data = array_merge($this->data, $value);
} else {
$this->data[] = $value;
}
}
public function getQuery(): string
{
return $this->query;
}
public function setQuery(string $query)
{
$this->query = $query;
return $this;
}
public function getData(): array
{
return $this->data;
}
public function setData(array $data)
{
$this->data = $data;
return $this;
}
}