76 public function register( $name, $displayName, $spec, ?
bool $skippable = null ) {
77 if ( !is_callable( $spec ) ) {
78 if ( is_array( $spec ) ) {
79 if ( !isset( $spec[
'args'] ) ) {
86 throw new InvalidArgumentException(
'Invalid callback provided' );
89 $this->factoryFunctions[$name] = $spec;
90 $this->displayNames[$name] = $displayName;
93 if ( ( $this->skipSkins[$name] ??
null ) !== self::SKIP_BY_SITECONFIG ) {
94 if ( $skippable ===
true ) {
95 $this->skipSkins[$name] = self::SKIP_BY_REGISTER;
98 unset( $this->skipSkins[$name] );