/**
  * Generate command class based on $args, $assocParams and $params
  * and put content in Command.php file in global cache wp-cli path.
  *
  * @return void
  */
 public static function generateCommandClass()
 {
     $args = \ViewOne\WPCLIEnvironment\Command::getArguments();
     $assocParams = \ViewOne\WPCLIEnvironment\Command::getAssocParameters();
     $params = \ViewOne\WPCLIEnvironment\Command::getParameters();
     $moutstache = new \Mustache_Engine();
     $dir = self::getCachePath();
     if (!file_exists($dir . '/wp-cli-environment')) {
         mkdir($dir . '/wp-cli-environment', 0777, true);
     }
     $template = file_get_contents(__DIR__ . '/../../../template/command.mustache');
     $variables = array('args' => $args, 'assoc_params' => $assocParams, 'params' => $params);
     $class = $moutstache->render($template, $variables);
     file_put_contents($dir . '/wp-cli-environment/Command.php', $class);
 }