我有以下注释例外。我需要在zend控制器中更改表单值
$ atom -h
所以在控制器中我有:
/**
* @Annotation\Hydrator("Zend\Stdlib\Hydrator\ObjectProperty")
* @Annotation\Name("LoginForm")
*
*/
class User
{
/** Some comment to make this annotation work
* @Annotation\Type("Zend\Form\Element\Text")
* @Annotation\Required({"required":"true" })
* @Annotation\Filter({"name":"StripTags"})
* @Annotation\Options({"label":"Firstname: "})
* @Annotation\Attributes({"id":"FirstnameId"})
*/
public $username;
现在我如何设置或更改用户字段的值?
我试过了$user = new User();
$builder = new AnnotationBuilder();
$this->form = $builder->createForm($user);
但它没有用?