コード例 #1
0
 private function generateHelper($methods)
 {
     $class_content = $this->getClassOpening();
     foreach ($methods as $method_name => $route_key) {
         $class_content .= $this->getRouteMethod($method_name, $route_key);
     }
     $class_content .= $this->getClassClosing();
     $d = GeneratorUtils::getGeneratedClassFolder();
     $f = $d->newFile("Routes.php");
     $f->setContent($class_content);
 }
コード例 #2
0
 /**
  * Rigenera tutti gli helper
  */
 function regenerate_helpers()
 {
     $this->deletePreviousHelpers();
     echo "Old LangHelpers deleted.\n";
     $d = GeneratorUtils::getGeneratedClassFolder();
     $app_dir = $d->newDir("App");
     $app_dir->touch();
     $lang_dir = $app_dir->newDir("Lang");
     $lang_dir->touch();
     echo "LangHelpers dir created.\n";
     $root = new LangRoot(new Dir(self::LARAVEL_LOCALIZATION_FILES_ROOT));
     echo "Lang data collected.\n";
     $merged_data = $root->getMergedData();
     echo "Locale data merged.\n";
     $merged_data->generateHelpers([], $this->namespace_prefix, $lang_dir);
     echo "LangHelpers generated.\n";
 }
コード例 #3
0
 public function regenerate_helper()
 {
     $font_awesome_class_content = $this->getFontAwesomeClassOpening() . $this->getFontAwesomeIconMethods() . $this->getFontAwesomeClassClosing();
     $d = GeneratorUtils::getGeneratedClassFolder();
     $f = $d->newFile($this->class_name . ".php");
     $f->setContent($font_awesome_class_content);
 }