1: <?php
2: /*
3:
4: *
5: * NOTICE OF LICENSE
6: *
7: * This source file is subject to the Open Software License (OSL 3.0)
8: * or OpenGPL v3 license (GNU Public License V3.0)
9: * that is bundled with this package in the file LICENSE.txt.
10: * It is also available through the world-wide-web at this URL:
11: * http://opensource.org/licenses/osl-3.0.php
12: * or
13: * http://www.gnu.org/licenses/gpl-3.0.txt
14: * If you did not receive a copy of the license and are unable to
15: * obtain it through the world-wide-web, please send an email
16: * to info@e-abi.ee so we can send you a copy immediately.
17: *
18: * DISCLAIMER
19: *
20: * Do not edit or add to this file if you wish to upgrade this module to newer
21: * versions in the future.
22: *
23: * @category Eabi
24: * @package Eabi_Dpd
25: * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
26: * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27: * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
28: * @author Matis Halmann
29: *
30:
31: */
32:
33: /**
34: * <p>Base implementing class for eabi_livehandler.model_class property</p>
35: * <p>This class should fire response for the actual ajax request</p>
36: *
37: * @author matishalmann
38: */
39: abstract class Eabi_Livehandler_Model_Abstract extends Mage_Core_Model_Abstract {
40:
41: //construct will be done in subclasses
42:
43: public function getJs() {
44: return '';
45: }
46:
47: public function getCss() {
48: return '';
49: }
50:
51: public function getHtml() {
52: return '';
53: }
54:
55: public function process($postedData) {
56: return array();
57: }
58:
59: /**
60: * <p>Wrapper json_encode in order to make it easier to use in heredoc syntax</p>
61: * @param mixed $input
62: * @return string
63: */
64: protected function _toJson($input) {
65: return json_encode($input);
66: }
67:
68: }
69: