<commit_before>##########################
Creating Ancillary Classes
##########################

In some cases you may want to develop classes that exist apart from your
controllers but have the ability to utilize all of CodeIgniter's
resources. This is easily possible as you'll see.

get_instance()
==============

.. php:function:: get_instance()

	:returns:	Reference to your controller's instance
	:rtype:	CI_Controller

**Any class that you instantiate within your controller methods can
access CodeIgniter's native resources** simply by using the
``get_instance()`` function. This function returns the main
CodeIgniter object.

Normally, to call any of the available CodeIgniter methods requires
you to use the ``$this`` construct::
<commit_msg>[ci skip] Merge pull request #5154 from angelxaces/patch-1<commit_after>##########################
Creating Ancillary Classes
##########################

In some cases you may want to develop classes that exist apart from your
controllers but have the ability to utilize all of CodeIgniter's
resources. This is easily possible as you'll see.

get_instance()
==============

.. php:function:: get_instance()

	:returns:	Reference to your controller's instance
	:rtype:	CI_Controller

**Any class that you instantiate within your controller methods can
access CodeIgniter's native resources** simply by using the
``get_instance()`` function. This function returns the main
CodeIgniter object.

Normally, to call any of the available methods, CodeIgniter requires
you to use the ``$this`` construct::

{'fraction_non_alphanumeric': 0.1432258064516129, 'fraction_numerical': 0.0032258064516129032, 'mean_word_length': 5.924107142857143, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2762590', 'n_tokens_mistral': 402, 'n_tokens_neox': 376, 'n_words': 187}