Skip to content

Commit

Permalink
docs: add "Initializing the Utility Class"
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Nov 30, 2023
1 parent 31388c8 commit a3e9c47
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
27 changes: 24 additions & 3 deletions user_guide_src/source/database/utilities.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,34 @@
#########
Utilities
#########
######################
Database Utility Class
######################

The Database Utility Class contains methods that help you manage your database.

.. contents::
:local:
:depth: 2

******************************
Initializing the Utility Class
******************************

Load the Utility Class as follows:

.. literalinclude:: utilities/002.php
:lines: 2-

You can also pass another database group to the DB Utility loader, in case
the database you want to manage isn't the default one:

.. literalinclude:: utilities/003.php
:lines: 2-

In the above example, we're passing a database group name as the first
parameter.

****************************
Using the Database Utilities
****************************

Export a Query Result as an XML Document
========================================
Expand Down
3 changes: 3 additions & 0 deletions user_guide_src/source/database/utilities/002.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

$dbutil = \CodeIgniter\Database\Config::utils();
3 changes: 3 additions & 0 deletions user_guide_src/source/database/utilities/003.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

$dbutil = \CodeIgniter\Database\Config::utils('group_name');

0 comments on commit a3e9c47

Please sign in to comment.