setSubscription example

$licence->setIconPath($row['plugin']['iconPath']);

            if (isset($row['creationDate'])) {
                $date = new DateTime($row['creationDate']);
                $licence->setCreationDate($date);
            }

            $subscription = null;
            if (isset($row['subscription'])) {
                $subscription = $row['subscription'];

                $licence->setSubscription($subscription['type']['name']);
            }

            if (isset($subscription) && $subscription['expirationDate']) {
                $date = new DateTime($subscription['expirationDate']);
                $licence->setExpirationDate($date);
            } else {
                if (isset($row['expirationDate'])) {
                    $date = new DateTime($row['expirationDate']);
                    $licence->setExpirationDate($date);
                }
            }

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