3if (!defined(
'XOOPS_ROOT_PATH')) {
10 public $mFileName=
null;
11 public $ScreenShot=
null;
12 public $mManifesto=
null;
14 public function __construct($dirName, $manifesto=
null)
16 $this->mDirName=$dirName;
17 if (
null !== $manifesto) {
18 $this->initializeByManifesto($manifesto);
22 public function initializeByManifesto($manifesto)
27 $this->mManifesto=$manifesto;
28 $this->ScreenShot=$manifesto[
'Theme'][
'ScreenShot'];
34 public $_mThemeList = [];
36 public function __construct()
38 if ($handler=opendir(XOOPS_THEME_PATH)) {
39 while (
false !== ($dir=readdir($handler))) {
40 if (
'.' === $dir ||
'..' === $dir) {
44 $themeDir= XOOPS_THEME_PATH .
'/' . $dir;
45 if (is_dir($themeDir)) {
47 if (file_exists($mnfFile = $themeDir .
'/manifesto.ini.php')) {
48 $iniHandler =
new XCube_IniHandler($mnfFile,
true);
49 $manifesto = $iniHandler->getAllConfig();
52 if ((is_countable($manifesto) ? count($manifesto) : 0) > 0) {
57 if (isset($manifesto[
'Manifesto']) && isset($manifesto[
'Manifesto'][
'Depends']) &&
'Legacy_RenderSystem' == $manifesto[
'Manifesto'][
'Depends']) {
58 $this->_mThemeList[]=
new LegacyTheme($dir, $manifesto);
61 $file= $themeDir .
'/theme.html';
62 if (file_exists($file)) {
63 $this->_mThemeList[]=
new LegacyTheme($dir);
72 public function &enumAll()
74 return $this->_mThemeList;