{"id":19966440,"url":"https://github.com/andersao/php-fiql-parser","last_synced_at":"2025-10-04T16:47:50.824Z","repository":{"id":57044522,"uuid":"414434595","full_name":"andersao/php-fiql-parser","owner":"andersao","description":"PHP FIQL Parser","archived":false,"fork":false,"pushed_at":"2021-10-14T03:41:54.000Z","size":83,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-12T05:21:12.561Z","etag":null,"topics":["fiql","fiql-parser","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andersao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-07T02:19:14.000Z","updated_at":"2023-11-11T02:36:53.000Z","dependencies_parsed_at":"2022-08-24T03:40:10.148Z","dependency_job_id":null,"html_url":"https://github.com/andersao/php-fiql-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andersao/php-fiql-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersao%2Fphp-fiql-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersao%2Fphp-fiql-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersao%2Fphp-fiql-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersao%2Fphp-fiql-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andersao","download_url":"https://codeload.github.com/andersao/php-fiql-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersao%2Fphp-fiql-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278343073,"owners_count":25971399,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["fiql","fiql-parser","php"],"created_at":"2024-11-13T02:35:53.221Z","updated_at":"2025-10-04T16:47:50.795Z","avatar_url":"https://github.com/andersao.png","language":"PHP","readme":"## FIQL Parser\n\n[![Latest Stable Version](http://poser.pugx.org/prettus/php-fiql-parser/v)](https://packagist.org/packages/prettus/php-fiql-parser)\n[![Total Downloads](http://poser.pugx.org/prettus/php-fiql-parser/downloads)](https://packagist.org/packages/prettus/php-fiql-parser)\n[![License](http://poser.pugx.org/prettus/php-fiql-parser/license)](https://packagist.org/packages/prettus/php-fiql-parser)\n[![PHP Version Require](http://poser.pugx.org/prettus/php-fiql-parser/require/php)](https://packagist.org/packages/prettus/php-fiql-parser)\n[![Maintainability](https://api.codeclimate.com/v1/badges/e4204205a1e289b03f18/maintainability)](https://codeclimate.com/github/andersao/php-fiql-parser/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/e4204205a1e289b03f18/test_coverage)](https://codeclimate.com/github/andersao/php-fiql-parser/test_coverage)\n\nA PHP parser for the Feed Item Query\nLanguage ([FIQL](https://datatracker.ietf.org/doc/html/draft-nottingham-atompub-fiql-00)).\n\n## Installation\n\n```bash\ncomposer require prettus/php-fiql-parser\n```\n\n## Using Parser\n\n```php\nuse \\Prettus\\FIQLParser\\Parser;\nuse \\Prettus\\FIQLParser\\Expression;\nuse \\Prettus\\FIQLParser\\Exceptions\\FiqlException;\n\n$expression = Parser::fromString('last_name==foo*,(age=lt=55;age=gt=5)');\n\nprint_r($expression-\u003etoArray());\nprint_r($expression-\u003etoJson());\n\n/**\n * Output of toJson()\n *\n * {\"or\":[[\"last_name\",\"==\",\"foo*\"],{\"and\":[[\"age\",\"\u003c\",\"55\"],[\"age\",\"\u003e\",\"5\"]]}]}\n */\n\n/**\n * Output of toArray()\n *\n * [\n *     'or' =\u003e [\n *         ['last_name', '==', 'foo*'],\n *         [\n *             'and' =\u003e [\n *                 ['age', '\u003c', 55],\n *                 ['age', '\u003e', 5],\n *             ]\n *         ]\n *     ]\n * ]\n * /\n```\n\n## Using Builder\n\n```php\nuse \\Prettus\\FIQLParser\\Expression;\nuse \\Prettus\\FIQLParser\\Constraint;\nuse \\Prettus\\FIQLParser\\Operator;\nuse \\Prettus\\FIQLParser\\Exceptions\\FiqlException;\n\n$expression = new Expression();\n$expression-\u003eaddElement(new Constraint('last_name', '==', 'foo*'));\n$expression-\u003eaddElement(new Operator(','));\n\n$subExpression = new Expression();\n$subExpression-\u003eaddElement(new Constraint('age', '=lt=', '55'));\n$subExpression-\u003eaddElement(new Operator(';'));\n$subExpression-\u003eaddElement(new Constraint('age', '=gt=', '5'));\n\n$expression-\u003eaddElement($subExpression);\n\nprint_r(strval($expression));\n// last_name==foo*,age=lt=55;age=gt=5\n```\n\n## Credits\n\nThis project is completely inspired by python [fiql-parser](https://github.com/sergedomk/fiql_parser)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandersao%2Fphp-fiql-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandersao%2Fphp-fiql-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandersao%2Fphp-fiql-parser/lists"}