src/Core/Injector/Injector.php
public function updateSpec($id, $property, $value, $append = true)
    {
        if (isset($this->specs[$id]['properties'][$property])) {
            // by ref so we're updating the actual value
            $current = &$this->specs[$id]['properties'][$property];
            if (is_array($current) && $append) {
                $current[] = $value;
            } else {
                $this->specs[$id]['properties'][$property] = $value;
            }

            // and reload the object; existing bindings don't get
            // updated though! (for now...)
            if (isset($this->serviceCache[$id])) {
                $this->instantiate(array('class'=>$id), $id);
            }
        }
    }
public function updateSpec($id, $property, $value, $append = true)
    {
        if (isset($this->specs[$id]['properties'][$property])) {
            // by ref so we're updating the actual value
            $current = &$this->specs[$id]['properties'][$property];
            if (is_array($current) && $append) {
                $current[] = $value;
            } else {
                $this->specs[$id]['properties'][$property] = $value;
            }

            // and reload the object; existing bindings don't get
            // updated though! (for now...)
            if (isset($this->serviceCache[$id])) {
                $this->instantiate(array('class'=>$id), $id);
            }
        }
    }
public function updateSpec ( $ id , $ property , $ value , $ append = true ) { if ( isset ( $ this -> specs [ $ id ] [ 'properties' ] [ $ property ] ) ) { // by ref so we're updating the actual value $ current = & $ this -> specs [ $ id ] [ 'properties' ] [ $ property ] ; if ( is_array ( $ current ) && $ append ) { $ current [ ] = $ value ; } else { $ this -> specs [ $ id ] [ 'properties' ] [ $ property ] = $ value ; } // and reload the object; existing bindings don't get // updated though! (for now...) if ( isset ( $ this -> serviceCache [ $ id ] ) ) { $ this -> instantiate ( array ( 'class' => $ id ) , $ id ) ; } } }
Update the configuration of an already defined service

Use this if you don't want to register a complete new config, just append
to an existing configuration. Helpful to avoid overwriting someone else's changes

updateSpec('RequestProcessor', 'filters', '%$MyFilter')

@param string $id
The name of the service to update the definition for
@param string $property
The name of the property to update.
@param mixed $value
The value to set
@param boolean $append
Whether to append (the default) when the property is an array
Update the configuration of an already defined service