mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 03:35:01 +01:00
38 lines
904 B
PHP
38 lines
904 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Nette\ComponentModel;
|
|
|
|
// mimics: https://github.com/nette/component-model/blob/master/src/ComponentModel/IContainer.php
|
|
|
|
if (interface_exists('Nette\ComponentModel\IContainer')) {
|
|
return;
|
|
}
|
|
|
|
interface IContainer extends IComponent
|
|
{
|
|
/**
|
|
* Adds the component to the container.
|
|
* @return static
|
|
*/
|
|
function addComponent(IComponent $component, ?string $name);
|
|
|
|
/**
|
|
* Removes the component from the container.
|
|
*/
|
|
function removeComponent(IComponent $component): void;
|
|
|
|
/**
|
|
* Returns component specified by name or path.
|
|
* @throws \Nette\InvalidArgumentException if component doesn't exist
|
|
*/
|
|
function getComponent(string $name): ?IComponent;
|
|
|
|
/**
|
|
* Iterates over descendants components.
|
|
* @return \Iterator<int|string,IComponent>
|
|
*/
|
|
function getComponents(): \Iterator;
|
|
}
|