imagify
/
classes
/
Dependencies
/
League
/
Container
/
Definition
/
DefinitionAggregateInterface.php
DefinitionAggregateInterface.php in Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF 2.2, at classes/Dependencies/League/Container/Definition/DefinitionAggregateInterface.php
| 1 | <?php declare(strict_types=1); |
| 2 | |
| 3 | namespace Imagify\Dependencies\League\Container\Definition; |
| 4 | |
| 5 | use IteratorAggregate; |
| 6 | use Imagify\Dependencies\League\Container\ContainerAwareInterface; |
| 7 | |
| 8 | interface DefinitionAggregateInterface extends ContainerAwareInterface, IteratorAggregate |
| 9 | { |
| 10 | /** |
| 11 | * Add a definition to the aggregate. |
| 12 | * |
| 13 | * @param string $id |
| 14 | * @param mixed $definition |
| 15 | * @param boolean $shared |
| 16 | * |
| 17 | * @return DefinitionInterface |
| 18 | */ |
| 19 | public function add(string $id, $definition, bool $shared = false) : DefinitionInterface; |
| 20 | |
| 21 | /** |
| 22 | * Checks whether alias exists as definition. |
| 23 | * |
| 24 | * @param string $id |
| 25 | * |
| 26 | * @return boolean |
| 27 | */ |
| 28 | public function has(string $id) : bool; |
| 29 | |
| 30 | /** |
| 31 | * Checks whether tag exists as definition. |
| 32 | * |
| 33 | * @param string $tag |
| 34 | * |
| 35 | * @return boolean |
| 36 | */ |
| 37 | public function hasTag(string $tag) : bool; |
| 38 | |
| 39 | /** |
| 40 | * Get the definition to be extended. |
| 41 | * |
| 42 | * @param string $id |
| 43 | * |
| 44 | * @return DefinitionInterface |
| 45 | */ |
| 46 | public function getDefinition(string $id) : DefinitionInterface; |
| 47 | |
| 48 | /** |
| 49 | * Resolve and build a concrete value from an id/alias. |
| 50 | * |
| 51 | * @param string $id |
| 52 | * @param boolean $new |
| 53 | * |
| 54 | * @return mixed |
| 55 | */ |
| 56 | public function resolve(string $id, bool $new = false); |
| 57 | |
| 58 | /** |
| 59 | * Resolve and build an array of concrete values from a tag. |
| 60 | * |
| 61 | * @param string $tag |
| 62 | * @param boolean $new |
| 63 | * |
| 64 | * @return mixed |
| 65 | */ |
| 66 | public function resolveTagged(string $tag, bool $new = false); |
| 67 | } |
| 68 |