<?php
namespace App\Sabre\LineParser\Types\Line;

/**
 *
 * @author Lucian Sirbu
 */
class M0Var extends \App\Sabre\LineParser\Types\SabreBaseLine
{
	protected $extractRegexp = "/^(?P<rawData>.*)/s";

	/**
	 * The following fields are variable fields. They appear sequentially in the M0 record and may or may not
	 * contain data based on whether the corresponding field exists in the Sabre PNR. If the data field is
	 * present, then it will be moved into the M0 followed by a Carriage Return, which will act as a field
	 * separator. If the data field is not present, no data will be moved, however, the Carriage Return will still be
	 * present to mark the end of the absent data field.
	 */

	/**
	 * Children elements
	 */
	protected $children = [
	    ['key'=>'IU0TPR',    'type'=>'StringMultilineFixed', 'req'=>false,   'lines'=>1,     'label'=>'IU0TPR'],    // TRAVEL POLICY NUMBER
	    ['key'=>'IU0BL1',    'type'=>'StringMultilineFixed', 'req'=>false,   'lines'=>5,     'label'=>'IU0BL1'],    // FIRST ADDRESS FIELD
	    ['key'=>'IU0BL2',    'type'=>'StringMultilineFixed', 'req'=>false,   'lines'=>5,     'label'=>'IU0BL2'],    // FIRST ADDRESS FIELD
	    ['key'=>'IU0PH1',    'type'=>'StringMultilineFixed', 'req'=>false,   'lines'=>1,     'label'=>'IU0PH1'],    // PHONE FIELD 1
	    ['key'=>'IU0PH2',    'type'=>'StringMultilineFixed', 'req'=>false,   'lines'=>1,     'label'=>'IU0PH2'],    // PHONE FIELD 2
	    ['key'=>'IU0PH3',    'type'=>'StringMultilineFixed', 'req'=>false,   'lines'=>1,     'label'=>'IU0PH3'],    // PHONE FIELD 3
	    ['key'=>'IU0RCV',    'type'=>'StringMultilineFixed', 'req'=>false,   'lines'=>1,     'label'=>'IU0RCV'],    // RECEIVED FIELD
	];
}
