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

Data Format Manager #42

Open
Zoramite opened this issue Dec 15, 2010 · 0 comments
Open

Data Format Manager #42

Zoramite opened this issue Dec 15, 2010 · 0 comments
Labels
Milestone

Comments

@Zoramite
Copy link
Member

Use an application manager singleton for formatting data. Allow for ability add multiple and custom formatters.

Would have a addFormatter(formatter) that would be added to an internal array of formatters.

When formatting is needed, the last formatter added with a matching function will be used to format the value. (LIFO)

For example, can use a formatPhoneUS(value, options) call to format a phone number in the US format. This would search the formatters for a function called phoneUS and call it with the arguments provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant