PhpSchool\CliMenu\MenuItem\AsciiArtItem::__construct PHP Method

__construct() public method

public __construct ( string $text, string $position = self::POSITION_CENTER )
$text string
$position string
    public function __construct($text, $position = self::POSITION_CENTER)
    {
        Assertion::string($text);
        Assertion::inArray($position, [self::POSITION_CENTER, self::POSITION_RIGHT, self::POSITION_LEFT]);
        $this->text = $text;
        $this->position = $position;
        $this->artLength = max(array_map('mb_strlen', explode("\n", $text)));
    }