Development

Changeset 19587

You must first sign up to be able to contribute.

Changeset 19587

Show
Ignore:
Timestamp:
06/26/09 11:26:27 (8 months ago)
Author:
fabien
Message:

[dependency_injection] refactored loader file classes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • components/dependency_injection/trunk/lib/sfServiceContainerLoaderFile.php

    r19585 r19587  
    4141  } 
    4242 
     43  /** 
     44   * Loads a resource. 
     45   * 
     46   * A resource is a file or an array of files. 
     47   * 
     48   * The concrete classes always hava access to an array of files 
     49   * as this method converts single files to arrays. 
     50   * 
     51   * @param mixed $resource The resource path 
     52   */ 
     53  public function load($resource) 
     54  { 
     55    if (!is_array($resource)) 
     56    { 
     57      $resource = array($resource); 
     58    } 
     59 
     60    return parent::load($resource); 
     61  } 
     62 
    4363  protected function getAbsolutePath($file, $currentPath = null) 
    4464  { 
  • components/dependency_injection/trunk/lib/sfServiceContainerLoaderFileIni.php

    r19586 r19587  
    2222  public function doLoad($files) 
    2323  { 
    24     if (!is_array($files)) 
    25     { 
    26       $files = array($files); 
    27     } 
    28  
    2924    $parameters = array(); 
    3025    foreach ($files as $file) 
  • components/dependency_injection/trunk/lib/sfServiceContainerLoaderFileXml.php

    r19562 r19587  
    2222  public function doLoad($files) 
    2323  { 
    24     if (!is_array($files)) 
    25     { 
    26       $files = array($files); 
    27     } 
    28  
    2924    return $this->parse($this->getFilesAsXml($files)); 
    3025  } 
     
    169164  } 
    170165 
    171   protected function getFilesAsXml($files) 
     166  protected function getFilesAsXml(array $files) 
    172167  { 
    173168    $xmls = array(); 
  • components/dependency_injection/trunk/lib/sfServiceContainerLoaderFileYaml.php

    r19582 r19587  
    2424  public function doLoad($files) 
    2525  { 
    26     if (!is_array($files)) 
    27     { 
    28       $files = array($files); 
    29     } 
    30  
    3126    return $this->parse($this->getFilesAsArray($files)); 
    3227  } 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.