public static function toObjectArray(array $items, $class, UserContext $context)
    {
        return array_combine($items, array_map(function ($item) use ($class, $context) {
            return new $class($item, $context);
        }, $items));
    }
public static function toObjectArray(array $items, $class, UserContext $context)
    {
        return array_combine($items, array_map(function ($item) use ($class, $context) {
            return new $class($item, $context);
        }, $items));
    }
public static function toObjectArray ( array $ items , $ class , UserContext $ context ) { return array_combine ( $ items , array_map ( function ( $ item ) use ( $ class , $ context ) { return new $ class ( $ item , $ context ) ; } , $ items ) ) ; }
Converts an array of string items to an associative array of objects of the specified type.

@param array $items
@param string $class
@param UserContext $context
@return array
Converts an array of string items to an associative array of objects of the specified type .