Files
query_builder/src/Reinforce/Query/hasTable.php

22 lines
396 B
PHP
Raw Normal View History

<?php
2025-09-29 16:40:43 -03:00
namespace Database\Reinforce\Query;
trait hasTable
{
protected string $table;
public function getTable(): string
{
return $this->table;
}
2024-08-03 20:58:53 -04:00
public function setTable(string $table, ?string $alias = null): self
{
if ($alias !== null) {
$table = "{$table} '{$alias}'";
}
$this->table = $table;
return $this;
}
}