src/Internal/YieldableUtils.php
public static function getApplier($yielded, array $yieldables, callable $next = null)
    {
        return function (array $results) use ($yielded, $yieldables, $next) {
            foreach ($results as $hash => $resolved) {
                $current = &$yielded;
                foreach ($yieldables[$hash]['keylist'] as $key) {
                    $current = &$current[$key];
                }
                $current = $resolved;
                unset($current);
            }
            return $next ? $next($yielded) : $yielded;
        };
    }
public static function getApplier($yielded, array $yieldables, callable $next = null)
    {
        return function (array $results) use ($yielded, $yieldables, $next) {
            foreach ($results as $hash => $resolved) {
                $current = &$yielded;
                foreach ($yieldables[$hash]['keylist'] as $key) {
                    $current = &$current[$key];
                }
                $current = $resolved;
                unset($current);
            }
            return $next ? $next($yielded) : $yielded;
        };
    }
public static function getApplier ( $ yielded , array $ yieldables , callable $ next = null ) { return function ( array $ results ) use ( $ yielded , $ yieldables , $ next ) { foreach ( $ results as $ hash => $ resolved ) { $ current = & $ yielded ; foreach ( $ yieldables [ $ hash ] [ 'keylist' ] as $ key ) { $ current = & $ current [ $ key ] ; } $ current = $ resolved ; unset ( $ current ) ; } return $ next ? $ next ( $ yielded ) : $ yielded ; } ; }
Return function that apply changes in yieldables.
@param  mixed         $yielded
@param  array         $yieldables
@param  callable|null $next
@return mixed
Return function that apply changes in yieldables .