1: <?php
2: 3: 4: 5: 6: 7: 8: 9:
10:
11: 12: 13:
14: class XCube_Theme
15: {
16: 17: 18: 19: 20:
21: var $mName = null;
22:
23: 24: 25: 26: 27:
28: var $mDirname = null;
29:
30: 31: 32: 33: 34:
35: var $mDepends = array();
36:
37: var $mVersion = null;
38:
39: var $mUrl = null;
40:
41: 42: 43: 44: 45:
46: var $mRenderSystemName = null;
47:
48: 49: 50: 51: 52:
53: var $mScreenShot = null;
54:
55: var $mDescription = null;
56:
57: 58: 59: 60: 61: 62:
63: var $mFormat = null;
64:
65: var $mAuthor = null;
66:
67: 68: 69:
70: var $mLicence = null;
71:
72: var $mLicense = null;
73:
74: var $_mManifesto = array();
75:
76: 77: 78: 79: 80: 81:
82: function loadManifesto($file)
83: {
84: if (file_exists($file)) {
85: $iniHandler = new XCube_IniHandler($file, true);
86: $this->_mManifesto = $iniHandler->getAllConfig();
87: $this->mName = isset($this->_mManifesto['Manifesto']['Name']) ? $this->_mManifesto['Manifesto']['Name'] : "";
88: $this->mDepends = isset($this->_mManifesto['Manifesto']['Depends']) ? $this->_mManifesto['Manifesto']['Depends'] : "";
89: $this->mVersion = isset($this->_mManifesto['Manifesto']['Version']) ? $this->_mManifesto['Manifesto']['Version'] : "";
90: $this->mUrl = isset($this->_mManifesto['Manifesto']['Url']) ? $this->_mManifesto['Manifesto']['Url'] : "";
91:
92: $this->mRenderSystemName = isset($this->_mManifesto['Theme']['RenderSystem']) ? $this->_mManifesto['Theme']['RenderSystem'] : "";
93: $this->mAuthor = isset($this->_mManifesto['Theme']['Author']) ? $this->_mManifesto['Theme']['Author'] : "";
94:
95: if (isset($this->_mManifesto['Theme']['ScreenShot'])) {
96: $this->mScreenShot = $this->_mManifesto['Theme']['ScreenShot'];
97: }
98:
99: if (isset($this->_mManifesto['Theme']['Description'])) {
100: $this->mDescription = $this->_mManifesto['Theme']['Description'];
101: }
102:
103: $this->mFormat = isset($this->_mManifesto['Theme']['Format']) ? $this->_mManifesto['Theme']['Format'] : "";
104:
105: if (isset($this->_mManifesto['Theme']['License'])) {
106: $this->mLicense = $this->_mManifesto['Theme']['License'];
107: $this->mLicence = $this->_mManifesto['Theme']['License'];
108: }
109: elseif (isset($this->_mManifesto['Theme']['Licence'])) {
110: $this->mLicense = $this->_mManifesto['Theme']['Licence'];
111: $this->mLicence = $this->_mManifesto['Theme']['Licence'];
112: }
113:
114: return true;
115: }
116: else {
117: return false;
118: }
119: }
120: }
121:
122: ?>