Nette\ComponentModel\Container::__clone PHP Method

__clone() public method

Object cloning.
public __clone ( )
    public function __clone()
    {
        if ($this->components) {
            $oldMyself = reset($this->components)->getParent();
            $oldMyself->cloning = $this;
            foreach ($this->components as $name => $component) {
                $this->components[$name] = clone $component;
            }
            $oldMyself->cloning = NULL;
        }
        parent::__clone();
    }