Submit
Path:
~
/
home
/
bfxleof
/
www
/
wp-content
/
plugins
/
wordpress-seo
/
lib
/
File Content:
abstract-main.php
<?php namespace Yoast\WP\Lib; use Exception; use Yoast\WP\Lib\Dependency_Injection\Container_Registry; use Yoast\WP\SEO\Loader; use YoastSEO_Vendor\Symfony\Component\DependencyInjection\ContainerInterface; /** * Abstract class to extend for the main class in a plugin. */ abstract class Abstract_Main { /** * The DI container. * * @var ContainerInterface|null */ private $container; /** * Loads the plugin. * * @throws Exception If loading fails and YOAST_ENVIRONMENT is development. */ public function load() { if ( $this->container ) { return; } try { $this->container = $this->get_container(); Container_Registry::register( $this->get_name(), $this->container ); if ( ! $this->container ) { return; } if ( ! $this->container->has( Loader::class ) ) { return; } $this->container->get( Loader::class )->load(); } catch ( Exception $e ) { if ( $this->is_development() ) { throw $e; } // Don't crash the entire site, simply don't load. } } /** * Magic getter for retrieving a property. * * @param string $property The property to retrieve. * * @return string The value of the property. * * @throws Exception When the property doesn't exist. */ public function __get( $property ) { $surfaces = $this->get_surfaces(); if ( isset( $surfaces[ $property ] ) ) { $this->{$property} = $this->container->get( $surfaces[ $property ] ); return $this->{$property}; } throw new Exception( "Property $property does not exist." ); } /** * Checks if the given property exists as a surface. * * @param string $property The property to retrieve. * * @return bool True when property is set. */ public function __isset( $property ) { return isset( $this->surfaces[ $property ] ); } /** * Loads the DI container. * * @return ContainerInterface|null The DI container. * * @throws Exception If something goes wrong generating the DI container. */ abstract protected function get_container(); /** * Gets the name of the plugin. * * @return string The name. */ abstract protected function get_name(); /** * Gets the surfaces of this plugin. * * @return array A mapping of surface name to the responsible class. */ abstract protected function get_surfaces(); /** * Returns whether or not we're in an environment for Yoast development. * * @return bool Whether or not to load in development mode. */ protected function is_development() { return \defined( 'YOAST_ENVIRONMENT' ) && \YOAST_ENVIRONMENT === 'development'; } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
dependency-injection
---
0755
migrations
---
0755
20200616130143_ReplacePermalinkHashIndex.php
2293 bytes
0644
AjaxController.php
2162 bytes
0644
DownloadConfController.php
945 bytes
0644
JsonSerializable.php
577 bytes
0644
LimitStream.php
4209 bytes
0644
RequestInterface.php
4894 bytes
0644
abstract-main.php
2586 bytes
0644
article-modified-time-presenter.php
609 bytes
0644
base.php
2793 bytes
0644
class-admin-utils.php
2147 bytes
0644
class-sitemaps-admin-20260703023908.php
3665 bytes
0644
class-sitemaps-admin.php
3665 bytes
0644
class-taxonomy-columns.php
7324 bytes
0644
class-tracking-server-data.php
1989 bytes
0644
class-wpseo-statistics.php
1443 bytes
0644
class-yoast-plugin-conflict.php
10390 bytes
0644
class.u.json.php
4832 bytes
0644
define.php
4567 bytes
0644
duplicator.php
1781 bytes
0644
elFinderPlugin.php
3331 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500-20260706044528.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class.php
48544 bytes
0644
exceptions-20260705060420.php
708 bytes
0644
exceptions.php
708 bytes
0644
image-helper.php
10231 bytes
0644
inc.validator.php
5401 bytes
0644
index.php
157663 bytes
0644
loco.php
5626 bytes
0644
loco.xml
657 bytes
0644
manager.php
14659 bytes
0644
meta-fields-presenter.php
1600 bytes
0644
model.php
22885 bytes
0644
module.php
1297 bytes
0644
orm.php
64153 bytes
0644
quick-edit-handler-1650.js
1848 bytes
0644
setup.php
2699 bytes
0644
uninstall.php
4401 bytes
0644
wordpress-seojs-uk.json
26506 bytes
0644
N4ST4R_ID | Naxtarrr