public function go() {
		if ($this->action == "options") {
			$file = "options" . $this->getExtension();
		} else {
			// Check if handler file exists
			if ($this->route->route == "/") {
				$file = $this->getAction() . $this->getExtension();
			} else {
				$file = $this->route->resource . "/" . $this->getAction() . $this->getExtension();
			}
		}

		$fullFilePath = stream_resolve_include_path($file);
		if ($fullFilePath) {
			include $fullFilePath;
		} else {
			throw new \Ginger\Exception("Not implemented", 501);
		}

		$this->getResponse()->send();
	}
public function go() {
		if ($this->action == "options") {
			$file = "options" . $this->getExtension();
		} else {
			// Check if handler file exists
			if ($this->route->route == "/") {
				$file = $this->getAction() . $this->getExtension();
			} else {
				$file = $this->route->resource . "/" . $this->getAction() . $this->getExtension();
			}
		}

		$fullFilePath = stream_resolve_include_path($file);
		if ($fullFilePath) {
			include $fullFilePath;
		} else {
			throw new \Ginger\Exception("Not implemented", 501);
		}

		$this->getResponse()->send();
	}
public function go ( ) { if ( $ this -> action == "options" ) { $ file = "options" . $ this -> getExtension ( ) ; } else { // Check if handler file exists if ( $ this -> route -> route == "/" ) { $ file = $ this -> getAction ( ) . $ this -> getExtension ( ) ; } else { $ file = $ this -> route -> resource . "/" . $ this -> getAction ( ) . $ this -> getExtension ( ) ; } } $ fullFilePath = stream_resolve_include_path ( $ file ) ; if ( $ fullFilePath ) { include $ fullFilePath ; } else { throw new \ Ginger \ Exception ( "Not implemented" , 501 ) ; } $ this -> getResponse ( ) -> send ( ) ; }
Load file and dispatch to response
Load file and dispatch to response