function get_context_params(FS_Scope_Entity $entity, $timestamp = false, $action = '') { if (false === $timestamp) { $timestamp = time(); } return array('s_ctx_type' => $entity->get_type(), 's_ctx_id' => $entity->id, 's_ctx_ts' => $timestamp, 's_ctx_secure' => $this->get_secure_token($entity, $timestamp, $action)); }
/** * @param stdClass|bool $site */ function __construct($site = false) { $this->plan = new FS_Plugin_Plan(); parent::__construct($site); if (is_object($site)) { $this->plan->id = $site->plan_id; } }
/** * @param stdClass|bool $plugin */ function __construct($plugin = false) { parent::__construct($plugin); $this->is_premium = false; $this->is_live = true; if (isset($plugin->info) && is_object($plugin->info)) { $this->info = new FS_Plugin_Info($plugin->info); } }
/** * @param stdClass|bool $user */ function __construct($user = false) { if (!$user instanceof stdClass) { return; } parent::__construct($user); $this->email = $user->email; $this->first = $user->first; $this->last = $user->last; $this->is_verified = $user->is_verified; }
/** * @param stdClass|bool $plugin */ function __construct($plugin = false) { if (!$plugin instanceof stdClass) { return; } parent::__construct($plugin); $this->slug = $plugin->slug; $this->title = $plugin->title; $this->is_premium = false; $this->is_live = true; if (isset($plugin->info) && is_object($plugin->info)) { $this->info = new FS_Plugin_Info($plugin->info); } }
/** * @param stdClass|bool $site */ function __construct($site = false) { $this->plan = new FS_Plugin_Plan(); if (!$site instanceof stdClass) { return; } parent::__construct($site); $this->user_id = $site->user_id; $this->plan->id = $site->plan_id; $this->license_id = $site->license_id; $this->version = $site->version; $this->is_premium = $site->is_premium; /** * Added trial properties. * * @author Vova Feldman (@svovaf) * @since 1.0.9 */ $this->trial_plan_id = $site->trial_plan_id; $this->trial_ends = $site->trial_ends; }
/** * @param object|bool $user */ function __construct($user = false) { parent::__construct($user); }