{"id":33978441,"url":"https://github.com/phootwork/phootwork","last_synced_at":"2025-12-13T02:50:58.086Z","repository":{"id":44589429,"uuid":"200265769","full_name":"phootwork/phootwork","owner":"phootwork","description":"The phootwork php library fills gaps in the php language and provides better solutions than the existing ones php offers.","archived":false,"fork":false,"pushed_at":"2024-10-03T15:48:13.000Z","size":482,"stargazers_count":5,"open_issues_count":13,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-03T06:17:34.159Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://phootwork.github.io/","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/phootwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-02T16:25:37.000Z","updated_at":"2024-10-03T13:43:24.000Z","dependencies_parsed_at":"2022-09-22T14:24:56.749Z","dependency_job_id":null,"html_url":"https://github.com/phootwork/phootwork","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/phootwork/phootwork","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phootwork%2Fphootwork","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phootwork%2Fphootwork/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phootwork%2Fphootwork/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phootwork%2Fphootwork/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phootwork","download_url":"https://codeload.github.com/phootwork/phootwork/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phootwork%2Fphootwork/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27699038,"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-12-13T02:00:09.769Z","response_time":147,"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":[],"created_at":"2025-12-13T02:50:57.504Z","updated_at":"2025-12-13T02:50:58.079Z","avatar_url":"https://github.com/phootwork.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phootwork library\n\n![Tests](https://github.com/phootwork/phootwork/workflows/Tests/badge.svg)\n![Coverage report](https://github.com/phootwork/phootwork/workflows/Coverage/badge.svg)\n![Build Api Documentation](https://github.com/phootwork/phootwork/workflows/Build%20Api%20Documentation/badge.svg)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/phootwork/phootwork/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/phootwork/phootwork/?branch=master)\n[![Code Coverage](https://scrutinizer-ci.com/g/phootwork/phootwork/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/phootwork/phootwork/?branch=master)\n[![Maintainability](https://api.codeclimate.com/v1/badges/a873cc250773621aa74b/maintainability)](https://codeclimate.com/github/phootwork/phootwork/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/a873cc250773621aa74b/test_coverage)](https://codeclimate.com/github/phootwork/phootwork/test_coverage)\n[![License](https://img.shields.io/github/license/phootwork/phootwork.svg?style=flat-square)](https://packagist.org/packages/phootwork/phootwork)\n\nPhootwork is a collection of php libraries which fill gaps in the php language and provides consistent object oriented solutions\nwhere the language natively offers only functions.\n\nThe phootwork package includes:\n\n- [collection](https://github.com/phootwork/collection) a library to model several flavours of collections\n- [file](https://github.com/phootwork/file) an object oriented library to manipulate filesystems elements (*stream compatible*)\n- [json](https://github.com/phootwork/json) a json library, with clean syntax and proper error handling\n- [lang](https://github.com/phootwork/lang) a library to manipulate arrays and strings in an object oriented way\n- [tokenizer](https://github.com/phootwork/tokenizer) an easy to use tokenizer library for PHP code\n- [xml](https://github.com/phootwork/xml) an object oriented xml utility library\n\n## Installation\n\nWe use [composer](https://getcomposer.org) as dependency manager and distribution system. To install the library run:\n\n```bash\ncomposer require phootwork/phootwork\n```\n\nEach single package can be installed separately. I.e. if you want to include in your project the `collection` library only:\n\n```bash\ncomposer require phootwork/collection\n```\n\n\u003e **Note**: the single library packages does not ship with tests and --dev dependencies. If you want to run the test suite or\n\u003e contribute to the library, you have to install the whole `phootwork/phootwork` package.\n\n## A Little Taste\n\nThe following examples show what you can find in this library. You can discover much, much more by reading the documentation\nand the api.\n\n### A Little Taste of *lang* Library (`phootwork\\lang\\Text` class);\n\n```php\n\u003c?php declare(strict_types=1);\n/**\n * Example describing how to manipulate a string via the Text class\n * and its nice fluent api.\n */\nuse phootwork\\lang\\Text;\n\n$text = new Text('a beautiful string');\n\n// Remove the substring 'a ' and capitalize. Note: Text objects are *immutable*, \n// so you should assign the result to a variable\n$text = $text-\u003eslice(2)-\u003etoCapitalCase(); // 'Beautiful string'\n\n// Capitalize each word and add an 's' character at the end of the string\n$text = $text-\u003etoCapitalCaseWords()-\u003eappend('s'); // 'Beautiful Strings'\n\n// Calculate the length of the string\n$length = $text-\u003elength(); // 17\n\n// Check if the string ends with the 'ngs' substring\n$text-\u003eendsWith('ngs'); // true\n```\n### A Little Taste of *collection* Library (`phootwork\\collection\\Stack` class)\n\n```php\n\u003c?php declare(strict_types=1);\n/**\n * Example describing how to manipulate a Stack collection (Last In First Out)\n * via the Stack class\n */\nuse phootwork\\collection\\Stack;\n\n$stack = new Stack(['Obiwan', 'Luke', 'Yoda', 'Leila']);\n\n// Sort the stack\n$stack = $stack-\u003esort(); // ['Leila', 'Luke', 'Obiwan', 'Yoda']\n\n// Check if the collection contains any elements\n$stack-\u003eisEmpty();  // false\n\n// How many elements?\n$stack-\u003esize(); // 4\n\n// Push an elememt\n$stack-\u003epush('Chewbecca');\n\n// How many elements now?\n$stack-\u003esize(); // 5\n\n// Peek the head element (return the head element, without removing it)\n$stack-\u003epeek(); // 'Chewbecca'\n$stack-\u003esize(); // 5\n\n// Pop the head element\n$stack-\u003epop(); // 'Chewbecca'\n$stack-\u003esize(); // 4: pop() removes the popped element\n```\n\n## Documentation\n\nThe official documentation site: [https://phootwork.github.io](https://phootwork.github.io)\n\n## Running Tests\n\nIn order to run the test suite, download the full library:\n\n```\ngit clone https://github.com/phootwork/phootwork\n```\nThen install the dependencies via composer:\n\n```\ncomposer install\n```\nand run:\n\n```\ncomposer test\n```\nOur `test` script calls the `vendor/bin/phpunit` command under the hood, so you can pass to it all the phpunit options,\nvia `--` operator i.e.: `composer test -- --stop-on-failure`.\n\nEach library has its own test suite and you can run it separately. I.e. suppose you want to run the collection library\ntest suite:\n\n```\ncomposer test -- --testsuite collection\n```\nor alternatively:\n```\nvendor/bin/phpunit --testsuite collection\n```\n\nPhootwork also provides a command to generate a code coverage report in html format, into the `coverage/` directory:\n```\ncomposer coverage\n```\n\n## Contact\n\nReport issues at the github [Issue Tracker](https://github.com/phootwork/phootwork/issues).\n\n\n## Contributing\n\nEvery contribute is welcome, whether it is a simple typo or a new modern complicated feature. We are very grateful to all\nthe people who will dedicate their precious time to this library!\n\nYou can find all information about it in the [CONTRIBUTING.md](CONTRIBUTING.md) document.\n\n\n## Changelog\n\nRefer to [Releases](https://github.com/phootwork/phootwork/releases)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphootwork%2Fphootwork","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphootwork%2Fphootwork","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphootwork%2Fphootwork/lists"}