REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 2.98 KB
Close
//proc/self/root/var/softaculous/sitepad/editor/site-data/plugins/kkart-pro/src/Container.php
Text
Base64
<?php /** * Container class file. */ namespace Automattic\Kkart; use Automattic\Kkart\Internal\DependencyManagement\ServiceProviders\ProxiesServiceProvider; use Automattic\Kkart\Internal\DependencyManagement\ExtendedContainer; /** * PSR11 compliant dependency injection container for Kkart. * * Classes in the `src` directory should specify dependencies from that directory via constructor arguments * with type hints. If an instance of the container itself is needed, the type hint to use is \Psr\Container\ContainerInterface. * * Classes in the `src` directory should interact with anything outside (especially code in the `includes` directory * and WordPress functions) by using the classes in the `Proxies` directory. The exception is idempotent * functions (e.g. `wp_parse_url`), those can be used directly. * * Classes in the `includes` directory should use the `kkart_get_container` function to get the instance of the container when * they need to get an instance of a class from the `src` directory. * * Class registration should be done via service providers that inherit from Automattic\Kkart\Internal\DependencyManagement * and those should go in the `src\Internal\DependencyManagement\ServiceProviders` folder unless there's a good reason * to put them elsewhere. All the service provider class names must be in the `SERVICE_PROVIDERS` constant. */ final class Container implements \Psr\Container\ContainerInterface { /** * The list of service provider classes to register. * * @var string[] */ private $service_providers = array( ProxiesServiceProvider::class, ); /** * The underlying container. * * @var \League\Container\Container */ private $container; /** * Class constructor. */ public function __construct() { $this->container = new ExtendedContainer(); // Add ourselves as the shared instance of ContainerInterface, // register everything else using service providers. $this->container->share( \Psr\Container\ContainerInterface::class, $this ); foreach ( $this->service_providers as $service_provider_class ) { $this->container->addServiceProvider( $service_provider_class ); } } /** * Finds an entry of the container by its identifier and returns it. * * @param string $id Identifier of the entry to look for. * * @throws NotFoundExceptionInterface No entry was found for **this** identifier. * @throws Psr\Container\ContainerExceptionInterface Error while retrieving the entry. * * @return mixed Entry. */ public function get( $id ) { return $this->container->get( $id ); } /** * Returns true if the container can return an entry for the given identifier. * Returns false otherwise. * * `has($id)` returning true does not mean that `get($id)` will not throw an exception. * It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`. * * @param string $id Identifier of the entry to look for. * * @return bool */ public function has( $id ) { return $this->container->has( $id ); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 6 × Files: 3
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Admin
DIR
-
drwxr-xr-x
2026-04-25 02:31:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Blocks
DIR
-
drwxr-xr-x
2026-04-25 02:31:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Checkout
DIR
-
drwxr-xr-x
2026-04-25 02:31:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Internal
DIR
-
drwxr-xr-x
2026-04-25 02:31:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Proxies
DIR
-
drwxr-xr-x
2026-04-25 02:31:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Utilities
DIR
-
drwxr-xr-x
2026-04-25 02:31:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Autoloader.php
1.86 KB
lrw-r--r--
2026-04-22 07:17:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Container.php
2.98 KB
lrw-r--r--
2026-04-22 07:17:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Packages.php
3.09 KB
lrw-r--r--
2026-04-22 07:17:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).