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

Create configuration class for HtmlDiff config options #32

Merged
merged 2 commits into from
Mar 9, 2016

Conversation

jschroed91
Copy link
Member

Created a new class Caxy\HtmlDiff\HtmlDiffConfig to house the configuration options for HtmlDiff/ListDiff/TableDiff in an object. We've added a decent amount of config options to the HtmlDiff class, and it's getting quite messy having to pass these options individually into each new instance of ListDiff/TableDiff/HtmlDiff that we end up creating. So now we can just pass the object along!

In order to be backwards-compatible, I left the __construct intact as well as the public getter/setter functions for the config options, but I marked them as deprecated.

Use HtmlDiff::setConfig to set the configuration object. The __construct is currently creating a new instance of HtmlDiffConfig with the default options by default, so you don't actually need to create a new object if you don't want to. You can simply call HtmlDiff::getConfig to get the object and then use the (fluent) setter functions to set configuration options.

jschroed91 added a commit that referenced this pull request Mar 9, 2016
Create configuration class for HtmlDiff config options
@jschroed91 jschroed91 merged commit 49e3d0b into master Mar 9, 2016
@jschroed91 jschroed91 deleted the enhancement/create-config-class branch March 9, 2016 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant