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 setScreenshotType() method + Update Readme #180

Merged
merged 4 commits into from Apr 12, 2018
Merged

Add setScreenshotType() method + Update Readme #180

merged 4 commits into from Apr 12, 2018

Conversation

darron1217
Copy link
Contributor

Another simpler implementation of Issue #177

Copy link
Member

@freekmurze freekmurze left a comment

Choose a reason for hiding this comment

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

Some nitpicks...

@@ -23,6 +23,8 @@ class Browsershot
protected $proxyServer = '';
protected $showBackground = false;
protected $showScreenshotBackground = true;
protected $screenshotType = '';
Copy link
Member

Choose a reason for hiding this comment

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

Set this to png by default.

@@ -413,6 +425,14 @@ public function createScreenshotCommand($targetPath = null): array
$options['path'] = $targetPath;
}

if ($this->screenshotType) {
Copy link
Member

Choose a reason for hiding this comment

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

Remove this if statement.

@@ -23,6 +23,8 @@ class Browsershot
protected $proxyServer = '';
protected $showBackground = false;
protected $showScreenshotBackground = true;
protected $screenshotType = '';
protected $screenshotQuality = 0;
Copy link
Member

Choose a reason for hiding this comment

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

Set this to null by default.

@@ -218,6 +220,16 @@ public function hideBackground()
return $this;
}

public function setScreenshotType(string $type, int $quality = null)
{
$this->screenshotType = $type;
Copy link
Member

Choose a reason for hiding this comment

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

Add an empty line after this one.

@freekmurze freekmurze merged commit d120b79 into spatie:master Apr 12, 2018
@freekmurze
Copy link
Member

Thanks!

@darron1217 darron1217 deleted the darron1217-patch-2 branch April 12, 2018 11:16
This was referenced Apr 16, 2018
freekmurze pushed a commit that referenced this pull request Apr 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants