add ticket installment

This commit is contained in:
2016-01-22 14:45:56 +01:00
parent bb5978c1df
commit a2a6b1f240
51 changed files with 1498 additions and 113 deletions

View File

@@ -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;