Changeset 199 for trunk/trax/vendor/trax/trax_generator.php
- Timestamp:
- 05/04/06 19:52:43 (6 years ago)
- Files:
-
- 1 modified
-
trunk/trax/vendor/trax/trax_generator.php (modified) (4 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
trunk/trax/vendor/trax/trax_generator.php
- Property svn:keywords set to Id
r198 r199 342 342 } 343 343 $this->layout_filename = $name; 344 345 344 $this->controller_class = Inflector::camelize($name); 346 345 … … 455 454 */ 456 455 function generate_scaffold($model_name, $controller_name, $views="") { 456 //echo 'generate_scaffold("'.$model_name.'", "' 457 // .$controller_name.'", "'.$views.'")'."\n"; 457 458 if(!$model_exists = $this->generate_model($model_name)) { 458 459 echo "Error - Can't create Model: $model_name.\n"; … … 462 463 $GLOBALS['current_controller_object'] =& $this; 463 464 $model_class_name = Inflector::classify($model_name); 464 $sing luar_model_name = Inflector::singularize($model_name);465 $singular_model_name = Inflector::singularize($model_name); 465 466 $plural_model_name = Inflector::pluralize($model_name); 466 467 $human_model_name = Inflector::humanize($model_name); 467 468 468 469 try { 469 $this->{$sing luar_model_name} = new $model_class_name();470 $this->{$singular_model_name} = new $model_class_name(); 470 471 } catch (ActiveRecordError $e) { 471 472 echo "Can't create model.\n"; … … 610 611 611 612 # Generate the layout for the scaffolding 612 $layout_file = $this->layouts_path."/".$this->layout_filename.".".$this->view_file_extention; 613 $layout_file = $this->layouts_path."/" 614 . $this->layout_filename."." 615 . $this->view_file_extention; 613 616 if(!file_exists($this->layouts_path)) { 614 617 mkdir($this->layouts_path);
