Codex PHP
A PHP library for building HTML and CSS UI components using Codex, the Wikimedia design system.
|
Public Member Functions | |
__construct (object $request) | |
Constructor for WebRequestAdapter. | |
getVal (string $name, $default=null) | |
Fetch a value from the request. | |
Protected Attributes | |
object | $request |
Wikimedia\Codex\Adapter\WebRequestAdapter::__construct | ( | object | $request | ) |
Constructor for WebRequestAdapter.
This constructor initializes the adapter with the given request object. The request object must provide a getVal
method that retrieves request parameters.
object | $request | The request object to adapt. |
Wikimedia\Codex\Adapter\WebRequestAdapter::getVal | ( | string | $name, |
$default = null ) |
Fetch a value from the request.
This method retrieves the value of a specific parameter from the underlying request object. If the parameter is not present, the provided default value will be returned.
string | $name | The name of the parameter to fetch. |
mixed | $default | The default value to return if the parameter is not set in the request. Defaults to null. |
$default
value if the parameter is not set. Implements Wikimedia\Codex\Contract\IWebRequest.