oont-contents/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Argument/AbstractArgument.php
2025-02-08 15:10:23 +01:00

24 lines
565 B
PHP

<?php
namespace MailPoetVendor\Symfony\Component\DependencyInjection\Argument;
if (!defined('ABSPATH')) exit;
final class AbstractArgument
{
private $text;
private $context;
public function __construct(string $text = '')
{
$this->text = \trim($text, '. ');
}
public function setContext(string $context) : void
{
$this->context = $context . ' is abstract' . ('' === $this->text ? '' : ': ');
}
public function getText() : string
{
return $this->text;
}
public function getTextWithContext() : string
{
return $this->context . $this->text . '.';
}
}