Access to XenForo_Input from XenForo_Model

digitalpoint

Well-known member
Hopefully, I'm just blind, but is there a way to access cleaned input variables from a XenForo_Model object?

Really I just want to do XenForo_Input::__get('cleanedvar');

But there is no $this->_input object or anything else I can find in the XenForo_Model scope.
 
Hopefully, I'm just blind, but is there a way to access cleaned input variables from a XenForo_Model object?

Really I just want to do XenForo_Input::__get('cleanedvar');

But there is no $this->_input object or anything else I can find in the XenForo_Model scope.
This doesn't exist or belong in the model. I know it doesn't answer your question, but it may prevent a headache or two. :p

Extend the model, create a new method, and pass the filtered input in through a controller.
 
Blah... that's what I was afraid of. Thanks for asking my question at least. :)

Would be useful if the input object was available universally through the registry or something... oh well.
 
The model is supposed to be independent of user input (and assumed state, as much as possible). So ideally, you'd want to pass in the data you need.

Strictly speaking, you can just create a new request object and give it to a new input object (or an array for a new input object).
 
Top Bottom