Config.php
44 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WCML\Container; |
| 4 | |
| 5 | class Config { |
| 6 | |
| 7 | public static function getSharedInstances() { |
| 8 | global $woocommerce_wpml; |
| 9 | |
| 10 | return [ |
| 11 | $woocommerce_wpml, |
| 12 | ]; |
| 13 | } |
| 14 | |
| 15 | public static function getSharedClasses() { |
| 16 | return [ |
| 17 | \WCML_Currencies_Payment_Gateways::class, |
| 18 | \WCML_Dependencies::class, |
| 19 | \WCML_Exchange_Rates::class, |
| 20 | \WCML_Multi_Currency::class, |
| 21 | ]; |
| 22 | } |
| 23 | |
| 24 | public static function getSharedClassesWhenWooCommerceIsInactive(): array { |
| 25 | return [ |
| 26 | \WCML_Dependencies::class, |
| 27 | ]; |
| 28 | } |
| 29 | |
| 30 | public static function getAliases() { |
| 31 | return [ |
| 32 | \WPML\Core\ISitePress::class => \WCML\functions\isStandAlone() |
| 33 | ? \WCML\StandAlone\NullSitePress::class |
| 34 | : \SitePress::class, |
| 35 | ]; |
| 36 | } |
| 37 | |
| 38 | public static function getDelegated() { |
| 39 | return [ |
| 40 | \WCML_Exchange_Rates::class => [ \WCML_Exchange_Rates::class, 'create' ], |
| 41 | ]; |
| 42 | } |
| 43 | } |
| 44 |