mirror of
https://github.com/standardebooks/web.git
synced 2025-07-06 23:00:28 -04:00
19 lines
391 B
PHP
19 lines
391 B
PHP
<?
|
|
|
|
use function Safe\preg_replace;
|
|
|
|
class Collection{
|
|
public $Name;
|
|
public $Url;
|
|
public $SequenceNumber = null;
|
|
public $Type = null;
|
|
|
|
public function __construct(string $name){
|
|
$this->Name = $name;
|
|
$this->Url = '/collections/' . Formatter::MakeUrlSafe($this->Name);
|
|
}
|
|
|
|
public function GetSortedName(): string{
|
|
return preg_replace('/^(the|and|a|)\s/ius', '', $this->Name);
|
|
}
|
|
}
|