for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Smoren\Schemator\Factories;
use Smoren\Schemator\Interfaces\SchematorBuilderInterface;
use Smoren\Schemator\Interfaces\SchematorInterface;
use Smoren\Schemator\Components\Schemator;
/**
* Builder of Schemator object
* @author Smoren <[email protected]>
*/
class SchematorBuilder implements SchematorBuilderInterface
{
* @var SchematorInterface Schemator object
protected SchematorInterface $schemator;
* SchematorBuilder constructor.
public function __construct()
$this->create();
}
* @inheritDoc
public function create(): SchematorBuilderInterface
$this->schemator = new Schemator();
return $this;
public function withPathDelimiter(string $pathDelimiter): SchematorBuilderInterface
$this->schemator->setPathDelimiter($pathDelimiter);
public function withErrorsLevelMask(int $errorsLevelMask): SchematorBuilderInterface
$this->schemator->setErrorsLevelMask($errorsLevelMask);
public function withFilters(iterable $filters): SchematorBuilderInterface
foreach($filters as $filterName => $filter) {
$this->schemator->addFilter($filterName, $filter);
public function get(): SchematorInterface
return $this->schemator;