You will never return only the menu but that's the exact same thing with pure PHP. Once this part is documented the user can easily make his own implementation isn't it ?