<?php namespace kernel\IGTabel\btn; class PrimaryBtn { protected string $btn = ''; public function __construct(string $title, string $url, $width) { $this->btn = "<a class='btn btn-primary' href='$url' style='margin: 3px; width: '$width >$title</a>"; } public function fetch(): string { return $this->btn; } public static function create(string $title, string $url, $width = '150px'): PrimaryBtn { return new self($title, $url, $width); } }