1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
| <?php
/*
* $Header: kooka/WEB-INF/classes/CartAction.php
* $Revision:
* $Date: 2003.03.30
*
* ====================================================================
*
* License: GNU General Public License
*
* Copyright (c) 2002,2003 John C.Wildenauer. All rights reserved.
*
* This file is part of php.MVC.
*
* php.MVC is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* php.MVC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
/**
* Implementation of an <strong>Action</strong> class that provides a mapping
* from a submit button name or request parameter to a particular action
* method.
*
* @author John C Wildenauer (php.MVC port)<br>
* Credits: Craig R. McClanahan (Jakata Struts class: see jakarta.apache.org)
* @version
* @public
*/
class MySpaceAction extends Action{
//class MySpaceAction extends LookupDispatchAction{
// ----- Instance Variables --------------------------------------------- //
/**
* The <code>Log</code> instance for this application.
* @private
* @type Log
*
*var $log = NULL;*/
/**
* The mySpace default Action class path.<br>
* Eg: 'mySpaceAction' => MySpaceAction
* @private
* @type string
*/
var $actionPath = 'mySpaceAction';
// ----- Constructor ---------------------------------------------------- //
/* function MySpace() {
// Setup the base class first
// Base name of the KookaKart properties file
$config = 'LocalStringsKooka_en_AU';
parent::LookupDispatchAction($config);
$this->log = new Log();
$this->log->setLog('isTraceEnabled' , False);
$this->log->setLog('isDebugEnabled' , False);
$this->log->setLog('isErrorEnabled' , False);
}*/
// ----- Protected Methods ---------------------------------------------- //
/**
* A lookup table that provides a mapping from a string resource item
* (LocalStringsKooka.properties) to a method name in this class.
*
* <p>Returns an array of key/value pairs.
*
* @public
* @returns array
*/
function getKeyMethodMap() {
// LocalStringsKooka.properties key => CartAction->function()
$map = array();
$map['link.MySpace-open'] = 'openMySpace'; // List the cart (shopping)
return $map;
}
// ----- Public Methods ------------------------------------------------- //
/**
* Display the shopping cart (browse items).
*
* @param ActionMapping The ActionMapping we are using
* @param ActionForm The ActionForm instance
* @param HttpRequestBase The server request we are processing
* @param HttpResponseBase The server response we are creating
* @public
* @returns ForwardConfig
*/
function openMySpace($mapping, $form, &$request, &$response) {
// Forward control to the specified success URI
return $mapping->findForwardConfig('MySpace-open');
#return $mapping->findForwardConfig('failure');
}
}
?> |
Partager