1: <?php
2: /**
3: * @file
4: * @package profile
5: * @version $Id$
6: */
7:
8: if (!defined('XOOPS_ROOT_PATH')) exit();
9:
10: class Profile_AbstractViewAction extends Profile_AbstractAction
11: {
12: var $mObject = null;
13: var $mObjectHandler = null;
14:
15: /**
16: * @protected
17: */
18: function _getId()
19: {
20: }
21:
22: /**
23: * @protected
24: */
25: function &_getHandler()
26: {
27: }
28:
29: /**
30: * @protected
31: */
32: function _setupObject()
33: {
34: $id = $this->_getId();
35:
36: $this->mObjectHandler =& $this->_getHandler();
37:
38: $this->mObject =& $this->mObjectHandler->get($id);
39: }
40:
41: /**
42: * @public
43: */
44: function prepare()
45: {
46: $this->_setupObject();
47: return is_object($this->mObject);
48: }
49:
50: /**
51: * @public
52: */
53: function getDefaultView()
54: {
55: if ($this->mObject == null) {
56: return PROFILE_FRAME_VIEW_ERROR;
57: }
58:
59: return PROFILE_FRAME_VIEW_SUCCESS;
60: }
61:
62: /**
63: * @public
64: */
65: function execute()
66: {
67: return $this->getDefaultView($controller, $xoopsUser, $moduleConfig);
68: }
69: }
70:
71: ?>
72: