{"id":24856687,"url":"https://github.com/secondtruth/php-sapi","last_synced_at":"2025-03-26T15:24:03.746Z","repository":{"id":62541739,"uuid":"308964592","full_name":"secondtruth/php-sapi","owner":"secondtruth","description":"A SAPI Library written in PHP.","archived":false,"fork":false,"pushed_at":"2021-02-10T13:09:57.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-19T20:48:00.772Z","etag":null,"topics":["composer-package","input","io","output","php-library","sapi"],"latest_commit_sha":null,"homepage":"https://www.secondtruth.de","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/secondtruth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"liberapay":"secondtruth","patreon":"secondtruth"}},"created_at":"2020-10-31T20:17:42.000Z","updated_at":"2021-02-10T13:12:21.000Z","dependencies_parsed_at":"2022-11-02T15:33:17.118Z","dependency_job_id":null,"html_url":"https://github.com/secondtruth/php-sapi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secondtruth%2Fphp-sapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secondtruth%2Fphp-sapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secondtruth%2Fphp-sapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secondtruth%2Fphp-sapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/secondtruth","download_url":"https://codeload.github.com/secondtruth/php-sapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245679206,"owners_count":20654790,"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":["composer-package","input","io","output","php-library","sapi"],"created_at":"2025-01-31T16:45:38.621Z","updated_at":"2025-03-26T15:24:03.723Z","avatar_url":"https://github.com/secondtruth.png","language":"PHP","readme":"# PHP SAPI Library\n\n[![Latest Stable](http://img.shields.io/packagist/v/secondtruth/sapi.svg)](https://packagist.org/p/secondtruth/sapi)\n[![Build Status](https://img.shields.io/travis/com/secondtruth/php-sapi.svg)](https://travis-ci.com/github/secondtruth/php-sapi)\n[![Scrutinizer](http://img.shields.io/scrutinizer/g/secondtruth/php-sapi.svg)](https://scrutinizer-ci.com/g/secondtruth/php-sapi)\n[![Coverage](http://img.shields.io/scrutinizer/coverage/g/secondtruth/php-sapi.svg)](https://scrutinizer-ci.com/g/secondtruth/php-sapi)\n[![License](http://img.shields.io/packagist/l/secondtruth/sapi.svg)](https://packagist.org/p/secondtruth/sapi)\n\nA SAPI Library written in PHP.\n\n\n## How to use?\n\n```php\n$argv = ['foo', 'bar', '--baz'];\n$sapi = new CLI($argv);\n\n$input = $sapi-\u003egetInput();\n$input-\u003egetArgs(); // ['foo', 'bar', '--baz']\n$input-\u003egetArgsCount(); // 3\n$input-\u003eread();\n$input-\u003ereadLine();\n$input-\u003ereadAll();\n\n$output = $sapi-\u003egetOutput();\n$output-\u003ewrite('My message...');\n```\n\n\n## Installation\n\n### Install via Composer\n\n[Install Composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos) if you don't already have it present on your system.\n\nTo install the library, run the following command and you will get the latest version:\n\n    $ composer require secondtruth/sapi\n\n\n## Requirements\n\n* You must have at least PHP version 7.4 installed on your system.\n","funding_links":["https://liberapay.com/secondtruth","https://patreon.com/secondtruth"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecondtruth%2Fphp-sapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecondtruth%2Fphp-sapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecondtruth%2Fphp-sapi/lists"}