{"id":21451183,"url":"https://github.com/lenra-io/app-lib-php","last_synced_at":"2026-03-04T01:07:02.646Z","repository":{"id":207390355,"uuid":"716198982","full_name":"lenra-io/app-lib-php","owner":"lenra-io","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-21T00:27:06.000Z","size":1439,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T10:44:50.861Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lenra-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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},"funding":{"github":["lenra-io"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-11-08T16:32:08.000Z","updated_at":"2025-02-03T14:05:47.000Z","dependencies_parsed_at":"2025-01-20T09:32:24.357Z","dependency_job_id":"2b85034b-c3fa-4b3b-a2cf-9ae667965481","html_url":"https://github.com/lenra-io/app-lib-php","commit_stats":null,"previous_names":["taorepoara/app-lib-php"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenra-io%2Fapp-lib-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenra-io%2Fapp-lib-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenra-io%2Fapp-lib-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenra-io%2Fapp-lib-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lenra-io","download_url":"https://codeload.github.com/lenra-io/app-lib-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250222538,"owners_count":21394877,"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":[],"created_at":"2024-11-23T04:18:37.343Z","updated_at":"2026-03-04T01:06:57.611Z","avatar_url":"https://github.com/lenra-io.png","language":"PHP","readme":"\u003cdiv id=\"top\"\u003e\u003c/div\u003e\n\u003c!--\n*** This README was created with https://github.com/othneildrew/Best-README-Template\n--\u003e\n\n\n\n\u003c!-- PROJECT SHIELDS --\u003e\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n\n\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n\n\u003ch3 align=\"center\"\u003eApp Lib for PHP based projects\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    This lib integrates all the elements the app needs in order to only keep the views, listeners and resources in the app project.\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/lenra-io/app-lib-php/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/lenra-io/app-lib-php/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\n\nTo incorporate it into your Lenra app project, simply run the following command:\n```console\ncomposer require lenra/app\n```\n\n### Lenra API calls\n\nTo call a Lenra API from a listener, use the `Lenra\\App\\Api` instance provided in the . \n\nYou can then create a document using the data API with the following code:\n```php\nclass CustomType extends \\Lenra\\App\\Data {\n    public string $value;\n    public function __construct(string $value = null) {\n        $this-\u003evalue = $value;\n    }\n}\n\n$myDoc = $request-\u003eapi-\u003edata()-\u003ecoll(CustomType::class)-\u003ecreateDoc(new CustomType(\"Hello world\"))-\u003ewait();\n```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please open an issue with the tag \"enhancement\".\nDon't forget to give the project a star if you liked it! Thanks again!\n\n### Generate components classes\n\nA part of this lib is generated from the [Lenra API](https://github.com/lenra-io/api).\nTo generate the classes, run the following commands:\n\n```bash\n# Load API\nwget https://github.com/lenra-io/api/releases/latest/download/load-api.sh -O - -q | bash\n# generate Models\nphp vendor/bin/jane generate\n# generate builder classes\nphp script/generate-classes.php\n```\n\n### Run unit tests\n\n```bash\n./vendor/bin/phpunit test\n```\n\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the **MIT** License. See [LICENSE](./LICENSE) for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nLenra - [@lenra_dev](https://twitter.com/lenra_dev) - contact@lenra.io\n\nProject Link: [https://github.com/lenra-io/app-lib-php](https://github.com/lenra-io/app-lib-php)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[contributors-shield]: https://img.shields.io/github/contributors/lenra-io/app-lib-php.svg?style=for-the-badge\n[contributors-url]: https://github.com/lenra-io/app-lib-php/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/lenra-io/app-lib-php.svg?style=for-the-badge\n[forks-url]: https://github.com/lenra-io/app-lib-php/network/members\n[stars-shield]: https://img.shields.io/github/stars/lenra-io/app-lib-php.svg?style=for-the-badge\n[stars-url]: https://github.com/lenra-io/app-lib-php/stargazers\n[issues-shield]: https://img.shields.io/github/issues/lenra-io/app-lib-php.svg?style=for-the-badge\n[issues-url]: https://github.com/lenra-io/app-lib-php/issues\n[license-shield]: https://img.shields.io/github/license/lenra-io/app-lib-php.svg?style=for-the-badge\n[license-url]: https://github.com/lenra-io/app-lib-php/blob/master/LICENSE\n","funding_links":["https://github.com/sponsors/lenra-io"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flenra-io%2Fapp-lib-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flenra-io%2Fapp-lib-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flenra-io%2Fapp-lib-php/lists"}