Is it a good workaround and would it be possible to use helper classes in the view, in CodeIgniter. I have a situation when I have to extract with regulars expression from a text couple of strings and generate outputs on matches. I would not like to do this directly in the view and I would like to use for this purpose a helper.
application
--view
---myview.php
and here I should call the helper and return results
for example I want to extract from the text the type of processor, than I pass the text and get returned the processor type. This one is needed because all the data in the view are generated by an API dynamically.
echo $myhelper->processor($text);
CodeIgniter's user guide explains that helpers can be loaded and their function used in views.
However it is not best pratice to load a helper in a view, so you could either auto-load the relevant helper, or load it in your controller(s).
So, using helper functions in a view is fine, although it is encouraged that the helper is loaded in a controller, or auto-loaded.
Just load the helper in your controller, then
In the view call your function name directly. In this case I called my convertor function