Foundation/Core.php
public function make($name, array $params = array(), $force = false)
    {
        if (isset($this->_ioc[$name])) {

            // If a singleton instance exists, return it
            if ($this->_ioc[$name]['instance'] && !$force)
                return $this->_ioc[$name]['instance'];

            // Include an instance of this object as the final argument
            $params[] = $this;

            // Call the stored container
            $result = call_user_func_array($this->_ioc[$name]['closure'], $params);

            // If this is supposed to be a singleton, store it
            if ($this->_ioc[$name]['singleton'])
                $this->_ioc[$name]['instance'] = $result;

            return $result;
        }

        return null;
    }
public function make($name, array $params = array(), $force = false)
    {
        if (isset($this->_ioc[$name])) {

            // If a singleton instance exists, return it
            if ($this->_ioc[$name]['instance'] && !$force)
                return $this->_ioc[$name]['instance'];

            // Include an instance of this object as the final argument
            $params[] = $this;

            // Call the stored container
            $result = call_user_func_array($this->_ioc[$name]['closure'], $params);

            // If this is supposed to be a singleton, store it
            if ($this->_ioc[$name]['singleton'])
                $this->_ioc[$name]['instance'] = $result;

            return $result;
        }

        return null;
    }
public function make ( $ name , array $ params = array ( ) , $ force = false ) { if ( isset ( $ this -> _ioc [ $ name ] ) ) { // If a singleton instance exists, return it if ( $ this -> _ioc [ $ name ] [ 'instance' ] && ! $ force ) return $ this -> _ioc [ $ name ] [ 'instance' ] ; // Include an instance of this object as the final argument $ params [ ] = $ this ; // Call the stored container $ result = call_user_func_array ( $ this -> _ioc [ $ name ] [ 'closure' ] , $ params ) ; // If this is supposed to be a singleton, store it if ( $ this -> _ioc [ $ name ] [ 'singleton' ] ) $ this -> _ioc [ $ name ] [ 'instance' ] = $ result ; return $ result ; } return null ; }
Resolves a set container and returns the result.

@param string $name
@param array $params
@param bool $force
@return object|null
Resolves a set container and returns the result .