src/Raikiri/Container.php
public function register($name, $component)
    {
        // Closure
        if ($component instanceof \Closure) {
            $component = new ComponentDefine($component);
        }

        if ($component instanceof ComponentDefine) {
            $component->setContainer($this);
        }
        elseif (method_exists($component, 'raikiri') && ! $component instanceof ProphecySubjectInterface) {
            $component->setContainer($this);
        }

        $this->components[$name] = $component;
    }
public function register($name, $component)
    {
        // Closure
        if ($component instanceof \Closure) {
            $component = new ComponentDefine($component);
        }

        if ($component instanceof ComponentDefine) {
            $component->setContainer($this);
        }
        elseif (method_exists($component, 'raikiri') && ! $component instanceof ProphecySubjectInterface) {
            $component->setContainer($this);
        }

        $this->components[$name] = $component;
    }
public function register ( $ name , $ component ) { // Closure if ( $ component instanceof \ Closure ) { $ component = new ComponentDefine ( $ component ) ; } if ( $ component instanceof ComponentDefine ) { $ component -> setContainer ( $ this ) ; } elseif ( method_exists ( $ component , 'raikiri' ) && ! $ component instanceof ProphecySubjectInterface ) { $ component -> setContainer ( $ this ) ; } $ this -> components [ $ name ] = $ component ; }
register component to container.

@param   string  $name
@param   object  $component
register component to container .