Changeset 3118

Show
Ignore:
Timestamp:
04/14/08 15:47:15 (3 months ago)
Author:
pmjones
Message:

rename local var $class to $record_class for clarity (cf. $model_class)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Solar/Sql/Model.php

    r3117 r3118  
    13831383         
    13841384        // the record class we'll use 
    1385         $class = null; 
     1385        $record_class = null; 
    13861386         
    13871387        // look for an inheritance in relation to $data 
     
    14091409             
    14101410            // now we need the inherited record class.  suppress exceptions. 
    1411             // note that $class could still end up false, as we might not find 
     1411            // note that $record_class could still end up false, as we might not find 
    14121412            // a related class in the hierarchy. 
    1413             $class = $this->_stack->load($inherit . '_Record', false); 
     1413            $record_class = $this->_stack->load($inherit . '_Record', false); 
    14141414        } 
    14151415         
    14161416        // even if inheritance failed, look for a model-specific record class 
    1417         if (! $class) { 
    1418             $class = $this->_stack->load('Record', false); 
     1417        if (! $record_class) { 
     1418            $record_class = $this->_stack->load('Record', false); 
    14191419        } 
    14201420         
    14211421        // final fallback: the default record class 
    1422         if (! $class) { 
    1423             $class = $this->_record_class; 
     1422        if (! $record_class) { 
     1423            $record_class = $this->_record_class; 
    14241424        } 
    14251425         
    14261426        // factory the appropriate record class, set the model for it, then 
    14271427        // load and return it. 
    1428         $record = Solar::factory($class); 
     1428        $record = Solar::factory($record_class); 
    14291429        $record->setModel($model); 
    14301430        $record->load($data);