diff options
| author | Vjacheslav Trushkin <arty@phpbb.com> | 2012-03-15 13:13:21 +0200 |
|---|---|---|
| committer | Vjacheslav Trushkin <arty@phpbb.com> | 2012-03-15 13:13:21 +0200 |
| commit | 3997ffac2a2e6f422dcd5cd5bd076edee6fa91dd (patch) | |
| tree | 2436f29908131c404dc3bcb094ba380bb65744c1 /phpBB/includes/style/style.php | |
| parent | 39944a08b9ea031dfc156f61ad0d8f4c594882e5 (diff) | |
| download | forums-3997ffac2a2e6f422dcd5cd5bd076edee6fa91dd.tar forums-3997ffac2a2e6f422dcd5cd5bd076edee6fa91dd.tar.gz forums-3997ffac2a2e6f422dcd5cd5bd076edee6fa91dd.tar.bz2 forums-3997ffac2a2e6f422dcd5cd5bd076edee6fa91dd.tar.xz forums-3997ffac2a2e6f422dcd5cd5bd076edee6fa91dd.zip | |
[feature/merging-style-components] Creating style class
Creating phpbb_style class, changing template initialization to style initialization
PHPBB3-10632
Diffstat (limited to 'phpBB/includes/style/style.php')
| -rw-r--r-- | phpBB/includes/style/style.php | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/phpBB/includes/style/style.php b/phpBB/includes/style/style.php new file mode 100644 index 0000000000..217a70e237 --- /dev/null +++ b/phpBB/includes/style/style.php @@ -0,0 +1,89 @@ +<?php +/** +* +* @package phpBB3 +* @copyright (c) 2005 phpBB Group, sections (c) 2001 ispi of Lincoln Inc +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +/** +* Base Style class. +* @package phpBB3 +*/ +class phpbb_style +{ + /** + * @var phpbb_style_template Template class. + * Handles everything related to templates. + */ + public $template; + + /** + * @var string Path of the cache directory for the template + */ + public $cachepath = ''; + + /** + * @var string phpBB root path + */ + private $phpbb_root_path; + + /** + * @var phpEx PHP file extension + */ + private $phpEx; + + /** + * @var phpbb_config phpBB config instance + */ + private $config; + + /** + * @var user current user + */ + private $user; + + /** + * Style resource locator + * @var phpbb_style_resource_locator + * This item is temporary public, until locate() function is implemented + */ + public $locator; + + /** + * Style path provider + * @var phpbb_style_path_provider + */ + private $provider; + + /** + * Constructor. + * + * @param string $phpbb_root_path phpBB root path + * @param user $user current user + * @param phpbb_extension_manager $phpbb_extension_manager extension manager. Set it to false if extension manager should not be used. + */ + public function __construct($phpbb_root_path, $phpEx, $config, $user, $phpbb_extension_manager = false) + { + $this->phpbb_root_path = $phpbb_root_path; + $this->phpEx = $phpEx; + $this->config = $config; + $this->user = $user; + $this->locator = new phpbb_style_locator(); + $this->provider = new phpbb_style_path_provider(); + if ($phpbb_extension_manager !== false) + { + $this->provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, $this->provider); + } + $this->template = new phpbb_style_template($this->phpbb_root_path, $this->phpEx, $this->config, $this->user, $this->locator, $this->provider); + } +} |
