PriceStruct example

$date = new DateTime($data['__licence_creation']);
                $licence->setCreationDate($date);
            }

            if (isset($data['__licence_expiration']) && !empty($data['__licence_expiration'])) {
                $date = new DateTime($data['__licence_expiration']);
                $licence->setExpirationDate($date);
            }

            switch ($data['__licence_type']) {
                case 2:
                    $price = new PriceStruct('rent');
                    break;
                case 3:
                    $price = new PriceStruct('test');
                    break;
                case 99:
                    $price = new PriceStruct('unlicensed');
                    break;
                default:
                    $price = new PriceStruct('buy');
            }

            
Home | Imprint | This part of the site doesn't use cookies.