The resolve function resolves a given class or interface name to an instance using the service container:
<?php $api = resolve('HelpSpot\API');
<?php     }



    if (!$generator instanceof \Generator) {

        return resolve($generator);

    }



    $promise = null;
<?php     public function testCoroutineReturnsFulfilledPromiseIfFunctionReturnsAfterYieldingPromise()

    {

        $promise = coroutine(function () {

            $value = yield resolve(42);

            return $value;

        });
<?php     public function testCoroutineReturnsRejectedPromiseIfFunctionThrowsAfterYieldingPromise()

    {

        $promise = coroutine(function () {

            $reason = yield resolve('Foo');

            throw new \RuntimeException($reason);

        });