protected static function mergeDefinitions(array $keys, array $customs, array $defaultValues)
    {
        $final = $defaultValues;

        foreach ($customs as $key => $custom) {

            if (!is_array($custom) || !array_key_exists('match', $custom) || !array_key_exists('set', $custom)) {
                continue;
            }
            $matches = (array) $custom['match'];
            $combined = array_intersect($keys, $matches);

            if (!empty($combined)) {
                $final = array_merge($final, (array) $custom['set']);
            }
        }

        return $final;
    }
protected static function mergeDefinitions(array $keys, array $customs, array $defaultValues)
    {
        $final = $defaultValues;

        foreach ($customs as $key => $custom) {

            if (!is_array($custom) || !array_key_exists('match', $custom) || !array_key_exists('set', $custom)) {
                continue;
            }
            $matches = (array) $custom['match'];
            $combined = array_intersect($keys, $matches);

            if (!empty($combined)) {
                $final = array_merge($final, (array) $custom['set']);
            }
        }

        return $final;
    }
protected static function mergeDefinitions ( array $ keys , array $ customs , array $ defaultValues ) { $ final = $ defaultValues ; foreach ( $ customs as $ key => $ custom ) { if ( ! is_array ( $ custom ) || ! array_key_exists ( 'match' , $ custom ) || ! array_key_exists ( 'set' , $ custom ) ) { continue ; } $ matches = ( array ) $ custom [ 'match' ] ; $ combined = array_intersect ( $ keys , $ matches ) ; if ( ! empty ( $ combined ) ) { $ final = array_merge ( $ final , ( array ) $ custom [ 'set' ] ) ; } } return $ final ; }
Merges the field definition

@param array $keys
@param array $customs
@param array $defaultValues

@return array
Merges the field definition