Skip to content
This repository was archived by the owner on May 13, 2026. It is now read-only.

Commit f2a0b5c

Browse files
committed
clear data store methods
1 parent a2c535b commit f2a0b5c

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

src/PatternLab/Annotations.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ class Annotations {
2525

2626
protected static $store = array();
2727

28+
/**
29+
* Clear all of the data in the $store
30+
*/
31+
public static function clear() {
32+
self::$store = array();
33+
}
34+
2835
/**
2936
* Gather data from annotations.js and *.md files found in source/_annotations
3037
*

src/PatternLab/Data.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ class Data {
2525
protected static $store = array();
2626
protected static $reservedKeys = array("listItems","cacheBuster","link","patternSpecific","patternLabHead","patternLabFoot");
2727

28+
/**
29+
* Clear all of the data in the $store
30+
*/
31+
public static function clear() {
32+
self::$store = array();
33+
}
34+
2835
/**
2936
* Gather data from any JSON and YAML files in source/_data
3037
*

src/PatternLab/PatternData.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ public static function checkPatternOption($patternStoreKey,$optionName) {
6464

6565
}
6666

67+
/**
68+
* Clear all of the data in the $store
69+
*/
70+
public static function clear() {
71+
self::$store = array();
72+
}
73+
6774
/**
6875
* Check to see if the given pattern type has a pattern subtype associated with it
6976
* @param {String} the name of the pattern

0 commit comments

Comments
 (0)