PageRenderTime 64ms CodeModel.GetById 24ms RepoModel.GetById 5ms app.codeStats 0ms

/application/libraries/Engine/Translate.php

https://github.com/shopaholiccompany/shopaholic
PHP | 41 lines | 21 code | 4 blank | 16 comment | 1 complexity | ff123c3484ef09699fd3750ab268e2b3 MD5 | raw file
Possible License(s): BSD-3-Clause, GPL-3.0, LGPL-2.1
  1. <?php
  2. /**
  3. * SocialEngine
  4. *
  5. * @category Engine
  6. * @package Engine_Translate
  7. * @copyright Copyright 2006-2010 Webligo Developments
  8. * @license http://www.socialengine.net/license/
  9. * @version $Id: Translate.php 7244 2010-09-01 01:49:53Z john $
  10. * @todo documentation
  11. */
  12. /**
  13. * @category Engine
  14. * @package Engine_Translate
  15. * @copyright Copyright 2006-2010 Webligo Developments
  16. * @license http://www.socialengine.net/license/
  17. */
  18. class Engine_Translate extends Zend_Translate
  19. {
  20. protected $_adapter;
  21. public function __construct($options)
  22. {
  23. $this->_adapter = new Engine_Translate_Adapter_Null($options);
  24. }
  25. public function getAdapter()
  26. {
  27. return $this->_adapter;
  28. }
  29. public function __call($method, array $options)
  30. {
  31. if (method_exists($this->_adapter, $method)) {
  32. return call_user_func_array(array($this->_adapter, $method), $options);
  33. }
  34. require_once 'Zend/Translate/Exception.php';
  35. throw new Zend_Translate_Exception("Unknown method '" . $method . "' called!");
  36. }
  37. }