Page MenuHomec4science

PhortuneCurrencySerializer.php
No OneTemporary

File Metadata

Created
Thu, Nov 28, 21:58

PhortuneCurrencySerializer.php

<?php
final class PhortuneCurrencySerializer extends PhabricatorLiskSerializer {
public function willReadValue($value) {
return PhortuneCurrency::newFromString($value);
}
public function willWriteValue($value) {
if (!($value instanceof PhortuneCurrency)) {
throw new Exception(
pht(
'Trying to save object with a currency column, but the column '.
'value is not a %s object.',
'PhortuneCurrency'));
}
return $value->serializeForStorage();
}
}

Event Timeline