コード例 #1
0
ファイル: Knab.php プロジェクト: SamMousa/php-mt940
 /**
  * @inheritdoc
  */
 protected function parseTransactionDescription()
 {
     $description = parent::parseTransactionDescription();
     $accountIsInDescription = strpos($description, 'REK:');
     if ($accountIsInDescription !== false) {
         return trim(substr($description, 0, $accountIsInDescription));
     }
     $name = $this->parseTransactionAccountName();
     $accountNameIsInDescription = strpos($description, $name);
     if ($accountNameIsInDescription !== false) {
         return trim(substr($description, 0, $accountNameIsInDescription - 6));
     }
     return $description;
 }
コード例 #2
0
ファイル: Triodos.php プロジェクト: AccountingBox/php-mt940
 /**
  * In Triodos everything is put into :86: field with '>\d{2}' seperators
  * This method parses that out and returns the array
  *
  * @return array
  */
 private function getDescriptionParts()
 {
     $parts = explode('>', parent::parseTransactionDescription());
     array_shift($parts);
     // remove 000 prefix
     return $parts;
 }