Skip to content

Commit

Permalink
Sketch out the service class
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed May 31, 2022
1 parent 61ac02e commit 4b88214
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/Services/BladeDownService.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,28 @@
*/
class BladeDownService
{
//
protected string $html;
protected string $output;

public function __construct(string $html)
{
$this->html = $html;
}

public function process(): self
{
$this->output = $this->html;

return $this;
}

public function get(): string
{
return $this->output;
}

public static function render(string $html): string
{
return (new static($html))->process()->get();
}
}

0 comments on commit 4b88214

Please sign in to comment.