public function __construct($str, $escape = false) { $this->string = $escape ? $escape === 'encq' ? static::encq(static::$jsContext, $str) : static::enc(static::$jsContext, $str) : $str; }