Author: N.V.
Inheritance: extends Scalr\Util\ObjectAccess
Example #1
0
 /**
  * {@inheritdoc}
  * @see AbstractEntity::save()
  */
 public function save()
 {
     parent::save();
     if (!empty($this->_settings)) {
         $this->_settings->save();
     }
 }
Example #2
0
 /**
  * Unlocks this farm
  *
  * @param   User    $user The User on whose behalf the lock unset
  * @return  Farm
  */
 public function unlock(User $user)
 {
     $this->_settings->saveSettings([FarmSetting::LOCK => '', FarmSetting::LOCK_BY => '', FarmSetting::LOCK_UNLOCK_BY => $user->id, FarmSetting::LOCK_COMMENT => '', FarmSetting::LOCK_RESTRICT => '']);
     return $this;
 }
Example #3
0
 /**
  * {@inheritdoc}
  * @see AbstractEntity::save()
  */
 public function save()
 {
     try {
         $this->db()->BeginTrans();
         parent::save();
         if (!empty($this->_properties)) {
             $this->_properties->save();
         }
         $this->db()->CommitTrans();
     } catch (Exception $e) {
         $this->db()->RollbackTrans();
         throw $e;
     }
 }
Example #4
0
 /**
  * {@inheritdoc}
  * @see AbstractEntity::save()
  */
 public function save()
 {
     $this->setupRole();
     $this->setupAlias();
     $this->setupScaling();
     $this->setupBehaviors();
     $this->setupPolling();
     parent::save();
     $this->setupAnalytics();
     if (!empty($this->_settings)) {
         $this->_settings->save();
     }
 }
Example #5
0
 /**
  * {@inheritdoc}
  * @see AbstractEntity::save()
  */
 public function save()
 {
     parent::save();
     if (!empty($this->_properties)) {
         $this->_properties->save();
     }
 }