protected function get_style( $style, $expected_class, callable $get_style, $description ) {
		if ( $style instanceof $expected_class ) {
			$object = $style;
		} else {
			$object = $get_style( $style, $this );
		}

		if ( ! \is_object( $object ) || ! $object instanceof $expected_class ) {
			throw new \DomainException( "Invalid $description style $style." );
		}

		return $object;
	}
protected function get_style( $style, $expected_class, callable $get_style, $description ) {
		if ( $style instanceof $expected_class ) {
			$object = $style;
		} else {
			$object = $get_style( $style, $this );
		}

		if ( ! \is_object( $object ) || ! $object instanceof $expected_class ) {
			throw new \DomainException( "Invalid $description style $style." );
		}

		return $object;
	}
protected function get_style ( $ style , $ expected_class , callable $ get_style , $ description ) { if ( $ style instanceof $ expected_class ) { $ object = $ style ; } else { $ object = $ get_style ( $ style , $ this ) ; } if ( ! \ is_object ( $ object ) || ! $ object instanceof $ expected_class ) { throw new \ DomainException ( "Invalid $description style $style." ) ; } return $ object ; }
Retrieves an object from a given style.

@param  object|string $style          A style object instance or a style constant.
@param  string        $expected_class A class name.
@param  callable      $get_style      A function that returns a style object from a given style constant.
@param  string        $description    Style description for the exception message.

@throws \DomainException Thrown if $style constant is invalid.

@return object An instance of $expected_class.
Retrieves an object from a given style .