New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor static function outputXML and outputJSON in API #1142
Comments
The static isAuthorized and isValidRequestMethod methods are kind of a deal breaker. I'd try to put the api in the container, so you could do This way, all methods that call self::output could be made non-static! |
@jeroendesloovere is this still an issue or was his solved already |
@WouterSioen Can you take a look at this, since you are more aware of the issue. |
The API needs to be deprecated and altered by an easy way to add new API endpoints. This will also fix the usage of SpoonTemplate. |
Problem
When replacing SPOON_CHARSET by $container->getParameter('kernel.charset'),
Issue: #1138
PR: #1140
We saw that we had to use BackendModel just for getting the container in a static function.
Solution from @WouterSioen
We can remove that
use Backend\Core\Engine\Model as BackendModel
again if we change these static functions to normal functions if we use$this->output in outputXML and outputJSON
The text was updated successfully, but these errors were encountered: