protected function generateFiles($type)
    {
        if ($type == 'module') {
            $mode = 'module';

            $this->data['type']       = 'Module';
            $this->data['lower_type'] = 'module';
        } else if ($type == 'theme') {
            $mode = 'theme';

            $this->data['type']       = 'Theme';
            $this->data['lower_type'] = 'theme';
        } else {
            $mode = $this->option('extended') ? 'extended' : 'default';

            $this->data['type']       = 'Package';
            $this->data['lower_type'] = 'package';
        }

        $packageFiles = $this->packageFiles[$mode];

        //
        $slug = $this->data['slug'];

        if ($type == 'module') {
            $packagePath = $this->getModulePath($slug);
        } else if ($type == 'theme') {
            $packagePath = $this->getThemePath($slug);
        } else {
            $packagePath = $this->getPackagePath($slug);
        }

        foreach ($packageFiles as $key => $file) {
            $file = $this->formatContent($file);

            $this->files->put(
                $this->getDestinationFile($file, $packagePath), $this->getStubContent($key, $mode)
            );
        }

        // Generate the Language files
        $content ='<?php

return array (
);';

        $languageFolders = $this->getLanguagePaths($slug, $type);

        foreach ($languageFolders as $folder) {
            $path = $packagePath .$folder .DS .'messages.php';

            $this->files->put($path, $content);
        }
    }
protected function generateFiles($type)
    {
        if ($type == 'module') {
            $mode = 'module';

            $this->data['type']       = 'Module';
            $this->data['lower_type'] = 'module';
        } else if ($type == 'theme') {
            $mode = 'theme';

            $this->data['type']       = 'Theme';
            $this->data['lower_type'] = 'theme';
        } else {
            $mode = $this->option('extended') ? 'extended' : 'default';

            $this->data['type']       = 'Package';
            $this->data['lower_type'] = 'package';
        }

        $packageFiles = $this->packageFiles[$mode];

        //
        $slug = $this->data['slug'];

        if ($type == 'module') {
            $packagePath = $this->getModulePath($slug);
        } else if ($type == 'theme') {
            $packagePath = $this->getThemePath($slug);
        } else {
            $packagePath = $this->getPackagePath($slug);
        }

        foreach ($packageFiles as $key => $file) {
            $file = $this->formatContent($file);

            $this->files->put(
                $this->getDestinationFile($file, $packagePath), $this->getStubContent($key, $mode)
            );
        }

        // Generate the Language files
        $content ='<?php

return array (
);';

        $languageFolders = $this->getLanguagePaths($slug, $type);

        foreach ($languageFolders as $folder) {
            $path = $packagePath .$folder .DS .'messages.php';

            $this->files->put($path, $content);
        }
    }
protected function generateFiles ( $ type ) { if ( $ type == 'module' ) { $ mode = 'module' ; $ this -> data [ 'type' ] = 'Module' ; $ this -> data [ 'lower_type' ] = 'module' ; } else if ( $ type == 'theme' ) { $ mode = 'theme' ; $ this -> data [ 'type' ] = 'Theme' ; $ this -> data [ 'lower_type' ] = 'theme' ; } else { $ mode = $ this -> option ( 'extended' ) ? 'extended' : 'default' ; $ this -> data [ 'type' ] = 'Package' ; $ this -> data [ 'lower_type' ] = 'package' ; } $ packageFiles = $ this -> packageFiles [ $ mode ] ; // $ slug = $ this -> data [ 'slug' ] ; if ( $ type == 'module' ) { $ packagePath = $ this -> getModulePath ( $ slug ) ; } else if ( $ type == 'theme' ) { $ packagePath = $ this -> getThemePath ( $ slug ) ; } else { $ packagePath = $ this -> getPackagePath ( $ slug ) ; } foreach ( $ packageFiles as $ key => $ file ) { $ file = $ this -> formatContent ( $ file ) ; $ this -> files -> put ( $ this -> getDestinationFile ( $ file , $ packagePath ) , $ this -> getStubContent ( $ key , $ mode ) ) ; } // Generate the Language files $ content = '<?php

return array (
);' ; $ languageFolders = $ this -> getLanguagePaths ( $ slug , $ type ) ; foreach ( $ languageFolders as $ folder ) { $ path = $ packagePath . $ folder . DS . 'messages.php' ; $ this -> files -> put ( $ path , $ content ) ; } }
Generate defined Package files.

@param string $type
@return void
Generate defined Package files .