asrock-memory-qvl-scraper/src/Domain/Model/ASRockMemoryQVL.php

29 lines
567 B
PHP

<?php
namespace Domain\Model;
use Stringable;
class ASRockMemoryQVL implements Stringable
{
private string $url;
public function __construct(
string $cpuManufacturer,
string $motherboard,
string $cpuFamily
)
{
$this->url = sprintf('https://www.asrock.com/mb/%s/%s/Memory-%s.asp',
strtoupper(trim($cpuManufacturer)),
rawurlencode(trim($motherboard)),
strtoupper(trim($cpuFamily))
);
}
public function __toString(): string
{
return $this->url;
}
}