public function apply(\MUtil_Model_ModelAbstract $model, $valueField)
    {
        $model->setSaveWhenNotNull($valueField);
        $model->setOnLoad($valueField, array($this, 'loadValue'));
        $model->setOnSave($valueField, array($this, 'saveValue'));

        if ($model instanceof \MUtil_Model_DatabaseModelAbstract) {
            $model->setOnTextFilter($valueField, false);
        }

        return $this;
    }
public function apply(\MUtil_Model_ModelAbstract $model, $valueField)
    {
        $model->setSaveWhenNotNull($valueField);
        $model->setOnLoad($valueField, array($this, 'loadValue'));
        $model->setOnSave($valueField, array($this, 'saveValue'));

        if ($model instanceof \MUtil_Model_DatabaseModelAbstract) {
            $model->setOnTextFilter($valueField, false);
        }

        return $this;
    }
public function apply ( \ MUtil_Model_ModelAbstract $ model , $ valueField ) { $ model -> setSaveWhenNotNull ( $ valueField ) ; $ model -> setOnLoad ( $ valueField , array ( $ this , 'loadValue' ) ) ; $ model -> setOnSave ( $ valueField , array ( $ this , 'saveValue' ) ) ; if ( $ model instanceof \ MUtil_Model_DatabaseModelAbstract ) { $ model -> setOnTextFilter ( $ valueField , false ) ; } return $ this ; }
Use this function for a default application of this type to the model

@param \MUtil_Model_ModelAbstract $model
@param string $valueField The field containing the value to be encrypted
@return \Gems_Model_Type_EncryptedField (continuation pattern)
Use this function for a default application of this type to the model