lib/Promise.php
public function fulfill($value = null)
    {
        if (self::PENDING !== $this->state) {
            throw new PromiseAlreadyResolvedException('This promise is already resolved, and you\'re not allowed to resolve a promise more than once');
        }
        $this->state = self::FULFILLED;
        $this->value = $value;
        foreach ($this->subscribers as $subscriber) {
            $this->invokeCallback($subscriber[0], $subscriber[1]);
        }
    }
public function fulfill($value = null)
    {
        if (self::PENDING !== $this->state) {
            throw new PromiseAlreadyResolvedException('This promise is already resolved, and you\'re not allowed to resolve a promise more than once');
        }
        $this->state = self::FULFILLED;
        $this->value = $value;
        foreach ($this->subscribers as $subscriber) {
            $this->invokeCallback($subscriber[0], $subscriber[1]);
        }
    }
public function fulfill ( $ value = null ) { if ( self :: PENDING !== $ this -> state ) { throw new PromiseAlreadyResolvedException ( 'This promise is already resolved, and you\'re not allowed to resolve a promise more than once' ) ; } $ this -> state = self :: FULFILLED ; $ this -> value = $ value ; foreach ( $ this -> subscribers as $ subscriber ) { $ this -> invokeCallback ( $ subscriber [ 0 ] , $ subscriber [ 1 ] ) ; } }
Marks this promise as fulfilled and sets its return value.

@param mixed $value
Marks this promise as fulfilled and sets its return value .