lax/lib/Text.php

23 lines
508 B
PHP
Raw Normal View History

2020-02-25 15:23:38 -05:00
<?php
/** @license MIT
* Copyright 2018 J. King et al.
* See LICENSE and AUTHORS files for details */
declare(strict_types=1);
namespace JKingWeb\Lax;
class Text {
public $plain;
public $html;
public $xhtml;
public $loose;
2020-02-28 16:35:17 -05:00
public $htmlBase;
public $xhtmlBase;
2020-02-25 15:23:38 -05:00
public function __construct(string $data = null, string $type = "plain") {
assert(in_array($type, ["plain", "html", "xhtml", "loose"]), new \InvalidArgumentException);
$this->$type = $data;
}
2020-03-09 17:42:55 -04:00
}