59 lines
1.5 KiB
PHP
59 lines
1.5 KiB
PHP
<?php
|
|
namespace common\components\giro;
|
|
|
|
|
|
/**
|
|
* @property \common\components\giro\GiroUzenetsorszam $csoportosUzenetSorszam
|
|
* @property \common\components\giro\GiroBankszamla $kezdemenyezoBankszamla
|
|
* */
|
|
class GiroDETSTAFej extends GiroBase{
|
|
|
|
public $recordTipus = "01";
|
|
public $uzenetTipus = "DETSTA";
|
|
public $jelentesJelzo = "9";
|
|
public $kezdemenyezoAzonosito = "";
|
|
|
|
public $csoportosUzenetSorszam;
|
|
public $detstaUzenetSorszam;
|
|
public $ido;
|
|
|
|
|
|
public function __construct(){
|
|
$this->csoportosUzenetSorszam = new GiroUzenetsorszam();
|
|
$this->detstaUzenetSorszam = new GiroUzenetsorszam();
|
|
}
|
|
|
|
public function toString( ) {
|
|
return $this->recordTipus
|
|
.$this->uzenetTipus
|
|
. $this->jelentesJelzo
|
|
. $this->szamKitolt( $this->kezdemenyezoAzonosito , 13)
|
|
. $this->csoportosUzenetSorszam->toString()
|
|
. $this->detstaUzenetSorszam->toString()
|
|
. $this->ido
|
|
. $this->rekordVege()
|
|
;
|
|
}
|
|
|
|
/**
|
|
* @param $row
|
|
* @return GiroDETSTAFej
|
|
*/
|
|
public static function parse($row){
|
|
$fej = new GiroDETSTAFej();
|
|
|
|
$fej->recordTipus = substr($row,0,2 );
|
|
$fej->uzenetTipus = substr($row, 2,6 );
|
|
$fej->jelentesJelzo = substr($row, 8,1);
|
|
$fej->kezdemenyezoAzonosito = substr($row, 9,13);
|
|
$fej->csoportosUzenetSorszam ->osszeallitasDatuma = substr($row, 22, 8);
|
|
$fej->csoportosUzenetSorszam->sorszam = static::szamOlvas($row, 30, 4);
|
|
$fej->detstaUzenetSorszam ->osszeallitasDatuma = substr($row, 34,8);
|
|
$fej->detstaUzenetSorszam->sorszam = static::szamOlvas($row, 42,4);
|
|
$fej->ido = substr($row, 46,6);
|
|
|
|
return $fej;
|
|
}
|
|
|
|
|
|
} |