REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 2.89 KB
Close
/var/softaculous/sitepad/editor/site-data/plugins/kkart-pro/vendor/league/container/src/Definition/DefinitionAggregate.php
Text
Base64
<?php declare(strict_types=1); namespace Automattic\Kkart\Vendor\League\Container\Definition; use Generator; use Automattic\Kkart\Vendor\League\Container\ContainerAwareTrait; use Automattic\Kkart\Vendor\League\Container\Exception\NotFoundException; class DefinitionAggregate implements DefinitionAggregateInterface { use ContainerAwareTrait; /** * @var DefinitionInterface[] */ protected $definitions = []; /** * Construct. * * @param DefinitionInterface[] $definitions */ public function __construct(array $definitions = []) { $this->definitions = array_filter($definitions, function ($definition) { return ($definition instanceof DefinitionInterface); }); } /** * {@inheritdoc} */ public function add(string $id, $definition, bool $shared = false) : DefinitionInterface { if (!$definition instanceof DefinitionInterface) { $definition = new Definition($id, $definition); } $this->definitions[] = $definition ->setAlias($id) ->setShared($shared) ; return $definition; } /** * {@inheritdoc} */ public function has(string $id) : bool { foreach ($this->getIterator() as $definition) { if ($id === $definition->getAlias()) { return true; } } return false; } /** * {@inheritdoc} */ public function hasTag(string $tag) : bool { foreach ($this->getIterator() as $definition) { if ($definition->hasTag($tag)) { return true; } } return false; } /** * {@inheritdoc} */ public function getDefinition(string $id) : DefinitionInterface { foreach ($this->getIterator() as $definition) { if ($id === $definition->getAlias()) { return $definition->setLeagueContainer($this->getLeagueContainer()); } } throw new NotFoundException(sprintf('Alias (%s) is not being handled as a definition.', $id)); } /** * {@inheritdoc} */ public function resolve(string $id, bool $new = false) { return $this->getDefinition($id)->resolve($new); } /** * {@inheritdoc} */ public function resolveTagged(string $tag, bool $new = false) : array { $arrayOf = []; foreach ($this->getIterator() as $definition) { if ($definition->hasTag($tag)) { $arrayOf[] = $definition->setLeagueContainer($this->getLeagueContainer())->resolve($new); } } return $arrayOf; } /** * {@inheritdoc} */ public function getIterator() : Generator { $count = count($this->definitions); for ($i = 0; $i < $count; $i++) { yield $this->definitions[$i]; } } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 4
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Definition.php
5.36 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
DefinitionAggregate.php
2.89 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
DefinitionAggregateInterface.php
1.55 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
DefinitionInterface.php
2.48 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).