| Server IP : 87.229.120.60 / Your IP : 216.73.216.86 Web Server : Apache System : Linux outside 5.4.8_Algonet_ZeroMAC_0.9.4.8 #6 SMP Mon Feb 3 20:36:07 CET 2020 x86_64 User : server ( 1002) PHP Version : 8.3.20 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,curl_multi_exec,parse_ini_file,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/faktorteam/www/wp-content/plugins/wordpress-seo/src/surfaces/ |
Upload File : |
<?php
namespace Yoast\WP\SEO\Surfaces;
use Yoast\WP\SEO\Helpers\Schema;
use YoastSEO_Vendor\Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Class Schema_Helpers_Surface.
*
* Surface for the indexables.
*
* @property Schema\Article_Helper $article
* @property Schema\HTML_Helper $html
* @property Schema\ID_Helper $id
* @property Schema\Image_Helper $image
* @property Schema\Language_Helper $language
*/
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 );
}
}