for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace mindplay\sql\model\schema;
use mindplay\sql\model\Driver;
/**
* This class represents a Column belonging to a Table.
*/
class Column
{
* @var Table
private $table;
* @var Driver
private $driver;
* @var Type
private $type;
* @var string
private $name;
private $alias;
* @var bool
private $required;
* @var mixed
private $default;
private $auto;
* @param Driver $driver
* @param Table $table parent Table instance
* @param string $name
* @param Type $type
* @param string|null $alias
* @param bool $required
* @param mixed $default
* @param bool $auto
public function __construct(Driver $driver, Table $table, $name, Type $type, $alias, $required, $default, $auto)
$this->table = $table;
$this->driver = $driver;
$this->type = $type;
$this->name = $name;
$this->alias = $alias;
$this->required = $required;
$this->default = $default;
$this->auto = $auto;
}
* @return Table
public function getTable()
return $this->table;
* @return Type
public function getType()
return $this->type;
* @return string
public function getName()
return $this->name;
* @return string|null
public function getAlias()
return $this->alias;
* @return bool
public function isRequired()
return $this->required;
* @return mixed
public function getDefault()
return $this->default;
public function isAuto()
return $this->auto;
* @ignore
*
public function __toString()
return $this->table->__toString() . '.' . $this->driver->quoteName($this->name);