Development

Changeset 28590

You must first sign up to be able to contribute.

Changeset 28590

Show
Ignore:
Timestamp:
03/17/10 20:46:54 (3 years ago)
Author:
rande
Message:

[swCombinePlugin] fix wrong type hinting

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/swCombinePlugin/trunk/lib/task/swOptimizeCreateFilesTask.class.php

    r28588 r28590  
    151151          $this->combineAndOptimize('stylesheet', $assets); 
    152152        } 
    153          
     153                 
    154154        // Generate js module files 
    155155        $javascripts = $this->view_handler->exposeMergeConfigValue('javascripts', $view); 
     
    159159          $this->combineAndOptimize('javascript', $assets); 
    160160        } 
    161  
    162161      } 
    163162    } 
     
    204203    if(count($combine->getFiles()) == 0) 
    205204    { 
    206       $this->logSection('combine', '   ~ no files to add'); 
     205      $this->logSection('combine', '   ~ no files to add : '.$type); 
     206 
    207207      return; 
    208208    } 
     
    213213    ); 
    214214     
     215     
    215216    if(is_file($path)) 
    216217    { 
     
    218219      return; 
    219220    } 
    220      
     221 
    221222    $content = $combine->getContentsFromFiles(); 
    222223     
     
    224225    if(!$this->saveContents($path, $content)) 
    225226    { 
    226       $this->logSection('combine', '   ~ content is empty'); 
     227      $this->logSection('combine', '   ~ content is empty : '.$type); 
    227228      return; 
    228229    } 
    229      
     230 
    230231    // optimize file with the provided driver 
    231232    $driver = $this->getDriver($type); 
     
    234235    $results = $driver->getResults(); 
    235236     
     237 
    236238    $this->logSection('file+', sprintf(' > %s', $force_name_to ? $force_name_to : $this->view_handler->getCombinedName($type, $combined))); 
    237239     
     
    249251   * @param swDriveBase  
    250252   */ 
    251   public function getDriver(string $type) 
    252   { 
     253  public function getDriver($type) 
     254  { 
     255     
    253256    $driver = $this->view_parameters->get('configuration['.$type.'][driver]', false); 
    254257     
    255258    if(!class_exists($driver)) 
    256259    { 
     260       
    257261      throw new sfException('Invalid driver class : '.$driver); 
    258262    }