/** * Returns categories of this knowledgebase article. * Result is cached until the end of script. * * @param bool $reload True to reload data from server. False to use the cached value (if present). * @return kyResultSet */ public function getCategories($reload = false) { foreach ($this->category_ids as $category_id) { if (!is_array($this->categories) || !array_key_exists($category_id, $this->categories) || $reload) { $this->categories[$category_id] = kyKnowledgebaseCategory::get($category_id); } } return new kyResultSet(array_values($this->categories)); }