Having static methods because you only need one instance is an awful excuse. You are introducing global state, which is bad and messes up unit testing.
If you really need only one instance of the helper, make a container with a method like createAndReturnHelper
which will act as a weak singleton, lazy loading the class if it is not preset and/or otherwise returning the already created instance. If you need the helper in your controller, be sure to inject it by using the container to obtain the helper from it.
That gets your static methods sorted out.
Whether you want the view to call helper's methods directly or not, that is mostly up to you, although it has proven to me that the better approach is to do all the logic inside the controller, filtering data, finding the right stuff, and include into the view only very simple PHP, such as the foreach
loop and variables, of course. Variables, which contain the correct data.
The main point into making the view not contain any complicated php code is that frontend designers usually do not have deep knowledge of the programming language(s), and they are not really supposed to, they are focusing on frontend, so you can tell them if you iterate over the variable $x
, it will contain all the data you need. The backend team will make sure the data is correct, so just style it for the end user in a nice way.