for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Kir\MySQL\Tools;
use Kir\MySQL\Builder\Select;
class VirtualTables {
/** @var Select[] */
private $virtualTables = [];
/**
* @param string $tableName
* @param Select $select
* @return $this
*/
public function add($tableName, Select $select) {
$this->virtualTables[$tableName] = $select;
return $this;
}
* @return bool
public function has($tableName) {
return array_key_exists($tableName, $this->virtualTables);
* @return Select|null
public function get($tableName) {
if($this->has($tableName)) {
return $this->virtualTables[$tableName];
return null;