{"id":18794559,"url":"https://github.com/effectra/renova","last_synced_at":"2025-08-14T08:13:24.823Z","repository":{"id":178703901,"uuid":"655436891","full_name":"effectra/renova","owner":"effectra","description":"Effectra\\Renova is a PHP package that provides a template rendering and web asset management functionality. It includes a template engine for rendering template files and a web asset management system for generating script and link tags for web assets.","archived":false,"fork":false,"pushed_at":"2023-07-12T13:24:42.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-21T16:13:01.825Z","etag":null,"topics":["php","template-engine","view","webencore"],"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/effectra.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-18T22:12:05.000Z","updated_at":"2023-07-18T09:31:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"c5edc0f0-f73d-4298-9fa0-ed16d44c113c","html_url":"https://github.com/effectra/renova","commit_stats":null,"previous_names":["effectra/renova"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/effectra/renova","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Frenova","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Frenova/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Frenova/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Frenova/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/effectra","download_url":"https://codeload.github.com/effectra/renova/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Frenova/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270385467,"owners_count":24574556,"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-08-14T02:00:10.309Z","response_time":75,"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":["php","template-engine","view","webencore"],"created_at":"2024-11-07T21:29:46.981Z","updated_at":"2025-08-14T08:13:24.777Z","avatar_url":"https://github.com/effectra.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Effectra\\Renova\n\nEffectra\\Renova is a PHP package that provides a template rendering and web asset management functionality. It includes a template engine for rendering template files and a web asset management system for generating script and link tags for web assets.\n\n## Installation\n\nYou can install the Effectra\\Renova package via Composer. Simply run the following command:\n\n```\ncomposer require effectra/renova\n```\n\n## Usage\n\n### Template Engine\n\nThe template engine allows you to render template files using a template syntax. Here's an example of how to use the template engine:\n\n```php\nuse Effectra\\Renova\\TemplateEngine;\n\n$template = new TemplateEngine();\n\n// Render a template file\n$content = (new Render(\n    $path,\n    $data,\n    [\n        ['url' =\u003e function ($path = '') {\n                return Request::url() . (string) $path;\n            }]\n    ],\n    [\n        ['APP_NAME' =\u003e $_ENV['APP_NAME'] ]\n    ],\n    $this-\u003ereader\n))-\u003esend();\n\n$links = $this-\u003eencore-\u003elinkTags('app');\n$scripts = $this-\u003eencore-\u003escriptTags('app');\n\n$content = $this-\u003eaddLinksAndScripts($content, $links, $scripts);\n```\n\nIn the example above, we create a new instance of the `TemplateEngine` class indirectly by instantiating the `Render` class. The `Render` class uses the `TemplateEngine` internally for rendering the template file. We pass the necessary arguments to the `Render` constructor, including the template file path, data, template functions, template global variables, and an instance of the `Reader` class.\n\n### Web Asset Management\n\nThe web asset management feature allows you to generate script and link tags for web assets managed by Encore. Here's an example of how to use the web asset management:\n\n```php\nuse Effectra\\Renova\\WebEncore;\n\n$webEncore = new WebEncore();\n\n// Generate script tags for a specific section\n$scriptTags = $webEncore-\u003escriptTags('app');\n\n// Generate link tags for a specific section\n$linkTags = $webEncore-\u003elinkTags('styles');\n```\n\nIn the example above, we create a new instance of the `WebEncore` class. We then use the `scriptTags` and `linkTags` methods to generate the script and link tags for the specified sections.\n\n## Contributing\n\nThank you for considering contributing to the Effectra\\Renova package! If you would like to contribute, please follow the guidelines in the [CONTRIBUTING.md](link-to-contributing-md) file.\n\n## License\n\nThe Effectra\\Renova package is open-source software licensed under the [MIT license](link-to-license-file).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feffectra%2Frenova","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feffectra%2Frenova","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feffectra%2Frenova/lists"}