ername, $password, $charset, $buffers, $dialect, $role, $sync); } elseif ($role !== null) { $result = \ibase_pconnect($database, $username, $password, $charset, $buffers, $dialect, $role); } elseif ($dialect !== null) { $result = \ibase_pconnect($database, $username, $password, $charset, $buffers, $dialect); } elseif ($buffers !== null) { $result = \ibase_pconnect($database, $username, $password, $charset, $buffers); } elseif ($charset !== null) { $result = \ibase_pconnect($database, $username, $password, $charset); } elseif ($password !== null) { $result = \ibase_pconnect($database, $username, $password); } elseif ($username !== null) { $result = \ibase_pconnect($database, $username); } elseif ($database !== null) { $result = \ibase_pconnect($database); } else { $result = \ibase_pconnect(); } if ($result === false) { throw IbaseException::createFromPhpError(); } return $result; } /** * This function passes the arguments to the (remote) database server. There it starts a new restore process. Therefore you * won't get any responses. * * @param resource $service_handle A previously opened connection to the database server. * @param string $source_file The absolute path on the server where the backup file is located. * @param string $dest_db The path to create the new database on the server. You can also use database alias. * @param int $options Additional options to pass to the database server for restore. * The options parameter can be a combination * of the following constants: * IBASE_RES_DEACTIVATE_IDX, * IBASE_RES_NO_SHADOW, * IBASE_RES_NO_VALIDITY, * IBASE_RES_ONE_AT_A_TIME, * IBASE_RES_REPLACE, * IBASE_RES_CREATE, * IBASE_RES_USE_ALL_SPACE, * IBASE_PRP_PAGE_BUFFERS, * IBASE_PRP_SWEEP_INTERVAL, * IBASE_RES_CREATE. * Read the section about for further information. * @param bool $verbose Since the restore process is done on the database server, you don't have any chance * to get its output. This argument is useless. * @return mixed Returns TRUE on success. * * Since the restore process is done on the (remote) server, this function just passes the arguments to it. * While the arguments are legal, you won't get FALSE. * @throws IbaseException * */ function ibase_restore($service_handle, string $source_file, string $dest_db, int $options = 0, bool $verbose = false) { error_clear_last(); $result = \ibase_restore($service_handle, $source_file, $dest_db, $options, $verbose); if ($result === false) { throw IbaseException::createFromPhpError(); } return $result; } /** * Rolls back a transaction without closing it. * * @param resource $link_or_trans_identifier If called without an argument, this function rolls back the default * transaction of the default link. If the argument is a connection * identifier, the default transaction of the corresponding connection * will be rolled back. If the argument is a transaction identifier, the * corresponding transaction will be rolled back. The transaction context * will be retained, so statements executed from within this transaction * will not be invalidated. * @throws IbaseException * */ function ibase_rollback_ret($link_or_trans_identifier = null): void { error_clear_last(); $result = \ibase_rollback_ret($link_or_trans_identifier); if ($result === false) { throw IbaseException::createFromPhpError(); } } /** * Rolls back a transaction. * * @param resource $link_or_trans_identifier If called without an argument, this function rolls back the default * transaction of the default link. If the argument is a connection * identifier, the default transaction of the corresponding connection * will be rolled back. If the argument is a transaction identifier, the * corresponding transaction will be rolled back. * @throws IbaseException * */ function ibase_rollback($link_or_trans_identifier = null): void { error_clear_last(); $result = \ibase_rollback($link_or_trans_identifier); if ($result === false) { throw IbaseException::createFromPhpError(); } } /** * * * @param string $host The name or ip address of the database host. You can define the port by adding * '/' and port number. If no port is specified, port 3050 will be used. * @param string $dba_username The name of any valid user. * @param string $dba_password The user's password. * @return resource Returns a Interbase / Firebird link identifier on success. * @throws IbaseException * */ function ibase_service_attach(string $host, string $dba_username, string $dba_password) { error_clear_last(); $result = \ibase_service_attach($host, $dba_username, $dba_password); if ($result === false) { throw IbaseException::createFromPhpError(); } return $result; } /** * * * @param resource $service_handle A previously created connection to the database server. * @throws IbaseException * */ function ibase_service_detach($service_handle): void { error_clear_last(); $result = \ibase_service_detach($service_handle); if ($result === false) { throw IbaseException::createFromPhpError(); } }