Skip to content
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

Service doesn't provide the ability to set a serializer. #1

Closed
acairns opened this issue Jul 20, 2014 · 2 comments
Closed

Service doesn't provide the ability to set a serializer. #1

acairns opened this issue Jul 20, 2014 · 2 comments

Comments

@acairns
Copy link
Contributor

acairns commented Jul 20, 2014

Cannot set a custom serializer at runtime.

Typically, this won't be needed - however I've been thinking about a different Serializer for Error Transformers:

{"error":{"message":"Access Denied"}}

This would require a custom serilizer appending data to an 'error' key, similar to the DataArraySerilizer bundled with Fractal itself.

Can possibly just add it onto the service class:

Fractal::setSerializer(new \Acme\ErrorArraySerializer);
@acairns
Copy link
Contributor Author

acairns commented Jul 20, 2014

Thinking that #2 could be a better way to provide this.

Generally the service class was only intended to be a non-locator type Facade to provide a really simple implementation.

If #2 is fixed, then this will probably address this issue also.

@acairns
Copy link
Contributor Author

acairns commented Jul 20, 2014

Manager is now exposed in 0.0.2, fixing #1 and #2.

@acairns acairns closed this as completed Jul 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant