Development

Changeset 19673

You must first sign up to be able to contribute.

Changeset 19673

Show
Ignore:
Timestamp:
06/29/09 14:51:11 (4 years ago)
Author:
fabien
Message:

[dependency_injection] fixed various small bugs

Files:

Legend:

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

    r19671 r19673  
    193193      case false === $value: 
    194194        return 'false'; 
     195      case is_object($value) || is_resource($value): 
     196        throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.'); 
    195197      default: 
    196198        return $value; 
  • components/dependency_injection/trunk/lib/sfServiceContainerDumperYaml.php

    r19582 r19673  
    3030  { 
    3131    return $this->addParameters()."\n".$this->addServices(); 
    32   } 
    33  
    34   protected function addServiceShared($id, $definition) 
    35   { 
    36     if (!$definition->isShared()) 
    37     { 
    38       return "    shared: false\n"; 
    39     } 
    4032  } 
    4133 
     
    158150      elseif (is_string($v)) 
    159151      { 
    160         $args[$k] = preg_replace('/%(.+?)%/', '%%$1%%', $v); 
     152        $args[$k] = str_replace('%', '%%', $v); 
    161153      } 
    162154      else