license = ($license) ? $license : License::getLicense(); $this->installation_time = strtotime($settings->get('installed_at')); $this->subscribers_count = SubscriberModel::getTotalSubscribers(); } function check() { if ($this->license) return false; $old_user = $this->installation_time < strtotime(self::NEW_LIMIT_DATE); $subscribers_limit = $old_user ? self::SUBSCRIBERS_OLD_LIMIT : self::SUBSCRIBERS_NEW_LIMIT; return $this->subscribers_count > $subscribers_limit; } }