File manager - Edit - /var/www/payraty/helpdesk/vendor/pda/pheanstalk/src/Values/TubeCommandTemplate.php
Back
<?php declare(strict_types=1); namespace Pheanstalk\Values; /** * Simple value object that has a very basic render function */ final class TubeCommandTemplate { private const PLACEHOLDER = '{tube}'; public function __construct(private readonly string $value) { if (!str_contains($value, self::PLACEHOLDER)) { throw new \InvalidArgumentException("Tube command template must contain tube name placeholder"); } } public function render(TubeName $tubeName): string { return strtr($this->value, [self::PLACEHOLDER => $tubeName]); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.30 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings