2 namespace wcf\system\cache\builder
;
3 use wcf\data\style\Style
;
7 * Caches the styles and style variables.
10 * @copyright 2001-2013 WoltLab GmbH
11 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
12 * @package com.woltlab.wcf
13 * @subpackage system.cache.builder
14 * @category Community Framework
16 class StyleCacheBuilder
extends AbstractCacheBuilder
{
18 * @see wcf\system\cache\builder\AbstractCacheBuilder::rebuild()
20 public function rebuild(array $parameters) {
28 FROM wcf".WCF_N
."_style
29 ORDER BY styleName ASC";
30 $statement = WCF
::getDB()->prepareStatement($sql);
31 $statement->execute();
32 while ($row = $statement->fetchArray()) {
33 if ($row['isDefault']) $data['default'] = $row['styleID'];
34 $style = new Style(null, $row);
35 $style->loadVariables();
37 $data['styles'][$row['styleID']] = $style;