src/Model/Behavior/KeyValueBehavior.php
public function getAllKeyValues()
    {
        $query = $this->_table->query();

        $query->formatResults(function (ResultSet $results) {
            return $results->map(function ($row) {
                if ($row['serialized'] === true) {
                    $row['value'] = unserialize($row['value']);
                }
                return $row;
            });
        });

        $settings = [];

        foreach ($query->all() as $row) {
            $key = $row['scope'] . '__' . $row[$this->config('fields.key')];
            $value = $row[$this->config('fields.value')];
            $settings[$key] = $value;
        }

        return Hash::expand($settings, '__');
    }
public function getAllKeyValues()
    {
        $query = $this->_table->query();

        $query->formatResults(function (ResultSet $results) {
            return $results->map(function ($row) {
                if ($row['serialized'] === true) {
                    $row['value'] = unserialize($row['value']);
                }
                return $row;
            });
        });

        $settings = [];

        foreach ($query->all() as $row) {
            $key = $row['scope'] . '__' . $row[$this->config('fields.key')];
            $value = $row[$this->config('fields.value')];
            $settings[$key] = $value;
        }

        return Hash::expand($settings, '__');
    }
public function getAllKeyValues ( ) { $ query = $ this -> _table -> query ( ) ; $ query -> formatResults ( function ( ResultSet $ results ) { return $ results -> map ( function ( $ row ) { if ( $ row [ 'serialized' ] === true ) { $ row [ 'value' ] = unserialize ( $ row [ 'value' ] ) ; } return $ row ; } ) ; } ) ; $ settings = [ ] ; foreach ( $ query -> all ( ) as $ row ) { $ key = $ row [ 'scope' ] . '__' . $ row [ $ this -> config ( 'fields.key' ) ] ; $ value = $ row [ $ this -> config ( 'fields.value' ) ] ; $ settings [ $ key ] = $ value ; } return Hash :: expand ( $ settings , '__' ) ; }
Returns all keys and their values for all scopes.

@return array
Returns all keys and their values for all scopes .