Translate.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. *
  4. * Cube Framework $Id$ JQ/llBxac2Qi2BDSApPlNuF8k1nb1C9IfVbXg/a0gjM=
  5. *
  6. * @link http://codecu.be/framework
  7. * @copyright Copyright (c) 2014 CodeCube SRL
  8. * @license http://codecu.be/framework/license Commercial License
  9. *
  10. * @version 1.0
  11. */
  12. /**
  13. * translate class
  14. * the translation adapter will only translate sentences if a locale is set
  15. */
  16. namespace Cube;
  17. class Translate
  18. {
  19. /**
  20. *
  21. * translation adapter
  22. *
  23. * @var \Cube\Translate\Adapter\AbstractAdapter
  24. */
  25. protected $_adapter;
  26. /**
  27. *
  28. * get translation adapter
  29. *
  30. * @return \Cube\Translate\Adapter\AbstractAdapter
  31. */
  32. public function getAdapter()
  33. {
  34. return $this->_adapter;
  35. }
  36. /**
  37. *
  38. * set the translation adapter
  39. *
  40. * @param \Cube\Translate\Adapter\AbstractAdapter $adapter
  41. *
  42. * @return \Cube\Translate
  43. */
  44. public function setAdapter(Translate\Adapter\AbstractAdapter $adapter)
  45. {
  46. $this->_adapter = $adapter;
  47. return $this;
  48. }
  49. }