Skip to content

Commit

Permalink
Fix for recent interface change to ElementPrepareAwareInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
cgmartin committed Jan 24, 2013
1 parent af58ac2 commit 38aea0f
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions library/Zend/Form/Element/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use Zend\Form\Fieldset;
use Zend\Form\FieldsetInterface;
use Zend\Form\FieldsetPrepareAwareInterface;
use Zend\Form\Form;
use Zend\Form\FormInterface;
use Zend\Stdlib\ArrayUtils;

class Collection extends Fieldset implements FieldsetPrepareAwareInterface
Expand Down Expand Up @@ -434,10 +434,10 @@ public function getTemplateElement()
/**
* Prepare the collection by adding a dummy template element if the user want one
*
* @param Form $form
* @param FormInterface $form
* @return mixed|void
*/
public function prepareElement(Form $form)
public function prepareElement(FormInterface $form)
{
// Create a template that will also be prepared
if ($this->shouldCreateTemplate) {
Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Form/Element/Csrf.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

use Zend\Form\Element;
use Zend\Form\ElementPrepareAwareInterface;
use Zend\Form\Form;
use Zend\Form\FormInterface;
use Zend\InputFilter\InputProviderInterface;
use Zend\Validator\Csrf as CsrfValidator;

Expand Down Expand Up @@ -149,7 +149,7 @@ public function getInputSpecification()
/**
* Prepare the form element
*/
public function prepareElement(Form $form)
public function prepareElement(FormInterface $form)
{
$this->getCsrfValidator()->getHash(true);
}
Expand Down
6 changes: 3 additions & 3 deletions library/Zend/Form/Element/DateSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Zend\Form\Element;

use DateTime as PhpDateTime;
use Zend\Form\Form;
use Zend\Form\FormInterface;
use Zend\Validator\ValidatorInterface;
use Zend\Validator\Date as DateValidator;
use Zend\Form\Exception\InvalidArgumentException;
Expand Down Expand Up @@ -117,10 +117,10 @@ public function setValue($value)
/**
* Prepare the form element (mostly used for rendering purposes)
*
* @param Form $form
* @param FormInterface $form
* @return mixed
*/
public function prepareElement(Form $form)
public function prepareElement(FormInterface $form)
{
parent::prepareElement($form);

Expand Down
6 changes: 3 additions & 3 deletions library/Zend/Form/Element/DateTimeSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Zend\Form\Element;

use DateTime as PhpDateTime;
use Zend\Form\Form;
use Zend\Form\FormInterface;
use Zend\Validator\ValidatorInterface;
use Zend\Validator\Date as DateValidator;
use Zend\Form\Exception\InvalidArgumentException;
Expand Down Expand Up @@ -246,10 +246,10 @@ public function setValue($value)
/**
* Prepare the form element (mostly used for rendering purposes)
*
* @param Form $form
* @param FormInterface $form
* @return mixed
*/
public function prepareElement(Form $form)
public function prepareElement(FormInterface $form)
{
parent::prepareElement($form);

Expand Down
6 changes: 3 additions & 3 deletions library/Zend/Form/Element/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace Zend\Form\Element;

use Zend\Form\Form;
use Zend\Form\FormInterface;
use Zend\Form\Element;
use Zend\Form\ElementPrepareAwareInterface;
use Zend\InputFilter\InputProviderInterface;
Expand All @@ -41,10 +41,10 @@ class File extends Element implements InputProviderInterface, ElementPrepareAwar
/**
* Prepare the form element (mostly used for rendering purposes)
*
* @param Form $form
* @param FormInterface $form
* @return mixed
*/
public function prepareElement(Form $form)
public function prepareElement(FormInterface $form)
{
// Ensure the form is using correct enctype
$form->setAttribute('enctype', 'multipart/form-data');
Expand Down
6 changes: 3 additions & 3 deletions library/Zend/Form/Element/MonthSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use DateTime;
use Zend\Form\Element;
use Zend\Form\ElementPrepareAwareInterface;
use Zend\Form\Form;
use Zend\Form\FormInterface;
use Zend\InputFilter\InputProviderInterface;
use Zend\Validator\ValidatorInterface;
use Zend\Validator\Regex as RegexValidator;
Expand Down Expand Up @@ -249,10 +249,10 @@ public function setValue($value)
/**
* Prepare the form element (mostly used for rendering purposes)
*
* @param Form $form
* @param FormInterface $form
* @return mixed
*/
public function prepareElement(Form $form)
public function prepareElement(FormInterface $form)
{
$name = $this->getName();
$this->monthElement->setName($name . '[month]');
Expand Down
6 changes: 3 additions & 3 deletions library/Zend/Form/Element/Password.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace Zend\Form\Element;

use Zend\Form\Form;
use Zend\Form\FormInterface;
use Zend\Form\Element;
use Zend\Form\ElementPrepareAwareInterface;

Expand All @@ -40,10 +40,10 @@ class Password extends Element implements ElementPrepareAwareInterface
/**
* Remove the password before rendering if the form fails in order to avoid any security issue
*
* @param Form $form
* @param FormInterface $form
* @return mixed
*/
public function prepareElement(Form $form)
public function prepareElement(FormInterface $form)
{
$this->setValue('');
}
Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Form/Fieldset.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,10 @@ public function getMessages($elementName = null)
* Ensures state is ready for use. Here, we append the name of the fieldsets to every elements in order to avoid
* name clashes if the same fieldset is used multiple times
*
* @param Form $form
* @param FormInterface $form
* @return mixed|void
*/
public function prepareElement(Form $form)
public function prepareElement(FormInterface $form)
{
$name = $this->getName();

Expand Down

0 comments on commit 38aea0f

Please sign in to comment.