Scalr\Model\Collections\SettingsCollection::__clone PHP Method

__clone() public method

Reset referenced fields
public __clone ( )
    public function __clone()
    {
        if (!$this->loaded) {
            $this->load();
        }
        $entities = $this->entities;
        $this->entities = [];
        $this->modified = [];
        $this->data = [];
        foreach ($entities as $name => $entity) {
            $newEntity = clone $entity;
            $this->entities[$name] = $newEntity;
            $this->modified[$name] = $newEntity;
            $this->data[$name] =& $newEntity->value;
        }
    }