WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
класс не описан

Yoast\WP\SEO\Surfaces

Schema_Helpers_Surface{} Yoast 1.0

Class Schema_Helpers_Surface.

Surface for the indexables.

Хуков нет.

Возвращает

Null. Ничего.

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

$Schema_Helpers_Surface = new Schema_Helpers_Surface();
// use class methods

Методы

  1. __construct( ContainerInterface $container )
  2. __get( $helper )

Код Schema_Helpers_Surface{} Yoast 15.1.1

<?php
class Schema_Helpers_Surface {

	/**
	 * The DI container.
	 *
	 * @var ContainerInterface
	 */
	private $container;

	/**
	 * Helpers that should be fully capitalized.
	 *
	 * @var array
	 */
	private $capitalized_helpers = [ 'html', 'id' ];

	/**
	 * Loader constructor.
	 *
	 * @param ContainerInterface $container The dependency injection container.
	 */
	public function __construct( ContainerInterface $container ) {
		$this->container = $container;
	}

	/**
	 * Magic getter for getting helper classes.
	 *
	 * @param string $helper The helper to get.
	 *
	 * @return mixed The helper class.
	 */
	public function __get( $helper ) {
		if ( \in_array( $helper, $this->capitalized_helpers, true ) ) {
			$helper = \strtoupper( $helper );
		}
		$helper = \implode( '_', \array_map( 'ucfirst', \explode( '_', $helper ) ) );
		$class  = "Yoast\WP\SEO\Helpers\Schema\\{$helper}_Helper";

		return $this->container->get( $class );
	}
}