3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\Form\Annotation
;
12 use Zend\Filter\Boolean
as BooleanFilter
;
15 * ContinueIfEmpty annotation
17 * Presence of this annotation is a hint that the associated
18 * \Zend\InputFilter\Input should enable the continueIfEmpty flag.
21 * @deprecated 2.4.8 Use `@Validator({"name":"NotEmpty"})` instead.
28 protected $continueIfEmpty = true;
31 * Receive and process the contents of an annotation
35 public function __construct(array $data)
37 $continueIfEmpty = (isset($data['value']))
41 if (! is_bool($continueIfEmpty)) {
42 $filter = new BooleanFilter();
43 $continueIfEmpty = $filter->filter($continueIfEmpty);
46 $this->continueIfEmpty
= $continueIfEmpty;
50 * Get value of required flag
54 public function getContinueIfEmpty()
56 return $this->continueIfEmpty
;