{"id":30586228,"url":"https://github.com/elusivecodes/fyremacro","last_synced_at":"2026-01-20T17:32:15.573Z","repository":{"id":306751623,"uuid":"1027129248","full_name":"elusivecodes/FyreMacro","owner":"elusivecodes","description":"FyreMacro is a free, open-source string utility library for PHP.","archived":false,"fork":false,"pushed_at":"2025-07-27T11:31:51.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-29T13:55:06.710Z","etag":null,"topics":["macro","php","utility"],"latest_commit_sha":null,"homepage":"","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/elusivecodes.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,"zenodo":null}},"created_at":"2025-07-27T11:28:52.000Z","updated_at":"2025-07-27T11:31:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"594e56e1-ba6b-4882-9e4c-65b818cb4489","html_url":"https://github.com/elusivecodes/FyreMacro","commit_stats":null,"previous_names":["elusivecodes/fyremacro"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/elusivecodes/FyreMacro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreMacro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreMacro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreMacro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreMacro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elusivecodes","download_url":"https://codeload.github.com/elusivecodes/FyreMacro/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elusivecodes%2FFyreMacro/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276342533,"owners_count":25625581,"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-22T02:00:08.972Z","response_time":79,"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":["macro","php","utility"],"created_at":"2025-08-29T11:44:57.572Z","updated_at":"2026-01-20T17:32:15.557Z","avatar_url":"https://github.com/elusivecodes.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FyreMacro\r\n\r\n**FyreMacro** is a free, open-source macro utility library for *PHP*.\r\n\r\n\r\n## Table Of Contents\r\n- [Installation](#installation)\r\n- [Macros](#macros)\r\n    - [Calling Macros](#calling-macros)\r\n- [Static Macros](#static-macros)\r\n    - [Calling Static Macros](#calling-static-macros)\r\n\r\n\r\n\r\n## Installation\r\n\r\n**Using Composer**\r\n\r\n```\r\ncomposer require fyre/macro\r\n```\r\n\r\n\r\n## Macros\r\n\r\nYou can attach `Fyre\\Utility\\Traits\\MacroTrait` to any class.\r\n\r\n```php\r\nuse Fyre\\Utility\\Traits\\MacroTrait;\r\n\r\n// in any class\r\nclass MyClass {\r\n    use MacroTrait;\r\n}\r\n```\r\n\r\n**Clear Macros**\r\n\r\nClear all macros.\r\n\r\n```php\r\nMyClass::clearMacros();\r\n```\r\n\r\n**Has Macro**\r\n\r\nDetermine whether a macro is registered.\r\n\r\n- `$name` is a string representing the name of the macro.\r\n\r\n```php\r\n$hasMacro = MyClass::hasMacro($name);\r\n```\r\n\r\n**Macro**\r\n\r\nRegister a macro.\r\n\r\n- `$name` is a string representing the name of the macro.\r\n- `$callback` is the macro callback.\r\n\r\n```php\r\nMyClass::macro($name, $callback);\r\n```\r\n\r\n### Calling Macros\r\n\r\n```php\r\nMyClass::macro('myMethod', function(): bool {\r\n    return true;\r\n});\r\n\r\nnew MyClass()-\u003emyMethod(); // true\r\n```\r\n\r\n\r\n## Static Macros\r\n\r\nYou can attach `Fyre\\Utility\\Traits\\StaticMacroTrait` to any class.\r\n\r\n```php\r\nuse Fyre\\Utility\\Traits\\StaticMacroTrait;\r\n\r\n// in any class\r\nclass MyClass {\r\n    use StaticMacroTrait;\r\n}\r\n```\r\n\r\n**Clear Static Macros**\r\n\r\nClear all static macros.\r\n\r\n```php\r\nMyClass::clearStaticMacros();\r\n```\r\n\r\n**Has Static Macro**\r\n\r\nDetermine whether a static macro is registered.\r\n\r\n- `$name` is a string representing the name of the macro.\r\n\r\n```php\r\n$hasStaticMacro = MyClass::hasStaticMacro($name);\r\n```\r\n\r\n**Static Macro**\r\n\r\nRegister a static macro.\r\n\r\n- `$name` is a string representing the name of the macro.\r\n- `$callback` is the macro callback.\r\n\r\n```php\r\nMyClass::staticMacro($name, $callback);\r\n```\r\n\r\n### Calling Static Macros\r\n\r\n```php\r\nMyClass::staticMacro('myMethod', function(): bool {\r\n    return true;\r\n});\r\n\r\nMyClass::myMethod(); // true\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felusivecodes%2Ffyremacro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felusivecodes%2Ffyremacro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felusivecodes%2Ffyremacro/lists"}