/** * Parse and return all tags * * @param boolean $forceTokenizer Flag to force tokenizer use (since LC_Dependencies classes could be non-working) * * @return array */ public function getTags($forceTokenizer = false) { if (!isset($this->tags)) { $this->tags = \Includes\Decorator\Utils\Operator::getTags($this->getReflection($forceTokenizer)->docComment); if (!empty($this->tags['lc_dependencies'][0])) { $this->tags['lc_dependencies'] = \Includes\Utils\Converter::parseQuery($this->tags['lc_dependencies'][0], null, ',', '"\'', false); } } return $this->tags; }
/** * Parse value of a phpDocumenter tag * * @param string $value Value to parse * * @return array */ protected static function parseTagValue($value) { return \Includes\Utils\Converter::parseQuery($value, '=', ',', '"\''); }
/** * Get canonical URL by clean URL * * @param string $path Clean url * * @return string */ public function getURLByCleanURL($path) { $cleanURL = null; if (preg_match('/(' . \XLite\Core\Converter::getCleanURLAllowedCharsPattern() . ')\\.html?$/Si', $path, $parts)) { $product = \XLite\Core\Database::getRepo('XLite\\Model\\Product')->findOneByCleanURL($parts[1]); if (isset($product)) { $cleanURL = $this->buildCleanURL('product', '', array('product_id' => $product->getProductId())); } } else { $parts = preg_split('\'/\'', $path, 2, PREG_SPLIT_NO_EMPTY); $category = \XLite\Core\Database::getRepo('XLite\\Model\\Category')->findOneByCleanURL($parts[0]); if (isset($category)) { $params = array('category_id' => $category->getCategoryId()); if (!empty($parts[1])) { $query = \Includes\Utils\Converter::parseQuery($parts[1], '-', '/'); if (is_array($query)) { $params += $query; } } $cleanURL = $this->buildCleanURL('category', '', $params); } } return $cleanURL; }