booked/Domain/Quota.php
/**
	 * @static
	 * @param string $duration QuotaDuration
	 * @return IQuotaDuration
	 */
@static
@param string $duration QuotaDuration
@return IQuotaDuration
@static @param string $duration QuotaDuration @return IQuotaDuration
public static function CreateDuration($duration)
	{
		if ($duration == QuotaDuration::Day)
		{
			return new QuotaDurationDay();
		}
		if ($duration == QuotaDuration::Week)
		{
			return new QuotaDurationWeek();
		}
		if ($duration == QuotaDuration::Month)
		{
			return new QuotaDurationMonth();
		}
		return new QuotaDurationYear();
	}
public static function CreateDuration ( $ duration ) { if ( $ duration == QuotaDuration :: Day ) { return new QuotaDurationDay ( ) ; } if ( $ duration == QuotaDuration :: Week ) { return new QuotaDurationWeek ( ) ; } if ( $ duration == QuotaDuration :: Month ) { return new QuotaDurationMonth ( ) ; } return new QuotaDurationYear ( ) ; }
@static
 @param string $duration QuotaDuration
 @return IQuotaDuration
@static @param string $duration QuotaDuration @return IQuotaDuration