<?php
namespace Modules\Orders\Apollo\Collector\Model\Filters;

class FileParser extends \ModulesAbstract\ImportedOrdersFileManager\Model\Filters\FileParserCachedAbstract
{
	/**
	 * (non-PHPdoc)
	 * @see \ModulesAbstract\ImportedOrdersFileManager\Model\Filters\FileParserCachedAbstract::getExtractedData()
	 */
	protected function getExtractedData($fileFullPath)
	{
		$fileParser = new \App\Apollo\FileParser\MIR();
		$fileParser->setMessagesCollector(new \App\MessagesCollector());
		$fileParser->setRawData(\Engine\File::getContents($fileFullPath));

		// exceptions might get thrown in the following few lines
		$fileParser->extract();
		$extractedData = $fileParser->getExtractedData();

		return $extractedData;
	}
}