Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / Form / View / Helper / File / FormFileUploadProgress.php
blobdb907bf2605eba8b4718ee993e3b817685050881
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
8 */
10 namespace Zend\Form\View\Helper\File;
12 use Zend\Form\ElementInterface;
13 use Zend\Form\View\Helper\FormInput;
15 /**
16 * A view helper to render the hidden input with a UploadProgress id
17 * for file uploads progress tracking.
19 class FormFileUploadProgress extends FormInput
21 /**
22 * Invoke helper as functor
24 * Proxies to {@link render()}.
26 * @param ElementInterface|null $element
27 * @return string
29 public function __invoke(ElementInterface $element = null)
31 return $this->renderHiddenId();
34 /**
35 * Render a hidden form <input> element with the progress id
37 * @return string
39 public function renderHiddenId()
41 $attributes = array();
42 $attributes['id'] = 'progress_key';
43 $attributes['name'] = $this->getName();
44 $attributes['type'] = 'hidden';
45 $attributes['value'] = $this->getValue();
47 return sprintf(
48 '<input %s%s',
49 $this->createAttributesString($attributes),
50 $this->getInlineClosingBracket()
54 /**
55 * @return string
57 protected function getName()
59 return 'UPLOAD_IDENTIFIER';
62 /**
63 * @return string
65 protected function getValue()
67 return uniqid();