public static function get_instance() { if (!isset(self::$instance)) { self::$instance = new self(); } return self::$instance; }
private function get_lcp_category() { // In a category page: if ($this->utils->lcp_not_empty('categorypage') && $this->params['categorypage'] == 'yes' || $this->params['id'] == -1) { // Use current category $this->lcp_category_id = LcpCategory::get_instance()->current_category(); } elseif ($this->utils->lcp_not_empty('name')) { // Using the category name: $this->lcp_category_id = LcpCategory::get_instance()->with_name($this->params['name']); $this->params['name'] = null; } elseif (isset($this->params['id']) && $this->params['id'] != '0') { // Using the id: $this->lcp_category_id = LcpCategory::get_instance()->with_id($this->params['id']); } }