PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 18.1
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v18.1
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / src / surfaces / twitter-helpers-surface.php

twitter-helpers-surface.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 18.1, at src/surfaces/twitter-helpers-surface.php

46 lines 978 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Yoast\WP\SEO\Surfaces;
4
5 use Yoast\WP\SEO\Helpers\Twitter;
6 use YoastSEO_Vendor\Symfony\Component\DependencyInjection\ContainerInterface;
7
8 /**
9 * Class Twitter_Helpers_Surface.
10 *
11 * Surface for the indexables.
12 *
13 * @property Twitter\Image_Helper $image
14 */
15 class Twitter_Helpers_Surface {
16
17 /**
18 * The DI container.
19 *
20 * @var ContainerInterface
21 */
22 private $container;
23
24 /**
25 * Loader constructor.
26 *
27 * @param ContainerInterface $container The dependency injection container.
28 */
29 public function __construct( ContainerInterface $container ) {
30 $this->container = $container;
31 }
32
33 /**
34 * Magic getter for getting helper classes.
35 *
36 * @param string $helper The helper to get.
37 *
38 * @return mixed The helper class.
39 */
40 public function __get( $helper ) {
41 $helper = \implode( '_', \array_map( 'ucfirst', \explode( '_', $helper ) ) );
42 $class = "Yoast\WP\SEO\Helpers\Twitter\\{$helper}_Helper";
43 return $this->container->get( $class );
44 }
45 }
46