/** * Allows prefetched phrases to be assigned to vB_Phrase. * * @param array $phrases - Assoc array of key => phrase * @param array $groups - Array of groups in the precache */ public static function preCache($phrases, $groups) { if (!sizeof($phrases) OR !sizeof($groups)) { // be conservative for legacy code return; } self::$precache = array_merge(self::$precache, $phrases); foreach ($groups AS $group) { self::$precached_groups[$group] = true; } }
/** * Allows prefetched phrases to be assigned to vB_Phrase. * * @param array $phrases - Assoc array of key => phrase * @param array $groups - Array of groups in the precache */ public static function preCache($phrases, $groups) { if (!sizeof($phrases) or !sizeof($groups)) { // be conservative for legacy code return; } if (!isset($languageid)) { self::setLanguage(); } self::$precache = array_merge(self::$precache, $phrases); foreach ($groups as $group) { self::$precached_groups[$group] = true; } }