eskirex/dotify

Eskirex Dotify Component

dev-master 2018-07-23 11:41 UTC

This package is not auto-updated.

Last update: 2024-05-26 03:22:19 UTC


README

Hello. This is Dotify component.

Examples

<?php
    use Eskirex\Component\Dotify\Dotify;
    $arr = [
        'foo' => [
            'bar' => 'baz'
        ]
    ];

    $dotify = new Dotify($arr); // Optional method "setArray" or "setReferenceArray"
                                // Optional anonymous helper function "dotify()"

    print_r($dotify->get('foo'));       // Array
                                        // (
                                        //     [bar] => baz
                                        // )

    print_r($dotify->merge('foo', [     // Array
        'baz' => 'bar'                  // (
    ]));                                //     [bar] => baz
                                        //     [baz] => bar
                                        // )
                                        
    

License

MIT