<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;

/* @bundles/FormBundle/Crate/UploadFileCrate.php */
class __TwigTemplate_bb4195d2bb15182ee8e3e2259ea57381 extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        echo "<?php

namespace Mautic\\FormBundle\\Crate;

use Mautic\\FormBundle\\Entity\\Field;
use Symfony\\Component\\HttpFoundation\\File\\UploadedFile;

class UploadFileCrate implements \\Iterator
{
    /**
     * @var array|FileFieldCrate[]
     */
    private \$fileFieldCrate = [];

    /**
     * @var int
     */
    private \$position = 0;

    public function addFile(UploadedFile \$file, Field \$field)
    {
        \$this->fileFieldCrate[] = new FileFieldCrate(\$file, \$field);
    }

    public function rewind()
    {
        \$this->position = 0;
    }

    public function current()
    {
        return \$this->fileFieldCrate[\$this->position];
    }

    public function key()
    {
        return \$this->position;
    }

    public function next()
    {
        ++\$this->position;
    }

    public function valid()
    {
        return isset(\$this->fileFieldCrate[\$this->position]);
    }
}
";
    }

    public function getTemplateName()
    {
        return "@bundles/FormBundle/Crate/UploadFileCrate.php";
    }

    public function getDebugInfo()
    {
        return array (  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "@bundles/FormBundle/Crate/UploadFileCrate.php", "/var/www/mautic/app/bundles/FormBundle/Crate/UploadFileCrate.php");
    }
}
