| 1 |
<?php |
| 2 |
declare( strict_types = 1 ); |
| 3 |
|
| 4 |
namespace Wikimedia\Parsoid\Html2Wt\ConstrainedText; |
| 5 |
|
| 6 |
class Result { |
| 7 |
/** @var string */ |
| 8 |
public $text; |
| 9 |
/** @var ?string */ |
| 10 |
public $prefix; |
| 11 |
/** @var ?string */ |
| 12 |
public $suffix; |
| 13 |
/** @var bool */ |
| 14 |
public $greedy; |
| 15 |
|
| 16 |
/** |
| 17 |
* Construct a new constrained text result object. |
| 18 |
* |
| 19 |
* @param string $text |
| 20 |
* @param ?string $prefix |
| 21 |
* @param ?string $suffix |
| 22 |
*/ |
| 23 |
public function __construct( |
| 24 |
string $text, ?string $prefix = null, ?string $suffix = null |
| 25 |
) { |
| 26 |
$this->text = $text; |
| 27 |
$this->prefix = $prefix; |
| 28 |
$this->suffix = $suffix; |
| 29 |
$this->greedy = false; |
| 30 |
} |
| 31 |
} |