public function __construct($connection) { $this->connection($connection); }
/** * Constructor * * @param \Cake\Database\Connection $connection The connection object * @param \Cake\ORM\Table $table The table this query is starting on */ public function __construct($connection, $table) { parent::__construct($connection); $this->repository($table); if ($this->_repository) { $this->addDefaultTypes($this->_repository); } }