33#[\AllowDynamicProperties]
88 $requests = array_filter( $reqs,
static function ( $req ) use (
$name ) {
92 return count( $requests ) === 1 ? reset( $requests ) :
null;
102 if ( !isset( $data[
'label'] ) ) {
103 $data[
'label'] =
new RawMessage(
'$1', $data[
'name'] );
104 } elseif ( is_string( $data[
'label'] ) ) {
105 $data[
'label'] =
new Message( $data[
'label'] );
106 } elseif ( is_array( $data[
'label'] ) && $data[
'label'] ) {
110 if ( !isset( $data[
'help'] ) ) {
111 $data[
'help'] =
new RawMessage(
'$1', $data[
'name'] );
112 } elseif ( is_string( $data[
'help'] ) ) {
113 $data[
'help'] =
new Message( $data[
'help'] );
114 } elseif ( is_array( $data[
'help'] ) && $data[
'help'] ) {
118 $ret =
new static( $data[
'name'], $data[
'label'], $data[
'help'] );
119 foreach ( $data as $k => $v ) {
The Message class deals with fetching and processing of interface message into a variety of formats.
static newFromKey( $key,... $params)
Factory function that is just wrapper for the real constructor.
Variant of the Message class.