{"id":22446948,"url":"https://github.com/cloudcreativity/utils-collection","last_synced_at":"2025-03-27T11:23:15.393Z","repository":{"id":56954128,"uuid":"56723204","full_name":"cloudcreativity/utils-collection","owner":"cloudcreativity","description":"Our standard class for handling lists in PHP.","archived":false,"fork":false,"pushed_at":"2019-02-16T13:48:49.000Z","size":66,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-02-01T15:46:06.304Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudcreativity.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-20T21:47:52.000Z","updated_at":"2019-02-16T13:48:45.000Z","dependencies_parsed_at":"2022-08-21T08:50:19.691Z","dependency_job_id":null,"html_url":"https://github.com/cloudcreativity/utils-collection","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudcreativity%2Futils-collection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudcreativity%2Futils-collection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudcreativity%2Futils-collection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudcreativity%2Futils-collection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudcreativity","download_url":"https://codeload.github.com/cloudcreativity/utils-collection/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245833232,"owners_count":20679811,"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-12-06T04:13:09.670Z","updated_at":"2025-03-27T11:23:15.367Z","avatar_url":"https://github.com/cloudcreativity.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/cloudcreativity/utils-collection.svg?branch=master)](https://travis-ci.org/cloudcreativity/utils-collection)\n\n# cloudcreativity/utils-collection\n\nOur standard collection class for handling lists in PHP. By lists, we mean\nnumerically indexed arrays.\n\nThis package also contains our `StandardIteratorInterface`. We use this if we\nare writing specific collection classes that hold only particular types of\nobjects.\n\n## License\n\nApache License (Version 2.0). Please see [License File](LICENSE) for more information.\n\n## Contributing\n\nFile an issue, or ideally submit a pull request. Bug fixes should be submitted against the `master` branch,\nnew features/changes should be submitted against the `develop` branch. Pull requests should have updated or new\nunit tests in them.\n\nMake sure your IDE has an [EditorConfig](http://editorconfig.org) plugin installed.\n\n## Testing\n\nClone the repository, then:\n\n``` bash\ncomposer up\nvendor/bin/phpunit\n```\n\n## Collection\n\nThe `CloudCreativity\\Utils\\Collection\\Collection` is a standard class for\nhandling numerically indexed lists. It comes with the following methods.\n\n### Modifiers\n\nThe following methods modify the list contained within the collection:\n\n* `add`\n* `addStrict`\n* `addObjects`\n* `clear`\n* `fill`\n* `fillObject`\n* `insertAt`\n* `pop`\n* `push`\n* `pushObjects`\n* `remove`\n* `removeAt`\n* `removeStrict`\n* `replace`\n* `shift`\n* `unshift`\n* `unshiftObjects`\n\n### Accessors\n\nThe following methods give access to items within the collection:\n\n* `first`\n* `itemAt`\n* `last`\n\n### Querying\n\nThe following methods can be used to assess or query the contents of the\ncollection;\n\n* `any`\n* `contains`\n* `containsStrict`\n* `equals`\n* `equalsStrict`\n* `every`\n* `indexOf`\n* `indexOfStrict`\n* `isEmpty`\n* `isNotEmpty`\n* `search`\n* `searchStrict`\n\n### Helpers\n\nThe following methods assist with handling the list, and return new instances\nof the collection. (I.e. the original collection is not modified.)\n\n* `all`\n* `cast` (static)\n* `chunk`\n* `compact`\n* `copy`\n* `count`\n* `create` (static)\n* `diff`\n* `each`\n* `filter`\n* `implode`\n* `intersect`\n* `invoke`\n* `itemsAt`\n* `map`\n* `pad`\n* `reduce`\n* `reject`\n* `replicate`\n* `reverse`\n* `slice`\n* `sort`\n* `sync`\n* `take`\n* `tap`\n* `unique`\n* `uniqueStrict`\n* `without`\n* `withoutStrict`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudcreativity%2Futils-collection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudcreativity%2Futils-collection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudcreativity%2Futils-collection/lists"}