修改对象序列化值

时间:2016-07-26 04:07:09

标签: php serialization

我想为' secret_key'更改以下对象的序列化值。和' public_key'然后我必须再次反序列化。 修改的最佳方法是什么(没有字符串替换选项)?

__PHP_Incomplete_Class Object
(
    [__PHP_Incomplete_Class_Name] => RulesReactionRule
    [*parent] => 
    [id] => 51
    [*elementId] => 1
    [weight] => 0
    [settings] => Array
        (
        )

    [name] => commerce_payment_commerce_stripe
    [label] => Stripe
    [plugin] => reaction rule
    [active] => 1
    [status] => 3
    [dirty] => 
    [module] => commerce_payment
    [owner] => rules
    [access_exposed] => 0
    [data] => __PHP_Incomplete_Class Object
 *RECURSION*
    [tags] => Array
        (
            [0] => Commerce Payment
        )

    [*children] => Array
        (
            [0] => __PHP_Incomplete_Class Object
                (
                    [__PHP_Incomplete_Class_Name] => RulesAction
                    [*parent] => __PHP_Incomplete_Class Object
 *RECURSION*
                    [id] => 
                    [*elementId] => 3
                    [weight] => 0
                    [settings] => Array
                        (
                            [commerce_order:select] => commerce-order
                            [payment_method] => Array
                                (
                                    [method_id] => commerce_stripe
                                    [settings] => Array
                                        (
                                            [stripe_currency] => USD
                                            [secret_key] => sk_test_CCVVVVCC
                                            [public_key] => pk_test_SDFFEFEF
                                            [display_title] => Stripe
                                            [cardonfile] => 1
                                            [txn_type] => authorize
                                        )

                                )

                        )

                    [*elementName] => commerce_payment_enable_commerce_stripe
                )

        )

    [*info] => Array
        (
        )

    [*conditions] => __PHP_Incomplete_Class Object
        (
            [__PHP_Incomplete_Class_Name] => RulesAnd
            [*parent] => __PHP_Incomplete_Class Object
 *RECURSION*
            [id] => 
            [*elementId] => 2
            [weight] => 0
            [settings] => Array
                (
                )

            [*children] => Array
                (
                )

            [*info] => Array
                (
                )

            [*negate] => 
        )

    [*events] => Array
        (
            [0] => commerce_payment_methods
        )

    [*eventSettings] => Array
        (
        )

)

0 个答案:

没有答案