/** * Decrypt value after loading * If no value present, do not decrypt! */ protected function _afterLoad() { $value = (string) $this->getValue(); if ($value) { parent::_afterLoad(); } }
/** * After loading data, decide whether to decrypt * Should not decrypt empty string * * @return $this */ protected function _afterLoad() { if ((string) $this->getValue()) { parent::_afterLoad(); } return $this; }
/** * After loading data, decide whether to decrypt * Should not decrypt empty string * * @return $this */ protected function _afterLoad() { if ((string) $this->getValue()) { $originalValue = $this->getValue(); parent::_afterLoad(); if ($this->_isValidString($originalValue) && !$this->_isValidString($this->getValue())) { $this->setValue($originalValue); } } return $this; }