src/Raikiri/Container.php
public function injectDependency($component)
    {
        $nullFilter = function($var) {
            return $var === null;
        };
        $members = array_keys(array_filter(get_object_vars($component), $nullFilter));
        $names = array_keys($this->components);
        $members = array_intersect($members, $names);
        foreach ($members as $key) {
            $component->$key = $this->get($key);
        }
    }
public function injectDependency($component)
    {
        $nullFilter = function($var) {
            return $var === null;
        };
        $members = array_keys(array_filter(get_object_vars($component), $nullFilter));
        $names = array_keys($this->components);
        $members = array_intersect($members, $names);
        foreach ($members as $key) {
            $component->$key = $this->get($key);
        }
    }
public function injectDependency ( $ component ) { $ nullFilter = function ( $ var ) { return $ var === null ; } ; $ members = array_keys ( array_filter ( get_object_vars ( $ component ) , $ nullFilter ) ) ; $ names = array_keys ( $ this -> components ) ; $ members = array_intersect ( $ members , $ names ) ; foreach ( $ members as $ key ) { $ component -> $ key = $ this -> get ( $ key ) ; } }
Inject dependency to component

@param   object  $component
Inject dependency to component