Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,50 @@ private function __construct()
$this->bMultibyteSupport = extension_loaded('mbstring');
}

/**
* @return self new instance
*/
public static function create()
{
return new Settings();
}

/**
* @param bool $bMultibyteSupport
*
* @return self fluent interface
*/
public function withMultibyteSupport($bMultibyteSupport = true)
{
$this->bMultibyteSupport = $bMultibyteSupport;
return $this;
}

/**
* @param string $sDefaultCharset
*
* @return self fluent interface
*/
public function withDefaultCharset($sDefaultCharset)
{
$this->sDefaultCharset = $sDefaultCharset;
return $this;
}

/**
* @param bool $bLenientParsing
*
* @return self fluent interface
*/
public function withLenientParsing($bLenientParsing = true)
{
$this->bLenientParsing = $bLenientParsing;
return $this;
}

/**
* @return self fluent interface
*/
public function beStrict()
{
return $this->withLenientParsing(false);
Expand Down