├── .github ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE │ └── config.yml └── workflows │ ├── php-cs-fixer.yml │ ├── psalm.yml │ └── run-tests.yml ├── .gitignore ├── .php_cs.dist.php ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── composer.json ├── examples ├── basic.php ├── casts.php ├── notes-2.xml ├── notes.xml └── transformers.php ├── phpunit.xml.dist ├── psalm.xml.dist ├── src ├── Casts │ ├── Cast.php │ ├── Castable.php │ └── PendingCast.php ├── Data │ ├── XMLCollection.php │ ├── XMLElement.php │ └── XMLObject.php ├── Exceptions │ └── UnknownTransformException.php ├── Exporters │ ├── ArrayExporter.php │ ├── Exporter.php │ └── ViewExporter.php ├── Transformers │ ├── ArrayTransformer.php │ ├── PendingTransform.php │ ├── Transformable.php │ └── Transformer.php ├── XML.php ├── XMLBuilder.php ├── XMLFacade.php ├── XMLImporter.php └── XMLServiceProvider.php └── tests ├── Features ├── Export │ ├── ExportFromDataTest.php │ ├── ExportFromViewTest.php │ ├── __snapshots__ │ │ ├── ExportFromDataTest__test_exports_from_array__1.xml │ │ ├── ExportFromDataTest__test_exports_from_nested_array__1.xml │ │ ├── ExportFromDataTest__test_exports_from_nested_arrays__1.xml │ │ ├── ExportFromDataTest__test_exports_from_nested_string_array__1.xml │ │ ├── ExportFromDataTest__test_exports_from_string_array__1.xml │ │ ├── ExportFromDataTest__test_exports_from_string_array_with_default_root__1.xml │ │ ├── ExportFromViewTest__test_exports_from_view__1.xml │ │ └── ExportFromViewTest__test_exports_from_view_without_root__1.xml │ └── views │ │ ├── files.blade.php │ │ └── no-root.blade.php └── Import │ ├── ArrayTransformerTest.php │ ├── CastTest.php │ ├── SimpleImportTest.php │ ├── __snapshots__ │ ├── ArrayTransformerTest__test_applies_array_correctly__1.json │ ├── ArrayTransformerTest__test_applies_array_correctly_using_alias__1.json │ ├── ArrayTransformerTest__test_applies_array_transform__1.json │ ├── ArrayTransformerTest__test_applies_array_transform_using_alias__1.json │ ├── SimpleImportTest__test_loads_xml__1.json │ ├── SimpleImportTest__test_loads_xml__2.json │ ├── SimpleImportTest__test_loads_xml__3.json │ ├── SimpleImportTest__test_optimize__1.json │ ├── SimpleImportTest__test_optimize__2.json │ ├── SimpleImportTest__test_optimize_camel_case__1.json │ └── SimpleImportTest__test_optimize_camel_case__2.json │ ├── example │ ├── Note.php │ └── Plant.php │ └── stubs │ ├── attributes.xml │ ├── invalid.xml │ ├── notes-2.xml │ ├── notes.xml │ ├── plants.xml │ └── simple.xml ├── TestCase.php └── Unit ├── XMLBuilderTest.php ├── XMLImportTest.php └── __snapshots__ ├── XMLBuilderTest__test_can_disable_item_name_generation__1.xml ├── XMLBuilderTest__test_can_set_encoding__1.xml ├── XMLBuilderTest__test_can_set_item_name__1.xml ├── XMLBuilderTest__test_can_set_root_using_dynamic__1.xml ├── XMLBuilderTest__test_can_set_root_using_setter__1.xml ├── XMLBuilderTest__test_generates_item_name__1.xml └── XMLImportTest__test_can_import_xml__1.json /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/.github/CONTRIBUTING.md -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/.github/ISSUE_TEMPLATE/config.yml -------------------------------------------------------------------------------- /.github/workflows/php-cs-fixer.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/.github/workflows/php-cs-fixer.yml -------------------------------------------------------------------------------- /.github/workflows/psalm.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/.github/workflows/psalm.yml -------------------------------------------------------------------------------- /.github/workflows/run-tests.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/.github/workflows/run-tests.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/.gitignore -------------------------------------------------------------------------------- /.php_cs.dist.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/.php_cs.dist.php -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/LICENSE.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/README.md -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/composer.json -------------------------------------------------------------------------------- /examples/basic.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/examples/basic.php -------------------------------------------------------------------------------- /examples/casts.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/examples/casts.php -------------------------------------------------------------------------------- /examples/notes-2.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/examples/notes-2.xml -------------------------------------------------------------------------------- /examples/notes.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/examples/notes.xml -------------------------------------------------------------------------------- /examples/transformers.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/examples/transformers.php -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/phpunit.xml.dist -------------------------------------------------------------------------------- /psalm.xml.dist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/psalm.xml.dist -------------------------------------------------------------------------------- /src/Casts/Cast.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/src/Casts/Cast.php -------------------------------------------------------------------------------- /src/Casts/Castable.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/src/Casts/Castable.php -------------------------------------------------------------------------------- /src/Casts/PendingCast.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/src/Casts/PendingCast.php -------------------------------------------------------------------------------- /src/Data/XMLCollection.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/src/Data/XMLCollection.php -------------------------------------------------------------------------------- /src/Data/XMLElement.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/src/Data/XMLElement.php -------------------------------------------------------------------------------- /src/Data/XMLObject.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/src/Data/XMLObject.php -------------------------------------------------------------------------------- /src/Exceptions/UnknownTransformException.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/src/Exceptions/UnknownTransformException.php -------------------------------------------------------------------------------- /src/Exporters/ArrayExporter.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/src/Exporters/ArrayExporter.php -------------------------------------------------------------------------------- /src/Exporters/Exporter.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/src/Exporters/Exporter.php -------------------------------------------------------------------------------- /src/Exporters/ViewExporter.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/src/Exporters/ViewExporter.php -------------------------------------------------------------------------------- /src/Transformers/ArrayTransformer.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/src/Transformers/ArrayTransformer.php -------------------------------------------------------------------------------- /src/Transformers/PendingTransform.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/src/Transformers/PendingTransform.php -------------------------------------------------------------------------------- /src/Transformers/Transformable.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/src/Transformers/Transformable.php -------------------------------------------------------------------------------- /src/Transformers/Transformer.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/src/Transformers/Transformer.php -------------------------------------------------------------------------------- /src/XML.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/src/XML.php -------------------------------------------------------------------------------- /src/XMLBuilder.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/src/XMLBuilder.php -------------------------------------------------------------------------------- /src/XMLFacade.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/src/XMLFacade.php -------------------------------------------------------------------------------- /src/XMLImporter.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/src/XMLImporter.php -------------------------------------------------------------------------------- /src/XMLServiceProvider.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/src/XMLServiceProvider.php -------------------------------------------------------------------------------- /tests/Features/Export/ExportFromDataTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Export/ExportFromDataTest.php -------------------------------------------------------------------------------- /tests/Features/Export/ExportFromViewTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Export/ExportFromViewTest.php -------------------------------------------------------------------------------- /tests/Features/Export/__snapshots__/ExportFromDataTest__test_exports_from_array__1.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Export/__snapshots__/ExportFromDataTest__test_exports_from_array__1.xml -------------------------------------------------------------------------------- /tests/Features/Export/__snapshots__/ExportFromDataTest__test_exports_from_nested_array__1.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Export/__snapshots__/ExportFromDataTest__test_exports_from_nested_array__1.xml -------------------------------------------------------------------------------- /tests/Features/Export/__snapshots__/ExportFromDataTest__test_exports_from_nested_arrays__1.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Export/__snapshots__/ExportFromDataTest__test_exports_from_nested_arrays__1.xml -------------------------------------------------------------------------------- /tests/Features/Export/__snapshots__/ExportFromDataTest__test_exports_from_nested_string_array__1.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Export/__snapshots__/ExportFromDataTest__test_exports_from_nested_string_array__1.xml -------------------------------------------------------------------------------- /tests/Features/Export/__snapshots__/ExportFromDataTest__test_exports_from_string_array__1.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Export/__snapshots__/ExportFromDataTest__test_exports_from_string_array__1.xml -------------------------------------------------------------------------------- /tests/Features/Export/__snapshots__/ExportFromDataTest__test_exports_from_string_array_with_default_root__1.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Export/__snapshots__/ExportFromDataTest__test_exports_from_string_array_with_default_root__1.xml -------------------------------------------------------------------------------- /tests/Features/Export/__snapshots__/ExportFromViewTest__test_exports_from_view__1.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Export/__snapshots__/ExportFromViewTest__test_exports_from_view__1.xml -------------------------------------------------------------------------------- /tests/Features/Export/__snapshots__/ExportFromViewTest__test_exports_from_view_without_root__1.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Export/__snapshots__/ExportFromViewTest__test_exports_from_view_without_root__1.xml -------------------------------------------------------------------------------- /tests/Features/Export/views/files.blade.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Export/views/files.blade.php -------------------------------------------------------------------------------- /tests/Features/Export/views/no-root.blade.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Export/views/no-root.blade.php -------------------------------------------------------------------------------- /tests/Features/Import/ArrayTransformerTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/ArrayTransformerTest.php -------------------------------------------------------------------------------- /tests/Features/Import/CastTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/CastTest.php -------------------------------------------------------------------------------- /tests/Features/Import/SimpleImportTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/SimpleImportTest.php -------------------------------------------------------------------------------- /tests/Features/Import/__snapshots__/ArrayTransformerTest__test_applies_array_correctly__1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/__snapshots__/ArrayTransformerTest__test_applies_array_correctly__1.json -------------------------------------------------------------------------------- /tests/Features/Import/__snapshots__/ArrayTransformerTest__test_applies_array_correctly_using_alias__1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/__snapshots__/ArrayTransformerTest__test_applies_array_correctly_using_alias__1.json -------------------------------------------------------------------------------- /tests/Features/Import/__snapshots__/ArrayTransformerTest__test_applies_array_transform__1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/__snapshots__/ArrayTransformerTest__test_applies_array_transform__1.json -------------------------------------------------------------------------------- /tests/Features/Import/__snapshots__/ArrayTransformerTest__test_applies_array_transform_using_alias__1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/__snapshots__/ArrayTransformerTest__test_applies_array_transform_using_alias__1.json -------------------------------------------------------------------------------- /tests/Features/Import/__snapshots__/SimpleImportTest__test_loads_xml__1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/__snapshots__/SimpleImportTest__test_loads_xml__1.json -------------------------------------------------------------------------------- /tests/Features/Import/__snapshots__/SimpleImportTest__test_loads_xml__2.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/__snapshots__/SimpleImportTest__test_loads_xml__2.json -------------------------------------------------------------------------------- /tests/Features/Import/__snapshots__/SimpleImportTest__test_loads_xml__3.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/__snapshots__/SimpleImportTest__test_loads_xml__3.json -------------------------------------------------------------------------------- /tests/Features/Import/__snapshots__/SimpleImportTest__test_optimize__1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/__snapshots__/SimpleImportTest__test_optimize__1.json -------------------------------------------------------------------------------- /tests/Features/Import/__snapshots__/SimpleImportTest__test_optimize__2.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/__snapshots__/SimpleImportTest__test_optimize__2.json -------------------------------------------------------------------------------- /tests/Features/Import/__snapshots__/SimpleImportTest__test_optimize_camel_case__1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/__snapshots__/SimpleImportTest__test_optimize_camel_case__1.json -------------------------------------------------------------------------------- /tests/Features/Import/__snapshots__/SimpleImportTest__test_optimize_camel_case__2.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/__snapshots__/SimpleImportTest__test_optimize_camel_case__2.json -------------------------------------------------------------------------------- /tests/Features/Import/example/Note.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/example/Note.php -------------------------------------------------------------------------------- /tests/Features/Import/example/Plant.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/example/Plant.php -------------------------------------------------------------------------------- /tests/Features/Import/stubs/attributes.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/stubs/attributes.xml -------------------------------------------------------------------------------- /tests/Features/Import/stubs/invalid.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/stubs/invalid.xml -------------------------------------------------------------------------------- /tests/Features/Import/stubs/notes-2.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/stubs/notes-2.xml -------------------------------------------------------------------------------- /tests/Features/Import/stubs/notes.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/stubs/notes.xml -------------------------------------------------------------------------------- /tests/Features/Import/stubs/plants.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/stubs/plants.xml -------------------------------------------------------------------------------- /tests/Features/Import/stubs/simple.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Features/Import/stubs/simple.xml -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/TestCase.php -------------------------------------------------------------------------------- /tests/Unit/XMLBuilderTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Unit/XMLBuilderTest.php -------------------------------------------------------------------------------- /tests/Unit/XMLImportTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Unit/XMLImportTest.php -------------------------------------------------------------------------------- /tests/Unit/__snapshots__/XMLBuilderTest__test_can_disable_item_name_generation__1.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Unit/__snapshots__/XMLBuilderTest__test_can_disable_item_name_generation__1.xml -------------------------------------------------------------------------------- /tests/Unit/__snapshots__/XMLBuilderTest__test_can_set_encoding__1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/Unit/__snapshots__/XMLBuilderTest__test_can_set_item_name__1.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Unit/__snapshots__/XMLBuilderTest__test_can_set_item_name__1.xml -------------------------------------------------------------------------------- /tests/Unit/__snapshots__/XMLBuilderTest__test_can_set_root_using_dynamic__1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/Unit/__snapshots__/XMLBuilderTest__test_can_set_root_using_setter__1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/Unit/__snapshots__/XMLBuilderTest__test_generates_item_name__1.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Unit/__snapshots__/XMLBuilderTest__test_generates_item_name__1.xml -------------------------------------------------------------------------------- /tests/Unit/__snapshots__/XMLImportTest__test_can_import_xml__1.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowgistics/laravel-xml/HEAD/tests/Unit/__snapshots__/XMLImportTest__test_can_import_xml__1.json --------------------------------------------------------------------------------