|
- <?php
-
-
-
- namespace common\helpers;
-
- class MeanPayment {
-
- const CREDIT = 'credit';
- const CREDIT_CARD = 'credit-card';
- const MONEY = 'money';
- const CHEQUE = 'cheque';
- const TRANSFER = 'transfer';
- const OTHER = 'other';
-
-
-
- public static function getStrBy($meanPayment)
- {
- switch($meanPayment) {
- case self::CREDIT_CARD : return 'Carte bancaire' ;
- case self::MONEY : return 'Espèces' ;
- case self::CHEQUE : return 'Chèque' ;
- case self::TRANSFER : return 'Virement' ;
- case self::OTHER : return 'Autre' ;
- case self::CREDIT : return 'Crédit' ;
- default: return 'Crédit' ;
- }
- }
-
-
-
- public static function getAll()
- {
- return [
- self::CREDIT => self::getStrBy(self::CREDIT),
- self::CREDIT_CARD => self::getStrBy(self::CREDIT_CARD),
- self::MONEY => self::getStrBy(self::MONEY),
- self::CHEQUE => self::getStrBy(self::CHEQUE),
- self::TRANSFER => self::getStrBy(self::TRANSFER),
- self::OTHER => self::getStrBy(self::OTHER),
- self::CREDIT => self::getStrBy(self::CREDIT),
- ] ;
- }
-
- }
|