1 | <?php |
||
18 | class Zookal_Mock_Model_Config extends Mage_Core_Model_Config |
||
|
|||
19 | { |
||
20 | /** |
||
21 | * Key = active Module name => values inactive Module names whose dependency can be removed. |
||
22 | * If you find more please send me a PR. |
||
23 | * Maybe this config could also reside in a xml file. |
||
24 | * @var array |
||
25 | */ |
||
26 | protected $_dependencyLiars = array( |
||
27 | 'Mage_Reports' => array('Mage_Sales', 'Mage_Customer'), |
||
28 | 'Mage_Log' => array('Mage_Customer'), |
||
29 | 'Mage_Tax' => array('Mage_Customer'), |
||
30 | 'Mage_Poll' => array('Mage_Cms'), |
||
31 | 'Mage_Newsletter' => array('Mage_Widget'), |
||
32 | 'Mage_Catalog' => array('Mage_Cms'), |
||
33 | 'Mage_CatalogRule' => array('Mage_Customer'), |
||
34 | 'Mage_CatalogIndex' => array('Mage_CatalogRule'), |
||
35 | 'Mage_Checkout' => array('Mage_CatalogInventory'), |
||
36 | 'Mage_Customer' => array('Mage_Dataflow'), |
||
37 | 'Mage_Persistent' => array('Mage_Adminhtml'), |
||
38 | 'Mage_Captcha' => array('Mage_Adminhtml'), |
||
39 | 'VinaiKopp_LoginLog' => array('Mage_Adminhtml'), |
||
40 | ); |
||
41 | |||
42 | /** |
||
43 | * Removes the dependencies for some modules configured in $_dependencyLiars |
||
44 | * e.g. if Mage_Log is active and Mage_Customer is disabled then remove Mage_Customer dependency |
||
45 | * |
||
46 | * @param array $modules |
||
47 | * |
||
48 | * @return array |
||
49 | */ |
||
50 | protected function _sortModuleDepends($modules) |
||
55 | |||
56 | /** |
||
57 | * @param array $modules |
||
58 | * |
||
59 | * @return array |
||
60 | */ |
||
61 | public function removeDependencies(array $modules) |
||
76 | |||
77 | /** |
||
78 | * @param array $modules |
||
79 | * |
||
80 | * @return array |
||
81 | */ |
||
82 | public function getDisabledModules(array $modules) |
||
93 | |||
94 | /** |
||
95 | * @return array |
||
96 | */ |
||
97 | public function getDependencyLiars() |
||
101 | } |
||
102 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.