Created
January 1, 2012 08:48
-
-
Save merk/1546765 to your computer and use it in GitHub Desktop.
Dough usage (until Doctrine 2.3's Value object support)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @param MoneyInterface $defaultIncrementalFee | |
| */ | |
| public function setDefaultIncrementalFee(MoneyInterface $defaultIncrementalFee) | |
| { | |
| $this->_defaultIncrementalFee = $defaultIncrementalFee; | |
| $this->defaultIncrementalFee = $defaultIncrementalFee->reduce()->getAmount(); | |
| } | |
| /** | |
| * @return MoneyInterface | |
| */ | |
| public function getDefaultIncrementalFee() | |
| { | |
| if (null === $this->_defaultIncrementalFee && null !== $this->defaultIncrementalFee) { | |
| $this->_defaultIncrementalFee = new Money($this->defaultIncrementalFee); | |
| } | |
| return $this->_defaultIncrementalFee; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment