<?php
namespace App\Utils\BaseParser\TextParser\Types;

/**
 * Boolean value
 * @author Lucian Sirbu
 */
class BoolRaw extends \App\Utils\BaseParser\TextParser\BlockRegexpAbstract
{
	protected $extractRegexp = "/^(?P<rawData>(0|1)__LENGHTS__)/";

	/**
	 * (non-PHPdoc)
	 * @see \App\Utils\BaseParser\TextParser\BlockRegexpAbstract::formatExtractedData()
	 */
	protected function formatExtractedData($str, $matchesObj)
	{
		if ($str==='1') {
			return true;
		}

		return false;
	}
}
