Create Zend Form by annotations

Code
<?php

use Zend\Form\Annotation as A;
use 
Zend\Form\Annotation\AnnotationBuilder;
use 
Zend\Form\View\Helper as Helper;
use 
Zend\View\Renderer\PhpRenderer;

/**
 * @A\Name("foo")
 * @A\Hydrator("Zend\Hydrator\ObjectProperty")
 */
class Foo
{
    
/**
     * @A\Type("Zend\Form\Element\Number")
     * @A\Options({"label":"Foo mail.:"})
     */
    
public $number;
    
    
/**
     * @A\Type("Zend\Form\Element\Text")
     * @A\Options({"label":"Name:"})
     */
    
public $name;
    
    
/**
     * @A\Type("Zend\Form\Element\Checkbox")
     * @A\Options({"label":"Active Foo:"})
     */
    
public $enabled;
}

$builder = new AnnotationBuilder();
$form $builder->createForm('foo');

// render form
$formHelper = new Helper\Form();
$labelHelper = new Helper\FormLabel();

echo 
$formHelper->openTag($form);

echo 
$labelHelper($form->get('name'));
echo (new 
Helper\FormText())($form->get('name'));
echo 
'<br>';
echo 
$labelHelper($form->get('number'));
echo (new 
Helper\FormNumber())($form->get('number'));
echo 
'<br>';
echo 
$labelHelper($form->get('enabled'));
echo (new 
Helper\FormCheckbox())($form->get('enabled'));

echo 
$formHelper->closeTag($form);
Result


Used Versions
PHP 7.1, Zend 3.0, Symfony 3.2, Laravel 5.2, PHPUnit 5.6, Doctrine 2.6