[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/phortune/currency/ -> PhortuneCurrencySerializer.php (source)

   1  <?php
   2  
   3  final class PhortuneCurrencySerializer extends PhabricatorLiskSerializer {
   4  
   5    public function willReadValue($value) {
   6      return PhortuneCurrency::newFromString($value);
   7    }
   8  
   9    public function willWriteValue($value) {
  10      if (!($value instanceof PhortuneCurrency)) {
  11        throw new Exception(
  12          pht(
  13            'Trying to save object with a currency column, but the column '.
  14            'value is not a PhortuneCurrency object.'));
  15      }
  16  
  17      return $value->serializeForStorage();
  18    }
  19  
  20  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1