public function resolve( $abstract, array $parameters = [] ) {

		// Get the true abstract name.
		$abstract = $this->getAbstract( $abstract );

		// If this is being managed as an instance and we already have
		// the instance, return it now.
		if ( isset( $this->instances[ $abstract ] ) ) {

			return $this->instances[ $abstract ];
		}

		// Get the concrete implementation.
		$concrete = $this->getConcrete( $abstract );

		// If we can't build an object, assume we should return the value.
		if ( ! $this->isBuildable( $concrete ) ) {

			// If we don't actually have this, return false.
			if ( ! $this->has( $abstract ) ) {
				return false;
			}

			return $concrete;
		}

		// Build the object.
		$object = $this->build( $concrete, $parameters );

		if ( ! $this->has( $abstract ) ) {
			return $object;
		}

		// If shared instance, make sure to store it in the instances
		// array so that we're not creating new objects later.
		if ( $this->bindings[ $abstract ]['shared'] && ! isset( $this->instances[ $abstract ] ) ) {

			$this->instances[ $abstract ] = $object;
		}

		// Run through each of the extensions for the object.
		foreach ( $this->extensions[ $abstract ] as $extension ) {

			$object = new $extension( $object, $this );
		}

		// Return the object.
		return $object;
	}
public function resolve( $abstract, array $parameters = [] ) {

		// Get the true abstract name.
		$abstract = $this->getAbstract( $abstract );

		// If this is being managed as an instance and we already have
		// the instance, return it now.
		if ( isset( $this->instances[ $abstract ] ) ) {

			return $this->instances[ $abstract ];
		}

		// Get the concrete implementation.
		$concrete = $this->getConcrete( $abstract );

		// If we can't build an object, assume we should return the value.
		if ( ! $this->isBuildable( $concrete ) ) {

			// If we don't actually have this, return false.
			if ( ! $this->has( $abstract ) ) {
				return false;
			}

			return $concrete;
		}

		// Build the object.
		$object = $this->build( $concrete, $parameters );

		if ( ! $this->has( $abstract ) ) {
			return $object;
		}

		// If shared instance, make sure to store it in the instances
		// array so that we're not creating new objects later.
		if ( $this->bindings[ $abstract ]['shared'] && ! isset( $this->instances[ $abstract ] ) ) {

			$this->instances[ $abstract ] = $object;
		}

		// Run through each of the extensions for the object.
		foreach ( $this->extensions[ $abstract ] as $extension ) {

			$object = new $extension( $object, $this );
		}

		// Return the object.
		return $object;
	}
public function resolve ( $ abstract , array $ parameters = [ ] ) { // Get the true abstract name. $ abstract = $ this -> getAbstract ( $ abstract ) ; // If this is being managed as an instance and we already have // the instance, return it now. if ( isset ( $ this -> instances [ $ abstract ] ) ) { return $ this -> instances [ $ abstract ] ; } // Get the concrete implementation. $ concrete = $ this -> getConcrete ( $ abstract ) ; // If we can't build an object, assume we should return the value. if ( ! $ this -> isBuildable ( $ concrete ) ) { // If we don't actually have this, return false. if ( ! $ this -> has ( $ abstract ) ) { return false ; } return $ concrete ; } // Build the object. $ object = $ this -> build ( $ concrete , $ parameters ) ; if ( ! $ this -> has ( $ abstract ) ) { return $ object ; } // If shared instance, make sure to store it in the instances // array so that we're not creating new objects later. if ( $ this -> bindings [ $ abstract ] [ 'shared' ] && ! isset ( $ this -> instances [ $ abstract ] ) ) { $ this -> instances [ $ abstract ] = $ object ; } // Run through each of the extensions for the object. foreach ( $ this -> extensions [ $ abstract ] as $ extension ) { $ object = new $ extension ( $ object , $ this ) ; } // Return the object. return $ object ; }
Resolve and return the binding.

@since  5.0.0
@access public
@param  string  $abstract
@param  array   $parameters
@return mixed
Resolve and return the binding .