add ticket installment
This commit is contained in:
@@ -6,8 +6,9 @@ use common\components\giro\GiroBase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @property common\components\giro\GiroUzenetsorszam $uzenetSorszam
|
||||
* @property common\components\giro\GiroBankszamla $kezdemenyezoBankszamla
|
||||
* @property common\components\giro\GiroDETSTAFej $fej
|
||||
* @property common\components\giro\GiroDETSTALab $lab
|
||||
* @property common\components\giro\GiroDETSTATetel $tetelek
|
||||
*
|
||||
*/
|
||||
class GiroDETSTA extends GiroBase {
|
||||
@@ -20,14 +21,25 @@ class GiroDETSTA extends GiroBase {
|
||||
}
|
||||
|
||||
|
||||
public function toString(){
|
||||
$s = "";
|
||||
$s .= $this->fej->toString();
|
||||
foreach ($this->tetelek as $tetel ){
|
||||
$s .= $tetel->toString();
|
||||
}
|
||||
$s .= $this->lab->toString();
|
||||
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
||||
public static function parse($content){
|
||||
$detsta = new GiroDETSTA();
|
||||
$array = preg_split("/\r\n|\n|\r/", $content);
|
||||
$detsta->fej = GiroDETSTAFej::parse($array[0]);
|
||||
$detsta->lab = GiroDETSTALab::parse($array[count($array) -1]);
|
||||
$detsta->lab = GiroDETSTALab::parse($array[count($array) -2]);
|
||||
|
||||
for ( $i = 1 ; $i < count($array) -1; $i++ ){
|
||||
for ( $i = 1 ; $i < count($array) -2; $i++ ){
|
||||
$row = $array[$i];
|
||||
$tetel = GiroDETSTATetel::parse($row);
|
||||
$detsta->tetelek[] = $tetel;
|
||||
|
||||
Reference in New Issue
Block a user