87 public function register( $name, $displayName, $spec,
bool $skippable = null ) {
88 if ( !is_callable( $spec ) ) {
89 if ( is_array( $spec ) ) {
90 if ( !isset( $spec[
'args'] ) ) {
97 throw new InvalidArgumentException(
'Invalid callback provided' );
100 $this->factoryFunctions[$name] = $spec;
101 $this->displayNames[$name] = $displayName;
104 if ( ( $this->skipSkins[$name] ??
null ) !== self::SKIP_BY_SITECONFIG ) {
105 if ( $skippable ===
true ) {
106 $this->skipSkins[$name] = self::SKIP_BY_REGISTER;
109 unset( $this->skipSkins[$name] );