/** * Reset farm id on clone */ public function __clone() { if (empty($this->_settings)) { $this->settings->load(); } $unref = null; $this->id =& $unref; $this->_settings = clone $this->_settings; $this->_settings->setCriteria([['farmId' => &$this->id]]); $this->_settings->setDefaultProperties(['farmId' => &$this->id]); }
/** * Reset cloud credentials id on clone */ public function __clone() { $this->_properties = clone $this->properties; $unref = null; $this->id =& $unref; $this->name = "{$this->envId}-{$this->accountId}-{$this->cloud}-" . \Scalr::GenerateUID(true); $this->_properties->setCriteria([['cloudCredentialsId' => &$this->id]]); $this->_properties->setDefaultProperties(['cloudCredentialsId' => &$this->id]); }
/** * Reset cloud credentials id on clone */ public function __clone() { $unref = null; $this->id =& $unref; if (isset($this->_properties)) { $this->_properties = clone $this->_properties; $this->_properties->setCriteria([['cloudCredentialsId' => &$this->id]]); $this->_properties->setDefaultProperties(['cloudCredentialsId' => &$this->id]); } }