for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Psi\Component\ContentType\View;
use Psi\Component\ContentType\View\View;
class ViewBuilder
{
private $view;
private $factory;
public function __construct(ViewFactory $factory, View $view)
$this->factory = $factory;
$this->view = $view;
}
public function add(string $name, string $fieldType, $data, array $options)
$this->view[$name] = $this->create($fieldType, $data, $options);
public function create(string $fieldType, $data, array $options)
return $this->factory->createView($fieldType, $data, $options);
public function setValue($value)
$this->view->setValue($value);
public function getView()
return $this->view;