123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- <?php
- namespace Cube\Controller\Action\Helper;
- use Cube\Controller\Front,
- Cube\Controller\Action\AbstractAction;
- abstract class AbstractHelper
- {
-
- protected $_action;
-
- public function getAction()
- {
- return $this->_action;
- }
-
- public function setAction(AbstractAction $action)
- {
- $this->_action = $action;
- return $this;
- }
-
- public function getRequest()
- {
- $action = $this->getAction();
- if ($action === null) {
- $action = Front::getInstance();
- }
- return $action->getRequest();
- }
-
- public function getResponse()
- {
- $action = $this->getAction();
- if ($action === null) {
- $action = Front::getInstance();
- }
- return $action->getResponse();
- }
- }
|