I just wanted to add that it also works with FPC, only M+ switch must be used to allow declaring methods in published section.

P.S. Sorry for the empty comment on article. I dont know why but nothing showed up when I posted it.