public function validatePresets()
    {
        $this->presets_data = array();
        if (!empty($this->assets_db)) {
            foreach ($this->assets_db as $package_name=>$package_data) {
                if (!empty($package_data['assets_presets'])) {
                    foreach ($package_data['assets_presets'] as $preset_name=>$preset_data) {
                        if (array_key_exists($preset_name, $this->presets_data) && ($this->conflict_flag & self::PRESETS_CONFLICT)) {
                            throw new \Exception(
                                sprintf('Presets conflict: duplicate entry named "%s"!', $preset_name)
                            );
                        } else {
                            $this->presets_data[$preset_name] = array(
                                'data'=>$preset_data,
                                'package'=>$package_name
                            );
                        }
                    }
                }
            }
        }
    }
public function validatePresets()
    {
        $this->presets_data = array();
        if (!empty($this->assets_db)) {
            foreach ($this->assets_db as $package_name=>$package_data) {
                if (!empty($package_data['assets_presets'])) {
                    foreach ($package_data['assets_presets'] as $preset_name=>$preset_data) {
                        if (array_key_exists($preset_name, $this->presets_data) && ($this->conflict_flag & self::PRESETS_CONFLICT)) {
                            throw new \Exception(
                                sprintf('Presets conflict: duplicate entry named "%s"!', $preset_name)
                            );
                        } else {
                            $this->presets_data[$preset_name] = array(
                                'data'=>$preset_data,
                                'package'=>$package_name
                            );
                        }
                    }
                }
            }
        }
    }
public function validatePresets ( ) { $ this -> presets_data = array ( ) ; if ( ! empty ( $ this -> assets_db ) ) { foreach ( $ this -> assets_db as $ package_name => $ package_data ) { if ( ! empty ( $ package_data [ 'assets_presets' ] ) ) { foreach ( $ package_data [ 'assets_presets' ] as $ preset_name => $ preset_data ) { if ( array_key_exists ( $ preset_name , $ this -> presets_data ) && ( $ this -> conflict_flag & self :: PRESETS_CONFLICT ) ) { throw new \ Exception ( sprintf ( 'Presets conflict: duplicate entry named "%s"!' , $ preset_name ) ) ; } else { $ this -> presets_data [ $ preset_name ] = array ( 'data' => $ preset_data , 'package' => $ package_name ) ; } } } } } }
Load and validate all packages presets in one table

@return  void
@throws  \Exception if the `$conflict_flag` is set on `self::PRESETS_CONFLICT` in case of duplicate preset name
Load and validate all packages presets in one table