| Server IP : 68.183.124.220 / Your IP : 216.73.217.137 Web Server : Apache/2.4.18 (Ubuntu) System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : gavin ( 1000) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/wp-content/plugins/wordpress-seo/config/dependency-injection/ |
Upload File : |
<?php
/**
* Yoast SEO Plugin File.
*
* @package Yoast\YoastSEO\Dependency_Injection
*/
namespace Yoast\WP\Free\Dependency_Injection;
use Symfony\Component\Config\ConfigCache;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Dumper\PhpDumper;
/**
* This class is responsible for compiling the dependency injection container.
*/
class Container_Compiler {
/**
* Compiles the dependency injection container.
*
* @param boolean $debug If false the container will only be re-compiled if it does not yet already exist.
*
* @throws \Exception If compiling the container fails.
*
* @return void
*/
public static function compile( $debug ) {
$file = __DIR__ . '/../../src/generated/container.php';
$cache = new ConfigCache( $file, $debug );
if ( ! $cache->isFresh() ) {
$container_builder = new ContainerBuilder();
$container_builder->addCompilerPass( new Loader_Pass() );
$loader = new Custom_Loader( $container_builder );
$loader->load( 'config/dependency-injection/services.php' );
$container_builder->compile();
$dumper = new PhpDumper( $container_builder );
$code = $dumper->dump(
[
'class' => 'Cached_Container',
'namespace' => 'Yoast\WP\Free\Generated',
]
);
$code = \str_replace( 'Symfony\\Component\\DependencyInjection', 'YoastSEO_Vendor\\Symfony\\Component\\DependencyInjection', $code );
$code = \str_replace( 'Symfony\\\\Component\\\\DependencyInjection', 'YoastSEO_Vendor\\\\Symfony\\\\Component\\\\DependencyInjection', $code );
$cache->write( $code, $container_builder->getResources() );
}
}
}