for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Pim\Bundle\ExcelConnectorBundle\Iterator;
use Symfony\Component\OptionsResolver\OptionsResolver;
/**
* Abstract file iterator
*
* @author Antoine Guigan <[email protected]>
* @copyright 2013 Akeneo SAS (http://www.akeneo.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
abstract class AbstractFileIterator implements \Iterator
{
/** @var string */
protected $filePath;
/** @var array */
protected $options;
* @param string $filePath
* @param array $options
public function __construct($filePath, array $options = array())
$this->filePath = $filePath;
$resolver = new OptionsResolver;
$this->setDefaultOptions($resolver);
$this->options = $resolver->resolve($options);
}
* Sets the default options
* @param OptionsResolver $resolver
protected function setDefaultOptions(OptionsResolver $resolver)