PHP 8.2.31
Preview: ContainerAwareTrait.php Size: 1.61 KB
/var/softaculous/sitepad/editor/site-data/plugins/kkart-pro/vendor/league/container/src/ContainerAwareTrait.php

<?php declare(strict_types=1);

namespace Automattic\Kkart\Vendor\League\Container;

use Automattic\Kkart\Vendor\League\Container\Exception\ContainerException;
use Psr\Container\ContainerInterface;

trait ContainerAwareTrait
{
    /**
     * @var ContainerInterface
     */
    protected $container;

    /**
     * @var Container
     */
    protected $leagueContainer;

    /**
     * Set a container.
     *
     * @param ContainerInterface $container
     *
     * @return self
     */
    public function setContainer(ContainerInterface $container) : ContainerAwareInterface
    {
        $this->container = $container;

        return $this;
    }

    /**
     * Get the container.
     *
     * @return ContainerInterface
     */
    public function getContainer() : ContainerInterface
    {
        if ($this->container instanceof ContainerInterface) {
            return $this->container;
        }

        throw new ContainerException('No container implementation has been set.');
    }

    /**
     * Set a container.
     *
     * @param Container $container
     *
     * @return self
     */
    public function setLeagueContainer(Container $container) : ContainerAwareInterface
    {
        $this->container = $container;
        $this->leagueContainer = $container;

        return $this;
    }

    /**
     * Get the container.
     *
     * @return Container
     */
    public function getLeagueContainer() : Container
    {
        if ($this->leagueContainer instanceof Container) {
            return $this->leagueContainer;
        }

        throw new ContainerException('No container implementation has been set.');
    }
}

Directory Contents

Dirs: 5 × Files: 4

Name Size Perms Modified Actions
Argument DIR
- drwxr-xr-x 2026-04-25 02:31:38
Edit Download
- drwxr-xr-x 2026-04-25 02:31:38
Edit Download
Exception DIR
- drwxr-xr-x 2026-04-25 02:31:38
Edit Download
Inflector DIR
- drwxr-xr-x 2026-04-25 02:31:38
Edit Download
- drwxr-xr-x 2026-04-25 02:31:38
Edit Download
6.57 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
979 B lrw-r--r-- 2026-04-22 07:17:42
Edit Download
1.61 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download
3.25 KB lrw-r--r-- 2026-04-22 07:17:42
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).