Phactory\Sql\Blueprint::__construct PHP Метод

__construct() публичный Метод

public __construct ( $name, $defaults, $associations = [], Phactory $phactory = null )
$phactory Phactory
    public function __construct($name, $defaults, $associations = array(), Phactory $phactory = null)
    {
        if (!$phactory instanceof Phactory) {
            throw new \Exception('$phactory must be an instance of Phactory\\Sql\\Phactory');
        }
        $this->_table = new Table($name, true, $phactory);
        $this->_defaults = $defaults;
        $this->_sequence = new Sequence();
        $this->_phactory = $phactory;
        foreach ($associations as $name => $association) {
            $association->setFromTable($this->_table);
            $this->addAssociation($name, $association);
        }
        if (!is_array($associations)) {
            throw new \Exception("\$associations must be an array of Association objects");
        }
    }