Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
What is a ViewModel $auto_filter?
  • I can't find anything about it in the docs. And did not see anything but it being passed around in forge() and _contrsuct().




  • HarroHarro
    Accepted Answer
    auto_filter on Views and Viewmodels define the default for variable encoding. Meaning that if you call set() to set a variable, and you don't pass information on whether or not that variable should be encoded or not, the auto_filter value will be used (which is a boolean, encode or not).

    To make it clear, the set_safe() method on the View is an alias of set(), with the filter set to false.
  • Right of course.   I use it all the time.   Duh!  :)  Feeling stupid now. 

    Thanks.


Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion