rector/stubs/Nette/ComponentModel/IContainer.php
2020-07-27 01:51:30 +02:00

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;
}