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

Add methods to Resizer #13

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

tdgroot
Copy link

@tdgroot tdgroot commented Jul 5, 2018

This fixes #12.

I haven't tested the functionality of the methods yet, but this is my proposal. What do you think?

*/
public function getRelativePath()
{
return $this->getRelativePathResizedImage();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just make the original method public. IMHO it does not make much sense to wrap it inside another method, just to make it public

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I just thought this was a better public method name for it. This way the internal one could get deprecated in time.

*/
public function getAbsolutePath()
{
return $this->getAbsolutePathResized();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as before. Just make the original method public

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I just thought this was a better public method name for it. This way the internal one could get deprecated in time.

*/
public function resizeAndGetUrl(string $imageUrl, $width, $height, array $resizeSettings = [])
public function resize(string $imageUrl, $width, $height, array $resizeSettings = [])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to refactor this method. I should get rid of all these init methods that create temporal coupling, which should be avoided. I would try to improve that after merging your PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be nice if it would return value objects or something, right?

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.

Feature request: Add more methods to the interface
2 participants