<?php
namespace App\Galileo\LineParser\Types;

/**
 * Only letters, UT8 compatible
 * @author Lucian Sirbu
 *
 */
class Integer extends \App\Utils\BaseParser\TextParser\Types\Integer
{
	protected $extractRegexp = "/^(?P<rawData>[0-9\s]__LENGHTS__)/";

	/**
	 * (non-PHPdoc)
	 * @see \App\Utils\BaseParser\TextParser\Types\Integer::convert()
	 */
	protected function convert(\App\Utils\BaseParser\TextParser\ExtractedBlock $ret)
	{
		if (ltrim($ret->extractedData, ' ')==='') {
			$this->extractedData = null;
			$ret->extractedData = $this->extractedData;
			return $ret;
		}
	}

}
