{"id":18637989,"url":"https://github.com/imponeer/smarty-sunrise-http-router","last_synced_at":"2025-07-12T07:03:17.995Z","repository":{"id":40730666,"uuid":"424398909","full_name":"imponeer/smarty-sunrise-http-router","owner":"imponeer","description":"Smarty extensions to use with amazing router from @sunrise-php","archived":false,"fork":false,"pushed_at":"2025-06-04T10:48:46.000Z","size":54,"stargazers_count":1,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-05T20:52:23.722Z","etag":null,"topics":["hacktoberfest","smarty","smarty-plugins"],"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/imponeer.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":"2021-11-03T22:28:18.000Z","updated_at":"2025-06-04T10:48:47.000Z","dependencies_parsed_at":"2023-02-17T05:05:15.375Z","dependency_job_id":"bcd1e02a-9966-4f74-9208-eb26bf07a22b","html_url":"https://github.com/imponeer/smarty-sunrise-http-router","commit_stats":{"total_commits":22,"total_committers":3,"mean_commits":7.333333333333333,"dds":0.2727272727272727,"last_synced_commit":"a1a6d4fce43ba38e86938c74e2eb651cb18acf97"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/imponeer/smarty-sunrise-http-router","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imponeer%2Fsmarty-sunrise-http-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imponeer%2Fsmarty-sunrise-http-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imponeer%2Fsmarty-sunrise-http-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imponeer%2Fsmarty-sunrise-http-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imponeer","download_url":"https://codeload.github.com/imponeer/smarty-sunrise-http-router/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imponeer%2Fsmarty-sunrise-http-router/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264952015,"owners_count":23687998,"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":["hacktoberfest","smarty","smarty-plugins"],"created_at":"2024-11-07T05:38:33.527Z","updated_at":"2025-07-12T07:03:17.979Z","avatar_url":"https://github.com/imponeer.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License](https://img.shields.io/github/license/imponeer/smarty-sunrise-http-router.svg)](LICENSE)\n[![GitHub release](https://img.shields.io/github/release/imponeer/smarty-sunrise-http-router.svg)](https://github.com/imponeer/smarty-sunrise-http-router/releases) [![PHP](https://img.shields.io/packagist/php-v/imponeer/smarty-sunrise-http-router.svg)](http://php.net) \n[![Packagist](https://img.shields.io/packagist/dm/imponeer/smarty-sunrise-http-router.svg)](https://packagist.org/packages/imponeer/smarty-sunrise-http-router)\n\n# Smarty Sunrise HTTP Router Extensions\n\nThis library adds some `url` function that generates named route for [Sunrise HTTP Router](https://github.com/sunrise-php/http-router).\n\n## Installation\n\nTo install and use this package, we recommend to use [Composer](https://getcomposer.org):\n\n```bash\ncomposer require imponeer/smarty-sunrise-http-router\n```\n\nOtherwise, you need to include manually files from `src/` directory. \n\n## Registering in Smarty\n\nIf you want to use these extensions from this package in your project you need register them with [`registerPlugin` function](https://www.smarty.net/docs/en/api.register.plugin.tpl) from [Smarty](https://www.smarty.net). For example:\n```php\n$smarty = new \\Smarty();\n$urlPlugin = new \\Imponeer\\Smarty\\Extensions\\SunriseHTTPRouter\\UrlFunction($router);\n$smarty-\u003eregisterPlugin('function', $urlPlugin-\u003egetName(), [$urlPlugin, 'execute']);\n```\n\n## Using from templates\n\nTo generate url for named route:\n```smarty\n\u003ca href=\"{url name='ROUTE_NAME' attributes=['p1'=\u003e'v1']}\"\u003ego there\u003c/a\u003e\n```\n\n`attributes` can be used also as shortcut `attr` or not used at all. This param maybe needed depending on a route.\n\n## How to contribute?\n\nIf you want to add some functionality or fix bugs, you can fork, change and create pull request. If you not sure how this works, try [interactive GitHub tutorial](https://skills.github.com).\n\nIf you found any bug or have some questions, use [issues tab](https://github.com/imponeer/smarty-sunrise-http-router/issues) and write there your questions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimponeer%2Fsmarty-sunrise-http-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimponeer%2Fsmarty-sunrise-http-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimponeer%2Fsmarty-sunrise-http-router/lists"}