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

Fix UrlBuilder to work better with PHP clone operator #26

Merged
merged 1 commit into from
Jan 23, 2017

Conversation

dhotson
Copy link
Contributor

@dhotson dhotson commented Jan 23, 2017

Being able to clone the url builder instance can be useful in certain situations. e.g.

$builder = Thumbor\Url\Builder::construct($server, $secret, 'http://a.com/b.jpg');

$a = clone $builder;
$a->addFilter('fill', 'green');

$b = clone $builder;
$b->addFilter('fill', 'red');

This PR makes this possible by ensuring the $commands instance variable is also cloned correctly.

@dhotson dhotson merged commit 7b32a4b into master Jan 23, 2017
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

Successfully merging this pull request may close these issues.

1 participant