protected static function getCustomPage($type, $params) { //转换ActionKey为,缩写格式 if ($pos = strpos($type, '_')) { if (substr($type, 0, $pos) == "Default") { $type = substr($type, $pos + 1); } } if ($pos = strrpos($type, '.')) { if (substr($type, $pos) == ".Index") { $type = substr($type, 0, $pos); } } //Note: 在此编写自定义的URL规则 switch ($type) { default: $url = FastPHP_Rewrite::generateURL($type, $params); } return $url; }
<?php /** * Project: ActionPHP (The MVC Framework) * File: action.php * * This framework is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @author XuLH <*****@*****.**> */ require dirname(__FILE__) . "/global.php"; $fastphp_actionkey = FastPHP_Rewrite::parseRequest(); //Create Action Class fastphp_run_action($fastphp_actionkey);