Init the command from an HTTPRequest

Property definitions

nitc :: commands_http $ DocCommand :: http_init
	# Init the command from an HTTPRequest
	fun http_init(req: HttpRequest): CmdMessage do
		var filter = cmd_filter
		var opt_vis = req.visibility_arg("min-visibility")
		if opt_vis != null then filter.min_visibility = opt_vis
		var opt_fictive = req.bool_arg("no-fictive")
		if opt_fictive != null then filter.accept_fictive = not opt_fictive
		var opt_test = req.bool_arg("no-test")
		if opt_test != null then filter.accept_test = not opt_test
		var opt_redef = req.bool_arg("no-redef")
		if opt_redef != null then filter.accept_redef = not opt_redef
		var opt_extern = req.bool_arg("no-extern")
		if opt_extern != null then filter.accept_extern = not opt_extern
		var opt_example = req.bool_arg("no-example")
		if opt_example != null then filter.accept_example = not opt_example
		var opt_attr = req.bool_arg("no-attribute")
		if opt_attr != null then filter.accept_attribute = not opt_attr
		var opt_doc = req.bool_arg("no-empty-doc")
		if opt_doc != null then filter.accept_empty_doc = not opt_doc
		var opt_inh = req.mentity_arg(model, "inherit")
		if opt_inh != null then filter.accept_inherited = opt_inh
		var opt_match = req.string_arg("match")
		if opt_match != null then filter.accept_full_name = opt_match
		self.filter = filter
		return init_command
	end
src/doc/commands/commands_http.nit:30,2--55,4

nitc :: commands_http $ CmdEntity :: http_init
	redef fun http_init(req) do
		var name = req.param("id")
		if name != null then name = name.from_percent_encoding
		self.mentity_name = name

		return super
	end
src/doc/commands/commands_http.nit:59,2--65,4

nitc :: commands_http $ CmdCode :: http_init
	redef fun http_init(req) do
		var opt_format = req.string_arg("format")
		if opt_format != null then format = opt_format
		return super
	end
src/doc/commands/commands_http.nit:168,2--172,4

nitc :: commands_http $ CmdGraph :: http_init
	redef fun http_init(req) do
		var opt_format = req.string_arg("format")
		if opt_format != null then format = opt_format
		return super
	end
src/doc/commands/commands_http.nit:191,2--195,4

nitc :: commands_http $ CmdList :: http_init
	redef fun http_init(req) do
		var opt_limit = req.int_arg("l")
		if opt_limit != null then limit = opt_limit
		var opt_page = req.int_arg("p")
		if opt_page != null then page = opt_page
		return super
	end
src/doc/commands/commands_http.nit:69,2--75,4

nitc :: commands_http $ CmdComment :: http_init
	redef fun http_init(req) do
		var opt_full_doc = req.bool_arg("full_doc")
		if opt_full_doc != null then full_doc = opt_full_doc
		var opt_fallback = req.bool_arg("fallback")
		if opt_fallback != null then fallback = opt_fallback
		var opt_format = req.string_arg("format")
		if opt_format != null then format = opt_format
		return super
	end
src/doc/commands/commands_http.nit:110,2--118,4

nitc :: commands_http $ CmdCatalogPerson :: http_init
	redef fun http_init(req) do
		var name = req.param("pid")
		if name != null then name = name.from_percent_encoding
		self.person_name = name
		return super
	end
src/doc/commands/commands_http.nit:220,2--225,4

nitc :: commands_http $ CmdSearch :: http_init
	redef fun http_init(req) do
		query = req.string_arg("q")
		return super
	end
src/doc/commands/commands_http.nit:153,2--156,4

nitc :: commands_http $ CmdEntityCode :: http_init
	# FIXME avoid linearization conflict
	redef fun http_init(req) do
		var name = req.param("id")
		if name != null then name = name.from_percent_encoding
		mentity_name = name

		var opt_format = req.string_arg("format")
		if opt_format != null then format = opt_format
		return init_command
	end
src/doc/commands/commands_http.nit:176,2--185,4

nitc :: commands_http $ CmdModelEntities :: http_init
	redef fun http_init(req) do
		var opt_kind = req.string_arg("kind")
		if opt_kind != null then kind = opt_kind
		return super
	end
src/doc/commands/commands_http.nit:160,2--164,4

nitc :: commands_http $ CmdInheritanceGraph :: http_init
	redef fun http_init(req) do
		var opt_pdepth = req.int_arg("pdepth")
		if opt_pdepth != null then pdepth = opt_pdepth
		var opt_cdepth = req.int_arg("cdepth")
		if opt_cdepth != null then cdepth = opt_cdepth
		return super
	end
src/doc/commands/commands_http.nit:199,2--205,4

nitc :: commands_http $ CmdEntityList :: http_init
	# FIXME avoid linearization conflict
	redef fun http_init(req) do return super
src/doc/commands/commands_http.nit:148,2--149,41

nitc :: commands_http $ CmdCatalogTag :: http_init
	redef fun http_init(req) do
		var tag = req.param("tid")
		if tag != null then tag = tag.from_percent_encoding
		self.tag = tag
		return super
	end
src/doc/commands/commands_http.nit:211,2--216,4

nitc :: commands_http $ CmdAncestors :: http_init
	redef fun http_init(req) do
		var opt_parents = req.bool_arg("parents")
		if opt_parents != null then parents = opt_parents
		return super
	end
src/doc/commands/commands_http.nit:132,2--136,4

nitc :: commands_http $ CmdDescendants :: http_init
	redef fun http_init(req) do
		var opt_children = req.bool_arg("children")
		if opt_children != null then children = opt_children
		return super
	end
src/doc/commands/commands_http.nit:140,2--144,4