config = new xlvask_c(); $this->helpers = new xlvask_helpers(); } /** * @inheritDoc */ public function requireModuleEnabled(): void { if (!(bool)$this->config->enabled->getVariableValue()) { throw new Exception('xlvask module is not enabled'); } } /** * Get the task helper for the xlvask module * @return xlvask_tasks */ public function getTasks(): xlvask_tasks { return new $this->helpers->xlvask_tasks(); } /** * Get the cache helper for the xlvask module * @return xlvask_cache */ public function getCache(): \helpers\xlvask_cache { return new $this->helpers->xlvask_cache(); } /** * Get the guid helper for the xlvask module * @return xlvask_guid */ public function getGuid(): xlvask_guid { return new $this->helpers->xlvask_guid(); } /** * Create a new instance of a helper class * @param string $helper_class The class name of the helper to create * @throws Exception If the helper class does not exist or is not a valid helper. */ public function new(string $helper_class): \helpers\xlvask_vehicle_types|\helpers\xlvask_usage_log|\helpers\xlvask_customer|xlvask_cache|xlvask_tasks|\helpers\xlvask_wash_item|\helpers\xlvask_create_customer|\helpers\xlvask_helper|\helpers\xlvask_vehicle_type|\helpers\xlvask_vehicle|\helpers\xlvask_vehicles|xlvask_guid { return $this->helpers->new($helper_class); } }