RequestHandlerInterface.php 860 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Form;
  11. /**
  12. * Submits forms if they were submitted.
  13. *
  14. * @author Bernhard Schussek <bschussek@gmail.com>
  15. */
  16. interface RequestHandlerInterface
  17. {
  18. /**
  19. * Submits a form if it was submitted.
  20. *
  21. * @param FormInterface $form The form to submit
  22. * @param mixed $request The current request
  23. */
  24. public function handleRequest(FormInterface $form, $request = null);
  25. /**
  26. * Returns true if the given data is a file upload.
  27. *
  28. * @param mixed $data The form field data
  29. *
  30. * @return bool
  31. */
  32. public function isFileUpload($data);
  33. }