Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * I use this as a proxy for the Mage object. Almost all Mage methods are wrapped. See below example of a factory and configuration wrapper
  5. */
  6. class MartinDines_Mage_Adapter
  7. {
  8. /**
  9. * @param string $modelClass
  10. * @param array $arguments
  11. * @return mixed
  12. */
  13. public function getModel($modelClass = '', $arguments = array())
  14. {
  15. return Mage::getModel($modelClass, $arguments);
  16. }
  17.  
  18. /**
  19. * Retrieve config value for store by path
  20. *
  21. * @param string $path
  22. * @param mixed $store
  23. * @return mixed
  24. */
  25. public function getStoreConfig($path, $store = null)
  26. {
  27. return Mage::getStoreConfig($path, $store);
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement