public function serializeLoadField(Field $f, $value)
    {
        try {
            // use $f->serialize = [encode_callback, decode_callback]
            if (is_array($f->serialize) && isset($f->serialize[1]) && is_callable($t = $f->serialize[1])) {
                return $t($f, $value, $this);
            }

            // run persistence-specific un-serialization of field value
            return $this->_serializeLoadField($f, $value);
        } catch (\Exception $e) {
            throw new Exception(['Unable to serialize field value on load', 'field' => $f->name], null, $e);
        }
    }
public function serializeLoadField(Field $f, $value)
    {
        try {
            // use $f->serialize = [encode_callback, decode_callback]
            if (is_array($f->serialize) && isset($f->serialize[1]) && is_callable($t = $f->serialize[1])) {
                return $t($f, $value, $this);
            }

            // run persistence-specific un-serialization of field value
            return $this->_serializeLoadField($f, $value);
        } catch (\Exception $e) {
            throw new Exception(['Unable to serialize field value on load', 'field' => $f->name], null, $e);
        }
    }
public function serializeLoadField ( Field $ f , $ value ) { try { // use $f->serialize = [encode_callback, decode_callback] if ( is_array ( $ f -> serialize ) && isset ( $ f -> serialize [ 1 ] ) && is_callable ( $ t = $ f -> serialize [ 1 ] ) ) { return $ t ( $ f , $ value , $ this ) ; } // run persistence-specific un-serialization of field value return $ this -> _serializeLoadField ( $ f , $ value ) ; } catch ( \ Exception $ e ) { throw new Exception ( [ 'Unable to serialize field value on load' , 'field' => $ f -> name ] , null , $ e ) ; } }
Provided with a value, will perform field un-serialization.
Can be used for the purposes of encryption or storing unsupported formats.

@param Field $f
@param mixed $value

@return mixed
Provided with a value will perform field un - serialization . Can be used for the purposes of encryption or storing unsupported formats .