private
    static function objectify(
        array $array
    ) {
        foreach ($array as &$item) {
            if (is_array($item)) {
                $item = self::objectify($item);
            }
        }

        return (object)$array;
    }
private
    static function objectify(
        array $array
    ) {
        foreach ($array as &$item) {
            if (is_array($item)) {
                $item = self::objectify($item);
            }
        }

        return (object)$array;
    }
private static function objectify ( array $ array ) { foreach ( $ array as & $ item ) { if ( is_array ( $ item ) ) { $ item = self :: objectify ( $ item ) ; } } return ( object ) $ array ; }
Converts an array to an object recursively.
@param array $array the array to convert
@return object the converted array
Converts an array to an object recursively .