00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 class Mage_Install_Model_Config extends Varien_Simplexml_Config
00036 {
00037
00038 const XML_PATH_WIZARD_STEPS = 'wizard/steps';
00039 const XML_PATH_CHECK_WRITEABLE = 'check/filesystem/writeable';
00040 const XML_PATH_CHECK_EXTENSIONS = 'check/php/extensions';
00041
00042 public function __construct()
00043 {
00044 parent::__construct();
00045 $this->loadString('<?xml version="1.0"?><config></config>');
00046 Mage::getConfig()->loadModulesConfiguration('install.xml', $this);
00047 }
00048
00049
00050
00051
00052
00053
00054
00055
00056 public function getWizardSteps()
00057 {
00058 $steps = array();
00059 foreach ((array)$this->getNode(self::XML_PATH_WIZARD_STEPS) as $stepName=>$step) {
00060 $stepObject = new Varien_Object((array)$step);
00061 $stepObject->setName($stepName);
00062 $steps[] = $stepObject;
00063 }
00064 return $steps;
00065 }
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081 public function getPathForCheck()
00082 {
00083 $res = array();
00084
00085 $items = (array) $this->getNode(self::XML_PATH_CHECK_WRITEABLE);
00086
00087 foreach ($items as $item) {
00088 $res['writeable'][] = (array) $item;
00089 }
00090
00091 return $res;
00092 }
00093
00094
00095
00096
00097
00098
00099 public function getExtensionsForCheck()
00100 {
00101 $res = array();
00102 $items = (array) $this->getNode(self::XML_PATH_CHECK_EXTENSIONS);
00103
00104 foreach ($items as $name=>$value) {
00105 if (!empty($value)) {
00106 $res[$name] = array();
00107 foreach ($value as $subname=>$subvalue) {
00108 $res[$name][] = $subname;
00109 }
00110 }
00111 else {
00112 $res[$name] = (array) $value;
00113 }
00114 }
00115
00116 return $res;
00117 }
00118
00119 }