PluginProbe
Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution / 1.1.0
Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution v1.1.0
2.0.1 trunk 1.0.0 1.1.0 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 1.6.1 1.7.0 1.7.1 1.8.0 1.9.0 2.0.0
solid-performance / src / functions / app.php

app.php in Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution 1.1.0, at src/functions/app.php

35 lines 845 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Application/Plugin specific functions.
4 */
5
6 declare( strict_types=1 );
7
8 use SolidWP\Performance\App;
9 use SolidWP\Performance\Container;
10 use SolidWP\Performance\Core;
11 use SolidWP\Performance\lucatume\DI52\Container as DI52Container;
12
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit;
15 }
16
17 /**
18 * Initialize the plugin singleton and ensure we only have a single
19 * instance of our container.
20 *
21 * @return Core
22 */
23 function swpsp_plugin(): Core {
24 // In the event we don't have a container in our core class yet.
25 $container = new Container( new DI52Container() );
26
27 // This singleton will not use a new container if one is already set.
28 $core = Core::instance( realpath( __DIR__ . '/../../solid-performance.php' ), $container );
29
30 // Set the same container instance in our application.
31 App::setContainer( $core->container() );
32
33 return $core;
34 }
35