您好,欢迎访问一九零五行业门户网

php MVC -Command

php mvc --command
doexecute($request); } abstract function doexecute(httprequest $request) ;}public class httprequest { private $properties; private $feedback = array(); function __construct() { $this->init(); } function init() { if (isset($_server['request_method'])) { $this->properties = $_request; return; } foreach($_server['argv'] as $arg) { if (strpos($arg,'=')) { list($key,$val) = explode(=, $arg); $this->setproperty($key,$val); } } } function getproperty($key) { if (isset($this->properties[$key])) { return $this->properties[$key]; } } function setproperty($key,$val) { $this->properties[$key] = $val; } function addfeedback($msg) { array_push($this->feedback, $msg); } function getfeedback() { return this->feedback; } function getfeedbackstring($separator = \n) { return implode( $separator,$this->feedback) ; }}?>
?最近在看php设计模式,看到例子不错,顺便做下记录吧,熟悉struts1.x的朋友一定不会陌生
其它类似信息

推荐信息