->add('title', TextType::class, ['attr' => [
'class' => 'form-control'
'label' => 'blablabla'
]])
class AnObj extends stdClass
{
public function __call($closure, $args)
{
return call_user_func_array($this->{$closure}, $args);
}
}
$a=new AnObj();
$a->color="red";
$a->sayhello=function(){ echo "hello!";}
$a->sayhello();//output: "hello!"