Scalr\Model\Entity\CloudCredentialsProperty::save PHP Method

save() public method

See also: AbstractEntity::save()
public save ( )
    public function save()
    {
        /* @var $field Field */
        //NOTE: hack for partial encryption, todo: think about improvement of this
        if (in_array($this->name, static::listEncryptedFields())) {
            $field = $this->getIterator()->fields()['value'];
            $prevType = $field->getType();
            $field->setType(new EncryptedType($field));
        }
        parent::save();
        if (isset($field)) {
            $field->setType($prevType);
        }
    }
CloudCredentialsProperty