public function generateJsonFiles($data, $dir, $normalizerClosure, $makeGroupKeyClosure, $mergeData, $groupKey = 'cca3')
    {
        $this->helper->message('Normalizing data...');

        $data = $this->normalizeData($data, $dir, $normalizerClosure);

        $this->helper->message('Merging data...');

        $data = $mergeData($data);

        $this->helper->message('Generating files...');

        $this->generateAllJsonFiles($dir, $makeGroupKeyClosure, $data, $groupKey);

        return $data;
    }
public function generateJsonFiles($data, $dir, $normalizerClosure, $makeGroupKeyClosure, $mergeData, $groupKey = 'cca3')
    {
        $this->helper->message('Normalizing data...');

        $data = $this->normalizeData($data, $dir, $normalizerClosure);

        $this->helper->message('Merging data...');

        $data = $mergeData($data);

        $this->helper->message('Generating files...');

        $this->generateAllJsonFiles($dir, $makeGroupKeyClosure, $data, $groupKey);

        return $data;
    }
public function generateJsonFiles ( $ data , $ dir , $ normalizerClosure , $ makeGroupKeyClosure , $ mergeData , $ groupKey = 'cca3' ) { $ this -> helper -> message ( 'Normalizing data...' ) ; $ data = $ this -> normalizeData ( $ data , $ dir , $ normalizerClosure ) ; $ this -> helper -> message ( 'Merging data...' ) ; $ data = $ mergeData ( $ data ) ; $ this -> helper -> message ( 'Generating files...' ) ; $ this -> generateAllJsonFiles ( $ dir , $ makeGroupKeyClosure , $ data , $ groupKey ) ; return $ data ; }
Generate json files from array.

@param $data
@param $dir
@param Closure $normalizerClosure
@param Closure|null $makeGroupKeyClosure
@param Closure $mergeData
@param string $groupKey
@return \PragmaRX\Coollection\Package\Coollection
Generate json files from array .