From 2cbf6171766ef9312c8651bb8084db1fbc101f66 Mon Sep 17 00:00:00 2001 From: Aleksi Peebles Date: Thu, 7 Jan 2016 09:44:19 +0000 Subject: [PATCH] Change link to patternLink --- src/PatternLab/Data.php | 12 ++++++------ src/PatternLab/Util.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/PatternLab/Data.php b/src/PatternLab/Data.php index 2097117f..a3cf0238 100644 --- a/src/PatternLab/Data.php +++ b/src/PatternLab/Data.php @@ -23,7 +23,7 @@ class Data { protected static $store = array(); - protected static $reservedKeys = array("listItems","cacheBuster","link","patternSpecific","patternLabHead","patternLabFoot"); + protected static $reservedKeys = array("listItems","cacheBuster","patternLink","patternSpecific","patternLabHead","patternLabFoot"); /** * Clear all of the data in the $store @@ -37,7 +37,7 @@ public static function clear() { * * Reserved attributes: * - Data::$store["listItems"] : listItems from listitems.json, duplicated into separate arrays for Data::$store["listItems"]["one"], Data::$store["listItems"]["two"]... etc. - * - Data::$store["link"] : the links to each pattern + * - Data::$store["patternLink"] : the links to each pattern * - Data::$store["cacheBuster"] : the cache buster value to be appended to URLs * - Data::$store["patternSpecific"] : holds attributes from the pattern-specific data files * @@ -136,7 +136,7 @@ public static function gather($options = array()) { } self::$store["cacheBuster"] = Config::getOption("cacheBuster"); - self::$store["link"] = array(); + self::$store["patternLink"] = array(); self::$store["patternSpecific"] = array(); $dispatcherInstance->dispatch("data.gatherEnd"); @@ -321,11 +321,11 @@ public static function printData() { */ public static function setOptionLink($optionName,$optionValue) { - if (!isset(self::$store["link"])) { - self::$store["link"] = array(); + if (!isset(self::$store["patternLink"])) { + self::$store["patternLink"] = array(); } - self::$store["link"][$optionName] = $optionValue; + self::$store["patternLink"][$optionName] = $optionValue; } diff --git a/src/PatternLab/Util.php b/src/PatternLab/Util.php index 9efc488f..d47db872 100644 --- a/src/PatternLab/Util.php +++ b/src/PatternLab/Util.php @@ -28,7 +28,7 @@ public static function compareReplace(&$value) { if (is_string($value)) { $valueCheck = strtolower($value); $valueThin = str_replace("link.","",$valueCheck); - $linkStore = Data::getOption("link"); + $linkStore = Data::getOption("patternLink"); if ((strpos($valueCheck, 'link.') !== false) && array_key_exists($valueThin,$linkStore)) { $value = $linkStore[$valueThin]; }