76 $requests = array_filter( $reqs,
function ( $req ) use (
$name ) {
79 return count( $requests ) === 1 ? reset( $requests ) :
null;
88 if ( !isset( $data[
'label'] ) ) {
89 $data[
'label'] = new \RawMessage(
'$1', $data[
'name'] );
90 } elseif ( is_string( $data[
'label'] ) ) {
91 $data[
'label'] = new \Message( $data[
'label'] );
92 } elseif ( is_array( $data[
'label'] ) ) {
95 if ( !isset( $data[
'help'] ) ) {
96 $data[
'help'] = new \RawMessage(
'$1', $data[
'name'] );
97 } elseif ( is_string( $data[
'help'] ) ) {
98 $data[
'help'] = new \Message( $data[
'help'] );
99 } elseif ( is_array( $data[
'help'] ) ) {
102 $ret =
new static( $data[
'name'], $data[
'label'], $data[
'help'] );
103 foreach ( $data as $k => $v ) {
The Message class provides methods which fulfil two basic services:
static newFromKey( $key,... $params)
Factory function that is just wrapper for the real constructor.