87 $requests = array_filter( $reqs,
static function ( $req ) use (
$name ) {
91 return count( $requests ) === 1 ? reset( $requests ) :
null;
101 if ( !isset( $data[
'label'] ) ) {
102 $data[
'label'] =
new RawMessage(
'$1', $data[
'name'] );
103 } elseif ( is_string( $data[
'label'] ) ) {
104 $data[
'label'] =
new Message( $data[
'label'] );
105 } elseif ( is_array( $data[
'label'] ) && $data[
'label'] ) {
109 if ( !isset( $data[
'help'] ) ) {
110 $data[
'help'] =
new RawMessage(
'$1', $data[
'name'] );
111 } elseif ( is_string( $data[
'help'] ) ) {
112 $data[
'help'] =
new Message( $data[
'help'] );
113 } elseif ( is_array( $data[
'help'] ) && $data[
'help'] ) {
117 $ret =
new static( $data[
'name'], $data[
'label'], $data[
'help'] );
118 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.