Show
Ignore:
Timestamp:
05/04/06 19:52:43 (6 years ago)
Author:
haas
Message:

many fixes, documentation improvements

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/trax/vendor/trax/trax_generator.php

    • Property svn:keywords set to Id
    r198 r199  
    342342        } 
    343343        $this->layout_filename = $name; 
    344  
    345344        $this->controller_class = Inflector::camelize($name); 
    346345 
     
    455454     */ 
    456455    function generate_scaffold($model_name, $controller_name, $views="") { 
     456        //echo 'generate_scaffold("'.$model_name.'", "' 
     457        //          .$controller_name.'", "'.$views.'")'."\n"; 
    457458        if(!$model_exists = $this->generate_model($model_name)) { 
    458459            echo "Error - Can't create Model: $model_name.\n";     
     
    462463        $GLOBALS['current_controller_object'] =& $this; 
    463464        $model_class_name = Inflector::classify($model_name); 
    464         $singluar_model_name = Inflector::singularize($model_name); 
     465        $singular_model_name = Inflector::singularize($model_name); 
    465466        $plural_model_name = Inflector::pluralize($model_name);   
    466467        $human_model_name = Inflector::humanize($model_name);       
    467468 
    468469        try { 
    469             $this->{$singluar_model_name} = new $model_class_name(); 
     470            $this->{$singular_model_name} = new $model_class_name(); 
    470471        } catch (ActiveRecordError $e) { 
    471472            echo "Can't create model.\n"; 
     
    610611         
    611612        # 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; 
    613616        if(!file_exists($this->layouts_path)) { 
    614617            mkdir($this->layouts_path);