Yoast\WP\SEO\Surfaces

Schema_Helpers_Surface::get_helper_class()protectedYoast 1.0

Get the class name from a helper slug

Метод класса: Schema_Helpers_Surface{}

Хуков нет.

Возвращает

Строку.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_helper_class( $helper );
$helper(строка) (обязательный)
The name of the helper.

Код Schema_Helpers_Surface::get_helper_class() Yoast 22.3

protected function get_helper_class( $helper ) {
	if ( \in_array( $helper, $this->capitalized_helpers, true ) ) {
		$helper = \strtoupper( $helper );
	}
	$helper = \implode( '_', \array_map( 'ucfirst', \explode( '_', $helper ) ) );
	return "Yoast\WP\SEO\Helpers\Schema\\{$helper}_Helper";
}