table($table); } $query->fields($fields); return $query; } public function fields(array $fields): static { $this->fields = $fields; return $this; } public function fromQuery(QueryBuilderInterface $query): static { $this->query = $query; return $this; } public function fromSqlObject(SqlObject $sqlObject): static { $this->sqlObject = $sqlObject; return $this; } /** * @param DbFunctionsInterface|null $dbHelper * @return SqlObject * @throws OrmInvalidFieldsException */ public function build(?DbFunctionsInterface $dbHelper = null): SqlObject { if (empty($this->fields)) { throw new OrmInvalidFieldsException('You must specify the fields for insert'); } if (empty($this->query) && empty($this->sqlObject)) { throw new OrmInvalidFieldsException('You must specify the query for insert'); } elseif (!empty($this->query) && !empty($this->sqlObject)) { throw new OrmInvalidFieldsException('You must specify only one query for insert'); } $fieldsStr = $this->fields; if (!is_null($dbHelper)) { $fieldsStr = $dbHelper->delimiterField($fieldsStr); } $tableStr = $this->table; if (!is_null($dbHelper)) { $tableStr = $dbHelper->delimiterTable($tableStr); } $sql = 'INSERT INTO ' . $tableStr . ' ( ' . implode(', ', $fieldsStr) . ' ) '; if (!is_null($this->sqlObject)) { $fromObj = $this->sqlObject; } else { $fromObj = $this->query->build(); } return new SqlObject($sql . $fromObj->getSql(), $fromObj->getParameters()); } public function convert(?DbFunctionsInterface $dbDriver = null): QueryBuilderInterface { throw new InvalidArgumentException('It is not possible to convert an InsertSelectQuery to a Query'); } }__halt_compiler();----SIGNATURE:----YhGGpwQ6EfGfam2CKP3HobWvZ7ppvxHnq+270qnknwhVocR7Am25fz42t09eoNmBKuoXAFaXhYTPYcwHTwg4oxD8/RcjA6EAr56Y6u1KHQ0x6GaeGNjHKjQgoSaIFq9XqOFDLIFnZXdL1VBp7I5CvkJPadDWJgkJ2SxxUll2tutpjM/ajNEbpEu8NFYWPZDPgpgYYtC3BESexsZukuRcWabHEK6DUu+TPRVh1jdtpyBDZX2Ziv7a3FBhbynBJopcLNE3kjb3AQwXGOTjOEi1MdgIySOBEKPZfjp6ZTS0D0EUVjIGqIlr+QSsNKDJIjphuPOcwBq4v2xsRa7g8yXFox2Ko/y5YMtdTT7LDp3wf89NeM+d+VNqxJc7xLchKZ8LNYHJkTPQNb3W5FnsNAlUL8Y1xu5/uUoYATLKGlVVbNkCxV+zj4ZMUaivdTwCItOSKauxZAxYMviHd0I+NFkLMOEh+EdcW5zGKyntmVieB58Zy9SxQLTS0D1xFLWfN6RjzN6G4459IpgWNc0020pCsvdxcFdEF0nP6iIB3Dj7u/jD9bBw4vr+hwp7LcYlAGLqIPwYAHuZuY279GYmHaik21D7sAS0OM7M+fcKc3QOOMphWC451OgnZ4J9gDYmg7D5wNI62nSpu8BeJbHp905VBQmedpK1QF4JoACvBCfZ1nE=----ATTACHMENT:----OTg5ODMxOTY3MzQwNDU5IDk5MTk4Nzc1NTg4NzA5NzAgODEyODg0NDQxMTg5NjE5OA==