Changeset 232

Show
Ignore:
Timestamp:
05/14/07 18:37:55 (2 years ago)
Author:
bermiferrer
Message:

Replacing modulize with camelize where model singularization is not expected

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/Ak.php

    r226 r232  
    12611261        $models = array(); 
    12621262        foreach ($args as $arg){ 
    1263             $model_name = AkInflector::modulize($arg); 
     1263            $model_name = AkInflector::camelize($arg); 
    12641264            $model = AkInflector::toModelFilename($model_name); 
    12651265            if(file_exists($model)){ 
  • trunk/lib/AkActionView/TemplateEngines/AkSintags/AkSintagsParser.php

    r229 r232  
    341341                return true; 
    342342            }else{ 
    343                 trigger_error(Ak::t('Could not find a helper to handle the method "%method" you called using Sintags in your view', array('%method'=>$method_name)), E_USER_NOTICE); 
     343                trigger_error(Ak::t('Could not find a helper to handle the method "%method" you called in your view', array('%method'=>$method_name)), E_USER_NOTICE); 
    344344            } 
    345345            return false; 
  • trunk/lib/AkActiveRecord.php

    r225 r232  
    12851285        if(!empty($record[$inheritance_column])){ 
    12861286            $inheritance_column = $record[$inheritance_column]; 
    1287             $inheritance_model_name = AkInflector::modulize($inheritance_column); 
     1287            $inheritance_model_name = AkInflector::camelize($inheritance_column); 
    12881288            @require_once(AkInflector::toModelFilename($inheritance_model_name)); 
    12891289            if(!class_exists($inheritance_model_name)){ 
  • trunk/lib/AkActiveRecord/AkObserver.php

    r207 r232  
    136136        foreach ($models as $class_name) 
    137137        { 
    138             $class_name = AkInflector::modulize($class_name); 
     138            $class_name = AkInflector::camelize($class_name); 
    139139            include_once(AkInflector::toModelFilename($class_name)); 
    140140            eval("\$model =& new $class_name();"); 
  • trunk/lib/AkBaseModel.php

    r218 r232  
    110110            $this->_parentModelName = $model_name; 
    111111        }else{ 
    112             $class_name = AkInflector::modulize(get_parent_class($this)); 
     112            $class_name = AkInflector::camelize(get_parent_class($this)); 
    113113            if(!AK_PHP5){ 
    114114                $included_models = $this->_getIncludedModelNames(); 
     
    141141        foreach ($included_files as $file_name){ 
    142142            if(strstr($file_name,AK_MODELS_DIR)){ 
    143                 $models[] = AkInflector::modulize(str_replace(array(AK_MODELS_DIR.DS,'.php'),'',$file_name)); 
     143                $models[] = AkInflector::camelize(str_replace(array(AK_MODELS_DIR.DS,'.php'),'',$file_name)); 
    144144            } 
    145145        } 
  • trunk/script/generators/scaffold/scaffold_generator.php

    r100 r232  
    2424    function cast() 
    2525    { 
    26         $this->model_name = AkInflector::modulize($this->model_name); 
     26        $this->model_name = AkInflector::camelize($this->model_name); 
    2727        $this->model_file_path = AkInflector::toModelFilename($this->model_name); 
    2828        $this->controller_name = empty($this->controller_name) ? $this->model_name : (AkInflector::camelize($this->controller_name));