Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 57... Línea 57...
57
     *
57
     *
58
     * @param resource|PgSql\Result|null $result A pg_query() result object to create a recordset from.
58
     * @param resource|PgSql\Result|null $result A pg_query() result object to create a recordset from.
59
     * @param pgsql_native_moodle_database $db Database object (only required when using cursors)
59
     * @param pgsql_native_moodle_database $db Database object (only required when using cursors)
60
     * @param string $cursorname Name of cursor or '' if none
60
     * @param string $cursorname Name of cursor or '' if none
61
     */
61
     */
62
    public function __construct($result, pgsql_native_moodle_database $db = null, $cursorname = '') {
62
    public function __construct($result, ?pgsql_native_moodle_database $db = null, $cursorname = '') {
63
        if ($cursorname && !$db) {
63
        if ($cursorname && !$db) {
64
            throw new coding_exception('When specifying a cursor, $db is required');
64
            throw new coding_exception('When specifying a cursor, $db is required');
65
        }
65
        }
66
        $this->result = $result;
66
        $this->result = $result;
67
        $this->db = $db;
67
        $this->db = $db;