public static function fromObjects($array, $key) {
        $elements = array();
        foreach ($array as $element) {
            $result = call_user_func(array($element, $key));
            $elements = array_merge($elements, is_array($result) ? $result : array($result));
        }
        return new self($elements);
    }