FSMAction.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Search_Lucene
  17. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  18. * @license http://framework.zend.com/license/new-bsd New BSD License
  19. * @version $Id$
  20. */
  21. /**
  22. * Abstract Finite State Machine
  23. *
  24. *
  25. * @category Zend
  26. * @package Zend_Search_Lucene
  27. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  28. * @license http://framework.zend.com/license/new-bsd New BSD License
  29. */
  30. class Zend_Search_Lucene_FSMAction
  31. {
  32. /**
  33. * Object reference
  34. *
  35. * @var object
  36. */
  37. private $_object;
  38. /**
  39. * Method name
  40. *
  41. * @var string
  42. */
  43. private $_method;
  44. /**
  45. * Object constructor
  46. *
  47. * @param object $object
  48. * @param string $method
  49. */
  50. public function __construct($object, $method)
  51. {
  52. $this->_object = $object;
  53. $this->_method = $method;
  54. }
  55. public function doAction()
  56. {
  57. $methodName = $this->_method;
  58. $this->_object->$methodName();
  59. }
  60. }