{"id":15296396,"url":"https://github.com/ellisgl/geeklab-arraytranslation","last_synced_at":"2025-03-25T05:43:47.587Z","repository":{"id":37587727,"uuid":"143005330","full_name":"ellisgl/GeekLab-ArrayTranslation","owner":"ellisgl","description":"Convert an array to another data format or convert a data format to an array.","archived":false,"fork":false,"pushed_at":"2023-04-20T19:05:37.000Z","size":181,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"release","last_synced_at":"2025-03-25T05:43:43.632Z","etag":null,"topics":["array","data","format","php","php7-2","php72"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ellisgl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.BSD","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-31T11:29:48.000Z","updated_at":"2022-03-30T13:09:23.000Z","dependencies_parsed_at":"2024-12-02T20:44:04.025Z","dependency_job_id":null,"html_url":"https://github.com/ellisgl/GeekLab-ArrayTranslation","commit_stats":{"total_commits":34,"total_committers":3,"mean_commits":"11.333333333333334","dds":"0.23529411764705888","last_synced_commit":"cd4350f67890453888f1ec3cd85698782a900ab5"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellisgl%2FGeekLab-ArrayTranslation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellisgl%2FGeekLab-ArrayTranslation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellisgl%2FGeekLab-ArrayTranslation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellisgl%2FGeekLab-ArrayTranslation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ellisgl","download_url":"https://codeload.github.com/ellisgl/GeekLab-ArrayTranslation/tar.gz/refs/heads/release","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245407755,"owners_count":20610232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["array","data","format","php","php7-2","php72"],"created_at":"2024-09-30T18:10:21.817Z","updated_at":"2025-03-25T05:43:47.567Z","avatar_url":"https://github.com/ellisgl.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/ellisgl/GeekLab-ArrayTranslation.svg?branch=master)](https://travis-ci.com/ellisgl/GeekLab-ArrayTranslation)\n\n# GeekLab-ArrayTranslation\nConvert an array to another data format or convert a data format to an array.\n\n## Supports:\n* JSON\n* XML\n* PHP internal session serialized data\n* PHP internal binary serialized data\n* PHP Serialized() data\n* YAML\n\n## Todo:\n* WDDX support\n* igbinary support\n\n## Installation:\ncomposer require geeklab/arraytranslation \n\n## Usage:\n    \u003c?php\n    require_once('../vendor/autoload.php');\n    \n    $at  =  \\GeekLab\\ArrayTranslation::create('yaml');\n    $out = $at-\u003eencode(array('a' =\u003e 'x', 'b' =\u003e y', 'c' =\u003e 'z');\n\n## API:\n### \\GeekLab\\ArrayTranslation::create(string $type, string $handler): object\n\n#### Description:\nThis is the factory to return the class for array\u003c-\u003edata type translation.\n\n`$type` can be set to xml, json, yaml, php, php_binary or php_binary for now.\n\n`$handler` is for pointing to a customer handler. Must implement GeekLab\\ArrayTranslation\\TranslationInterface\n#### Usage:\n`$at = \\GeekLab\\ArrayTranslation::create('json');`\n\n### \\GeekLab\\ArrayTranslation::encode(array $arr): string\n\n### Description:\nThis method will convert an array to the type the object was created with.\n\n### Usage:\n`$x = $at-\u003eencode(array('a', 'b', 'c'));`\n\n### \\GeekLab\\ArrayTranslation::encode(string $str): array\n\n### Description:\nThis method will convert a string (data type) to an array.\n\n### Usage:\n`$y = $at-\u003edecode('[\"a\",\"b\",\"c\"]');`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fellisgl%2Fgeeklab-arraytranslation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fellisgl%2Fgeeklab-arraytranslation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fellisgl%2Fgeeklab-arraytranslation/lists"}