{"id":24408595,"url":"https://github.com/jenstornell/mold","last_synced_at":"2025-09-01T07:34:45.385Z","repository":{"id":217043554,"uuid":"172451932","full_name":"jenstornell/mold","owner":"jenstornell","description":"A PHP library to chain methods like $mold-\u003eupperacase()-\u003elast(3)","archived":false,"fork":false,"pushed_at":"2020-01-06T11:23:51.000Z","size":11,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T09:27:32.083Z","etag":null,"topics":["chain","functions","methods","php","php7"],"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/jenstornell.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-02-25T07:01:25.000Z","updated_at":"2022-02-12T13:18:28.000Z","dependencies_parsed_at":"2024-01-14T08:12:19.408Z","dependency_job_id":"8dd6fa06-918c-43a3-8d02-248bd6cedbac","html_url":"https://github.com/jenstornell/mold","commit_stats":null,"previous_names":["jenstornell/mold"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jenstornell/mold","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenstornell%2Fmold","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenstornell%2Fmold/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenstornell%2Fmold/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenstornell%2Fmold/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jenstornell","download_url":"https://codeload.github.com/jenstornell/mold/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenstornell%2Fmold/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273088829,"owners_count":25043574,"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-09-01T02:00:09.058Z","response_time":120,"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":["chain","functions","methods","php","php7"],"created_at":"2025-01-20T05:52:19.022Z","updated_at":"2025-09-01T07:34:45.329Z","avatar_url":"https://github.com/jenstornell.png","language":"PHP","readme":"# Mold\n\n_Version 2.0_ [Changelog](changelog.md)\n\nA PHP library to chain methods like `$mold-\u003eupperacase()-\u003elast(3)`.\n\n## In short\n\n- Tiny library (below 1 kB)\n- Easy to write own plugins\n- No dependencies\n- Support for arguments\n\n## Usage\n\nHere is an example of how it will look like.\n\n```php\n// Include MoldBase class\ninclude __DIR__ . '/mold.php';\n\n// Include plugins\ninclude __DIR__ . '/plugins/hello.php';\n\n// Create a new instance\n$mold = new Mold();\n\n// Output the result on the screen, in this case \"LD!\"\necho $mold-\u003eset('Hello World!')-\u003eupperacase()-\u003elast(3);\n```\n\n## Write a plugin\n\nTo create the plugin that is used in the example above, you can do it like below.\n\n```php\n\u003c?php\nnamespace Mold;\n\nfunction trim($obj) {\n  return \\trim($obj-\u003ecollection, $obj-\u003eargs[0]);\n}\n```\n\n- You need the namespace `Mold`.\n- You need to include it as an internal file.\n\nWith the plugin above you can do something like below, which will output `Hello World`.\n\n```php\ninclude __DIR__ . '/mold.php';\ninclude __DIR__ . '/plugins/my-plugin.php';\n\n$mold = new Mold();\n\necho $mold-\u003eset('Hello World!')-\u003etrim('!');\n```\n\n## Requirements\n\n- PHP 7+\n\n## Disclaimer\n\nThis plugin is provided \"as is\" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you find any issues, please [create a new issue](issues/new).\n\n## License\n\nMIT\n\n## Donate\n\nIf you want to make a donation, you can do that by sending any amount https://www.paypal.me/DevoneraAB\n","funding_links":["https://www.paypal.me/DevoneraAB"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenstornell%2Fmold","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjenstornell%2Fmold","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenstornell%2Fmold/lists"}