public function import(array $recipe)
    {
        foreach ($recipe as $key => $value) {
            $method = 'set'.ucfirst($key);

            if (false === is_callable([$this, $method])) {
                throw new Doozr_Di_Exception(
                    sprintf('Property not supported: "%s"', $key)
                );
            }

            $this->{$method}($value);
        }
    }
public function import(array $recipe)
    {
        foreach ($recipe as $key => $value) {
            $method = 'set'.ucfirst($key);

            if (false === is_callable([$this, $method])) {
                throw new Doozr_Di_Exception(
                    sprintf('Property not supported: "%s"', $key)
                );
            }

            $this->{$method}($value);
        }
    }
public function import ( array $ recipe ) { foreach ( $ recipe as $ key => $ value ) { $ method = 'set' . ucfirst ( $ key ) ; if ( false === is_callable ( [ $ this , $ method ] ) ) { throw new Doozr_Di_Exception ( sprintf ( 'Property not supported: "%s"' , $ key ) ) ; } $ this -> { $ method } ( $ value ) ; } }
Generic import for recipes.

@param array $recipe The recipe to import.

@author Benjamin Carl <opensource@clickalicious.de>

@throws Doozr_Di_Exception
Generic import for recipes .