Submit
Path:
~
/
/
usr
/
local
/
sitepad
/
editor
/
site-data
/
plugins
/
kkart-pro
/
vendor
/
league
/
container
/
src
/
Inflector
/
File Content:
InflectorAggregate.php
<?php declare(strict_types=1); namespace Automattic\Kkart\Vendor\League\Container\Inflector; use Generator; use Automattic\Kkart\Vendor\League\Container\ContainerAwareTrait; class InflectorAggregate implements InflectorAggregateInterface { use ContainerAwareTrait; /** * @var Inflector[] */ protected $inflectors = []; /** * {@inheritdoc} */ public function add(string $type, callable $callback = null) : Inflector { $inflector = new Inflector($type, $callback); $this->inflectors[] = $inflector; return $inflector; } /** * {@inheritdoc} */ public function getIterator() : Generator { $count = count($this->inflectors); for ($i = 0; $i < $count; $i++) { yield $this->inflectors[$i]; } } /** * {@inheritdoc} */ public function inflect($object) { foreach ($this->getIterator() as $inflector) { $type = $inflector->getType(); if (! $object instanceof $type) { continue; } $inflector->setLeagueContainer($this->getLeagueContainer()); $inflector->inflect($object); } return $object; } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
Inflector.php
2814 bytes
0644
InflectorAggregate.php
1263 bytes
0644
InflectorAggregateInterface.php
677 bytes
0644
InflectorInterface.php
1335 bytes
0644
N4ST4R_ID | Naxtarrr