src/Box/Box.php
protected function _service($name, $definition, $params)
    {
        if ($definition instanceof Closure) {
            $type = 'singleton';
            $definition = call_user_func_array($definition, $params);
            $this->_definitions[$name] = compact('definition', 'type');
        }
        return $definition;
    }
protected function _service($name, $definition, $params)
    {
        if ($definition instanceof Closure) {
            $type = 'singleton';
            $definition = call_user_func_array($definition, $params);
            $this->_definitions[$name] = compact('definition', 'type');
        }
        return $definition;
    }
protected function _service ( $ name , $ definition , $ params ) { if ( $ definition instanceof Closure ) { $ type = 'singleton' ; $ definition = call_user_func_array ( $ definition , $ params ) ; $ this -> _definitions [ $ name ] = compact ( 'definition' , 'type' ) ; } return $ definition ; }
Process a shared definition.

@param  string $name       The name of the definition.
@param  mixed  $definition A definition.
@param  array  $params     Parameters to pass to the definition.
@return mixed
Process a shared definition .